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 - 202 MB
- LUNA ID for iOS - 116,1 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 MB | 23,6 MB |
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_v3_arm.plan | 653 KB | 653 KB | |
ags_v3_cpu.plan | N/A | 624 KB | |
cnn59m_arm.plan | N/A | 21 MB | |
cnn59m_cpu.plan | N/A | 21 MB | |
cnn60m_arm.plan | 18.9 MB | 19 MB | |
cnn60m_cpu.plan | N/A | 21 MB | |
eye_status_estimation_arm.plan | 358 KB | 358 KB | |
eye_status_estimation_cpu.plan | N/A | 358 KB | |
eyes_estimation_flwr8_arm.plan | 858 KB | 858 KB | |
eyes_estimation_flwr8_cpu.plan | N/A | 856 KB | |
face_occlusion_v1_arm.plan | 359 KB | 359 KB | |
face_occlusion_v1_cpu.plan | N/A | 348 KB | |
FaceDet_v2_first_arm.plan | 10.5 KB | 10.5 KB | |
FaceDet_v2_first_cpu.plan | N/A | 10 KB | |
FaceDet_v2_second_arm.plan | 99 KB | 99 KB | |
FaceDet_v2_second_cpu.plan | N/A | 99 KB | |
FaceDet_v2_third_arm.plan | 1.5 MB | 1.5 MB | |
FaceDet_v2_third_cpu.plan | N/A | 1.5 MB | |
gaze_v2_arm.plan | 962 KB | N/A | |
glasses_estimation_v2_arm.plan | 758 KB | 758 KB | |
glasses_estimation_v2_cpu.plan | N/A | 762 KB | |
headpose_v3_arm.plan | 291 KB | 291 KB | |
headpose_v3_cpu.plan | N/A | 291 KB | |
mask_clf_v3_arm-int8.plan | 2.8 MB | 2.8 MB | |
mask_clf_v3_cpu.plan | N/A | 1.3 MB | |
model_subjective_quality_v1_arm.plan | N/A | 58 KB | |
model_subjective_quality_v1_cpu.plan | N/A | 57 KB | |
model_subjective_quality_v2_arm.plan | 221 KB | 221 KB | |
model_subjective_quality_v2_cpu.plan | N/A | 221 KB | |
mouth_estimation_v4_arm.plan | 1.7 MB | 1.7 MB | |
mouth_estimation_v4_cpu.plan | N/A | 1.6 MB | |
oneshot_rgb_liveness_v9_model_3_arm.plan | 8.3 MB | 8.3 MB | |
oneshot_rgb_liveness_v9_model_3_cpu.plan | N/A | 8.3 MB | |
oneshot_rgb_liveness_v9_model_4_arm.plan | 9.7 MB | 9.7 MB | |
oneshot_rgb_liveness_v9_model_4_cpu.plan | N/A | 9.7 MB | |
sdc_rgb2gray_arm.plan | 1.5 KB | N/A | |
sdc_v1_arm.plan | 5.7 KB | N/A | |
vlTracker_detection_arm.plan | 645 KB | 645 KB | |
vlTracker_detection_cpu.plan | N/A | 634 KB | |
vlTracker_template_arm.plan | 607 KB | 607 KB | |
vlTracker_template_cpu.plan | N/A | 601 KB | |
vlTracker_update_arm.plan | 139 KB | 139 KB | |
vlTracker_update_cpu.plan | N/A | 137 KB |
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.