LUNA ID size#
Total size#
The minimum size of LUNA ID that includes the face detection and OneShotLiveness estimation functionalities is:
- LUNA ID for Android - 95 MB
- LUNA ID for iOS - 115 MB
This size is the sum of the sizes of the required dependencies and neural networks used in LUNA ID. Knowing this information is crucial for understanding how each component influences the overall functionality and performance of LUNA ID.
The tables below provide the sizes of required dependencies, in MB.
In LUNA ID for Android#
Dependency | arm64-v8a | armeabi-v7a | x86 | x86_64 |
---|---|---|---|---|
FaceEngine | 10 MB | 6,8 MB | 17,5 | 23,6 |
Flower | 5,9 MB | 4,4 MB | 7,8 MB | 9,3 MB |
TrackEngine | 5 MB | 2,8 MB | 24,1 MB | 44,6 MB |
In LUNA ID for iOS#
Dependency | Size |
---|---|
FaceEngine | 40,4 MB |
Flower | 21,9 MB |
TrackEngine | 16,1 MB |
LunaCamera | 1,5 MB |
LunaCore | 1 MB |
LunaWEB | 1,9 MB |
The table below provides the sizes that .plan files add to LUNA ID. For details about each .plan file and a functionality it covers, see Neural networks used in LUNA ID.
.plan file | LUNA ID for iOS | LUNA ID for Android | Required |
---|---|---|---|
ags_angle_estimation_flwr_arm.plan | 1.6 MB | 1.6 MB | Yes |
ags_angle_estimation_flwr_cpu.plan | N/A | 1.6 MB | Yes |
ags_v3_arm.plan | N/A | 635 KB | Yes |
ags_v3_cpu.plan | N/A | 608 KB | Yes |
cnn52m_arm.plan | 13 MB | 13 MB | No |
cnn52m_cpu.plan | N/A | 13 MB | No |
cnn59m_arm.plan | 24 MB | 24 MB | No |
cnn59m_cpu.plan | N/A | 24 MB | No |
eye_status_estimation_flwr_arm.plan | 810 KB | 810 KB | Yes |
eye_status_estimation_flwr_cpu.plan | N/A | 810 KB | Yes |
eyes_estimation_flwr8_arm.plan | 963 KB | 963 KB | Yes |
eyes_estimation_flwr8_cpu.plan | N/A | 963 KB | Yes |
FaceDet_v2_first_arm.plan | 963 KB | 963 KB | Yes |
FaceDet_v2_first_cpu.plan | N/A | 9.4 KB | Yes |
FaceDet_v2_second_arm.plan | 9.4 KB | 9.4 KB | Yes |
FaceDet_v2_second_cpu.plan | N/A | 107 KB | Yes |
FaceDet_v2_third_arm.plan | 1.6 MB | 1.6 MB | Yes |
FaceDet_v2_third_cpu.plan | N/A | 1.6 MB | Yes |
glasses_estimation_v2_cpu.plan | N/A | 735 KB | No |
glasses_estimation_v2_arm.plan | 734 KB | 734 KB | No |
headpose_v3_arm.plan | N/A | 628 KB | Yes |
headpose_v3_cpu.plan | N/A | 628 KB | Yes |
mask_clf_v3_arm.plan | 22 MB | 22 MB | No |
mask_clf_v3_cpu.plan | N/A | 22 MB | No |
model_subjective_quality_v1_arm.plan | 263 KB | 263 KB | Yes |
model_subjective_quality_v1_cpu.plan | N/A | 263 KB | Yes |
model_subjective_quality_v2_arm.plan | 1.0 MB | 1.0 MB | Yes |
model_subjective_quality_v2_cpu.plan | N/A | 1.0 MB | Yes |
oneshot_rgb_liveness_v7_model_3_arm.plan | 8.4 MB | 8.4 MB | No |
oneshot_rgb_liveness_v7_model_4_arm.plan | 8.4 MB | 8.4 MB | No |
oneshot_rgb_liveness_v7_model_3_cpu.plan | N/A | 8.3 MB | No |
oneshot_rgb_liveness_v7_model_4_cpu.plan | N/A | 8.3 MB | No |
Measure LUNA ID size#
You can measure the size that LUNA ID adds to your app.
In LUNA ID for Android#
1․ Update build files to build separate .apk files for different platforms:
- In the build.gradle.kts file:
android {
...
splits {
abi {
isEnable = true
reset()
include("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
isUniversalApk = false
}
}
...
}
- In the build.dragle file:
android {
...
splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
universalApk false
}
}
...
}
2․ In Android Studio, run the Analyze APK utility.
3․ Open the build platfrom-specific .apk file (for example, armeabi-v7a
) and see the size of the following files:
- assets/data* folder
- lib/{platform}/libTrackEngineSDK.so
- lib/{platform}/libBestShotMobile.so
- lib/{platform}/libflower.so
- lib/{platform}/libMatchingKernel.s
- lib/{platform}/libFaceEngineSDK.so
- lib/{platform}/libwrapper.so
- lib/{platform}/libc++_shared.so
Important notes#
- Any other files are not parts of LUNA ID and are added by other dependencies of your app.
- In the Analyze APK utility, there should be only one platform in the lib folder (for example,
armeabi-v7a
,arm64-v8a
or any another). If there is more than one platform in this folder, then you are looking at a universal .apk file that includes all platforms. Go back a step and rebuild the app withsplits.abi
enabled.
In LUNA ID for iOS#
1․ Open your project with added frameworks in Xcode.
2․ Go to Product > Archive.
3․ Click the Distribute App button after archiving finishes.
4․ Select a distribution method. For example, Development.
5․ Select development distribution options.
6․ Select a device for distribution creation. For example, All compatible device variants.
7․ Re-sign your application. For example, by the developer signing.
8․ View the information about the archive.
9․ Export your app.
10․ Open the App Thinning Size Report.txt file.
11․ Find necessary information about the application size.
The picture below shows the size of the application without additional swift frameworks from this example.
12․ Verify the size of the packed application.
Reduce your app size#
You can reduce the size of your app by removing unnecessary .plan files. For details, see Reducing your app size by excluding .plan files.