Closed kaishijeng closed 4 years ago
@kaishijeng The identification v1 is trained with size (100, 100), and v2 and v3 are (112, 112). When reference, you can use any reasonable size, such as (100, 100), (112, 112), (96,96), (128, 128). But testing using the same size as training maybe get the best performance.
@AaronYKing
Thanks for the info. I am using identification V2 to extract feature after croping and alignment (using dlib) and do comparisons for a couple people, the result is not very encouraging, ie, not able to get find a good threshold for feature distance. Below is my alignment code and preprocessing step before feature extraction:
align2=fa.align(img2, gray2, rect)
align2=cv2.resize(align2,(112,112))
align2 = (align2-127.5)/127.5
@kaishijeng Can you test the aligned faces provided by the author in the link firstly?
@AaronYKing
Will try your suggestion later. It seems there is an issue to use identification V2 in get_face_feature_mxnet.py. V1 is OK with this code. The error is:
Traceback (most recent call last):
File "./get_face_feature_mxnet.py", line 74, in
Stack trace returned 10 entries: [bt] (0) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x3e95ea) [0x7f64f32bd5ea] [bt] (1) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x3e9c11) [0x7f64f32bdc11] [bt] (2) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x72e5fd) [0x7f64f36025fd] [bt] (3) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x72f23d) [0x7f64f360323d] [bt] (4) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(mxnet::imperative::SetShapeType(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, mxnet::DispatchMode)+0x94a) [0x7f64f5d013ca] [bt] (5) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray*> > const&)+0x309) [0x7f64f5d0bc89] [bt] (6) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(+0x2d3fd69) [0x7f64f5c13d69] [bt] (7) /usr/local/lib/python3.5/dist-packages/mxnet/libmxnet.so(MXImperativeInvokeEx+0x6f) [0x7f64f5c1435f] [bt] (8) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7f651dbb7e20] [bt] (9) /usr/lib/python3.5/lib-dynload/_ctypes.cpython-35m-x86_64-linux-gnu.so(ffi_call+0x2eb) [0x7f651dbb788b]
@kaishijeng Sorry for the late reply. I have fixed the bug.
Insightface uses face size (112,112) for feature extraction. In your example in get_face_feature_mxnet.py, face size (100,100). is used. Should we use (100,100) for feature extraction?
Thanks,