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 - 141,13 MB
  • LUNA ID for iOS - 140,2 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
FaceEngine 10 MB 6,8 MB
Flower 5,9 MB 4,4 MB
TrackEngine 5 MB 2,8 MB

In LUNA ID for iOS#

Dependency Size
fsdk 125.68 MB
Flower 9.29 MB
tsdk 3.1 MB
LunaCamera 720.68 KB
LunaCore 554.97 KB
LunaWEB 823.21 KB
CheckJailBreakDevice 101 KB

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 633 KB 633 KB
cnn60m_arm.plan 18.9 MB 18.9 MB
eye_status_estimation_arm.plan 267 KB 267 KB
eyes_estimation_flwr8_arm.plan 896 KB 896 KB
face_occlusion_v1_arm.plan 154 KB 154 KB
FaceDet_v2_first_arm.plan 8 KB 8 KB
FaceDet_v2_second_arm.plan 99 KB 99 KB
FaceDet_v2_third_arm.plan 1.5 MB 1.5 MB
gaze_v2_arm.plan 962 KB N/A
glasses_estimation_v2_arm.plan 714 KB 714 KB
headpose_v3_arm.plan 284 KB 284 KB
mask_clf_v3_arm-int8.plan 2.6 MB 2.6 MB
model_subjective_quality_v1_arm.plan 53 KB 53 KB
model_subjective_quality_v2_arm.plan 389 KB 389 KB
mouth_estimator_v4_arm.plan 1.5 MB 1.5 MB
oneshot_rgb_liveness_v12_model_4_arm.plan 4 MB 4 MB
oneshot_rgb_liveness_v12_model_5_arm.plan 4 MB 4 MB
oneshot_rgb_liveness_v12_model_6_arm.plan 4.7 MB 4.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_template_arm.plan 607 KB 607 KB
vlTracker_update_arm.plan 139 KB 139 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")
                isUniversalApk = false
            }
        }
        ...
}
  • In the build.dragle file:
    android {
    ...

    splits {
        abi {
            enable true
            reset()
            include "armeabi-v7a", "arm64-v8a"
            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
Archiving

3․ Click the Distribute App button after archiving finishes.

Distribute App
Distribute App

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

Method of distribution
Method of distribution

5․ Select development distribution options.

Development distribution options
Development distribution options

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

Development distribution options
Development distribution options

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

Re-signing
Re-signing

8․ View the information about the archive.

Re-signing
Re-signing

9․ Export your app.

Export
Export

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

Export
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
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.