Using aggregation#
The aggregation mechanism in LUNA ID is designed to enhance the accuracy and reliability of face recognition by analyzing multiple frames collectively. Aggregation helps mitigate occasional neural network faults when performing the following best shot estimations:
Estimation | Platform |
---|---|
Eye state | |
Glasses | |
Mouth | |
Medical mask |
How it works#
LUNA ID uses an aggregation process to improve accuracy by analyzing multiple frames. Here’s how it works.
In LUNA ID for Android#
The aggregation mechanism operates as follows:
- Frame collection: LUNA ID captures 10 consecutive frames.
- Glasses detection: LUNA ID checks if any frame has glasses. If even one frame does, the set is disqualified, and the user gets a "Take off the glasses" error message.
- Eye status estimation: No more than two frames should show closed eyes. If more than two frames have closed eyes, the system sends an "Eyes closed" error message.
- Best shot determination : If none of the frames have glasses and no more than two frames show closed eyes, LUNA ID selects this set as the best shot.
In LUNA ID for iOS#
For each specific aggregator, the mechanism operates as follows:
- Frame collection: LUNA ID captures 20 consecutive frames.
- Initial estimation: If there are 14 or more successful frames (that is, at least 14 out of 20), the aggregation is considered successful.
- Handling unsuccessful aggregations: If the initial evaluation is unsuccessful, LUNA ID continues to add new frames one by one to the previously accumulated set. Each time a new frame is added to the end of the queue, the first frame in the queue is discarded. This creates a "sliding window" effect, where the aggregation score is updated continuously with each new frame.
- Termination criteria: Aggregation does not stop when it receives a positive response. Instead, it continues until all active aggregations are successful. This ensures that all criteria are met simultaneously before proceeding.
- Simultaneous evaluation: All aggregations run in parallel. LUNA ID requires all checks to be approved at the same moment for a best shot to be captured.
Enable aggregation#
In LUNA ID for Android#
You can selectively enable aggregation for either eye status, glasses estimation, or both, depending on your specific needs.
To enable aggregation:
- Set
LunaConfig.eyesAggregationEnabled
totrue
to enable eye status estimation aggregation. - Set
LunaConfig.glassesAggregationEnabled
totrue
to enable glasses estimation aggregation.
By default, eyesAggregationEnabled
and glassesAggregationEnabled
are set to true
.
Performance optimization#
For POS terminals, we recommend disabling aggregation by setting the LunaConfig.eyesAggregationEnabled
and LunaConfig.glassesAggregationEnabled
parameters to false
. This adjustment will significantly boost processing speed and reduce system load.
In LUNA ID for iOS#
You can enable aggregation through code or a configuration file:
Through code
Set the LCLunaConfiguration.glassesCheckEnabled
and LCLunaConfiguration.aggregationEnabled
properties to true
.
Through a configuration file
In the LCLunaConfiguration.plist configuration file, set glassesCheckEnabled
and aggregationEnabled
parameters to true
.
By default, glassesCheckEnabled
and aggregationEnabled
are set to false
.