DBFace using with Android tflite format
Zeleni9 opened this issue · 3 comments
Hello,
I have a question about using the db_keras.tflite model in Android. I am not sure the correct parameters for the face detector when generating anchors. If you can provide info about them that would be amazing. Info that I am lacking are feature sizes & anchor sizes with anchor ratios, here I have added some random data from another object detector:
private static final int[] feature_map_sizes = new int[] {33, 17, 9, 5, 3};
private static final float[][] anchor_sizes = new float[][] {{0.04f, 0.056f}, {0.08f, 0.11f}, {0.16f, 0.22f}, {0.32f, 0.45f}, {0.64f, 0.72f}};
private static final float[] anchor_ratios = new float[] {1.0f, 0.62f, 0.42f};`
If u have pre-processing and post-processing for face detector in Android Java code that would help immensely. Thank you.
I don't have any information about the db_keras.tflite you mentioned.
The pre-processing and post-processing depend on the tflite model, so please ask the person who designed that model.
It is dbface model from your repository just didnt write full name dbface_keras_480x640_float32_nhwc.tflite DBFace Model
This model (dbface_keras_480x640_float32_nhwc.tflite) doesn't require anchors.
The detected region can be obtained directly from the inference output.
please refer the post processing code as below:
android_tflite/tflite_dbface/app/src/main/cpp/tflite_dbface.cpp
Lines 83 to 133 in 6a6d889