Skip to content

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 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 N/A 1.41 MB
ags_angle_estimation_flwr_cpu.plan N/A 1.41 MB
ags_v3_arm.plan 637 KB 637 KB
ags_v3_cpu.plan N/A 610 KB
cnn52m_arm.plan N/A 12.6 MB
cnn52m_cpu.plan N/A 12.6 MB
cnn59m_arm.plan N/A 20.5 MB
cnn59m_cpu.plan N/A 20.4 MB
cnn60m_arm.plan 18.5 MB N/A
eye_status_estimation_arm.plan 350 KB 350 KB
eye_status_estimation_cpu.plan N/A 349 KB
eye_status_estimation_flwr_arm.plan 701 KB 699 KB
eye_status_estimation_flwr_cpu.plan N/A 699 KB
eyes_estimation_flwr8_arm.plan 838 KB 838 KB
eyes_estimation_flwr8_cpu.plan N/A 836 KB
face_occlusion_v1_arm.plan 350 KB N/A
FaceDet_v2_first_arm.plan 10.2 KB 10.2 KB
FaceDet_v2_first_cpu.plan N/A 9.82 KB
FaceDet_v2_second_arm.plan 96.2 KB 96.2 KB
FaceDet_v2_second_cpu.plan N/A 96.6 KB
FaceDet_v2_third_arm.plan 1.42 MB 1.42 MB
FaceDet_v2_third_cpu.plan N/A 1.42 MB
glasses_estimation_v2_arm.plan 740 KB 740 KB
glasses_estimation_v2_cpu.plan N/A 744 KB
headpose_v3_arm.plan 283 KB 283 KB
headpose_v3_cpu.plan N/A 283 KB
mask_clf_v3_arm.plan 1.36 MB 1.36 MB
mask_clf_v3_cpu.plan N/A 1.27 MB
model_subjective_quality_v1_arm.plan 56.4 KB 56.4 KB
model_subjective_quality_v1_cpu.plan N/A 55.6 KB
model_subjective_quality_v2_arm.plan 216 KB 216 KB
model_subjective_quality_v2_cpu.plan N/A 216 KB
mouth_estimation_v4_arm.plan 1.56 MB 1.56 MB
mouth_estimation_v4_cpu.plan N/A 1.56 MB
oneshot_rgb_liveness_v8_model_3_arm.plan 7.97 MB 7.97 MB
oneshot_rgb_liveness_v8_model_3_cpu.plan N/A 7.95 MB
oneshot_rgb_liveness_v8_model_4_arm.plan 7.97 MB 7.97 MB
oneshot_rgb_liveness_v8_model_4_cpu.plan N/A 7.97 MB

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 with splits.abi enabled.

In LUNA ID for iOS#

1․ Open your project with added frameworks in Xcode.

2․ Go to Product > Archive.

Archiving

3․ Click the Distribute App button after archiving finishes.

Distribute App

4․ Select a distribution method. For example, Development.

Method of distribution

5․ Select development distribution options.

Development distribution options

6․ Select a device for distribution creation. For example, All compatible device variants.

Development distribution options

7․ Re-sign your application. For example, by the developer signing.

Re-signing

8․ View the information about the archive.

Re-signing

9․ Export your app.

Export

10․ Open the App Thinning Size Report.txt file.

Export

11․ Find necessary information about the application size.

The picture below shows the size of the application without additional swift frameworks from this example.

Export

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.