ailia SDK Tutorial (Unity)
Here is a tutorial on using ailia SDK in Unity, a fast way to perform deep learning inference using Unity with the GPU.
In this article, we’ll show you a tutorial on how to get the ailia SDK running in the Unity package sample.
Unity Preparation
ailia SDK is supported since 2017.4 LTS.
If you don’t have Unity, please download and install the corresponding Unity from below. The free version also works fine.
Importing Unity Package
The contents of ailia SDK consists of the following

The package file “ailia_[version].unitypackage”, located directly under the “unity” folder, is the package file for Unity.
Launch the Unity launcher and create a new project from “New”.

Select Assets>Import Package>Custom Package from the menu bar of the launched project.

Select “ailia_[version].unitypackage” above and import it.

You can also import “ailia_[version].unitypackage” directly from the Unity launcher’s startup screen as a project.
In this case, the aforementioned Import screen will appear, but depending on the version of Unity, it may not, in that case, import from the menu bar as well as the new project.
Place the license file
For the evaluation version, place the license file in the same folder as ailia.dll (Plugins/x64) on Windows, or ~/Library/SHALO/ on Mac.
On a Mac, go to “Move” in the Finder menu, specify ~/Library in “Enter Folder Location”, navigate to it, create the SHALO folder, and place the license file there.
If you run the sample without a license file, an error (AILIA_STATUS_LICENSE_NOT_FOUND = -20) will occur.
Sample confirmation
The sample Scene is located in the following folder.
Assets>AXIP>AILIA>Sample>Scenes

For file access on Android, use the WWW class. By default, a Warning is displayed, but it does not affect the operation.
Samples are the following four.
- classifier
- detector
- feature extractor
- pose estimator
This time we will check the detector sample.
The sample has already been attached to the Ailia Detector Sample in SectorPlane. (inside the red box)

If the Script and Text links are stripped, please reconfigure them as shown below.

Press the Play button at the top and the sample will run.


It can barely work on LowSpec laptops. It will work on a PC with a reasonable specification.
The “sample selector” is a control UI to be used when making an application.
It is not used in Unity, but you can use it when you build an Android or iOS build and want to check it on an actual device.
In addition, axinc. has a collection of “ailia Models” that are ready to use in the ailia SDK. In the next issue, we would like to introduce importing these trained models to create samples from scratch.
Publish the application
From here, it becomes a necessary setting when outputting the application.
Common Settings
To output the scene as an application, you need to register the scene to be built. With the scene file you want to build, select File -> Build Settings and click Add Open Scenes to register it.

Player Settings
Settings for iOS and Android can be done by going to File -> Build Settings, selecting the platform, and then clicking on Player Settings.

Settings for iOS
When building on iOS, you need to set the bundle ID of your application in Player Settings. When using the camera in iOS, you need to set any text in the Camera Usage Description.

Settings for Android
When building on Android, you need to specify the package name of your application in Player Settings. This package name will uniquely identify your application. Also, for maximum performance, choose IL2CPP for Scripting Backend.

ailia Inc. has developed the ailia SDK, which enables cross-platform, GPU-based rapid inference. ailia Inc. provides a wide range of services from consulting, model creation, SDK provision of SDKs, development of AI-based applications and systems, to support Please feel free to contact us as we offer a total solution for.
ailia Tech BLOG