-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Flex OP dependency and run inference against new IDDetector #5404
Conversation
Diffuse output:
APK
DEX
|
41fddba
to
0f3f2f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! this should drive down the SDK size a bit
d7520e8
1e9bdbf
to
d7520e8
Compare
Sorry needs to be rebase |
Yes, the compressed size dropped from 123.7 MiB to 13.5 MiB 😱 |
Summary
The new IDDetector removed NMS from in graph in order to remove the flex op dependency.
Now the NMS algorithm needs to be perform from Android side.
Note: this change should not be submitted until the server side model is updated
Changes for the model inference:
Before
NO_ID
,PASSPORT
,ID_FRONT
,ID_BACK
,INVALID
) scores of the box, (1, 5)After
PASSPORT
,ID_FRONT
,ID_BACK
,INVALID
) scores (392, 4) - noteNO_ID
is removedThe algorithm is to find the best scores from category scores, then return its dimension 1 index [0, 392) as
bestIndex
.Use that index to find best bounding box and best category
Motivation
Reduce SDK binary size
Testing
Screenshots
Changelog