Linzaer / Ultra-Light-Fast-Generic-Face-Detector-1MB

💎1MB lightweight face detection model (1MB轻量级人脸检测模型)
MIT License
7.14k stars 1.54k forks source link

reshape not support dimensions == 3 The Creator Don't support type 73, 257 #95

Open HangJie720 opened 4 years ago

HangJie720 commented 4 years ago

Hello, I want to put it to MNN source code /MNN/demo/exec directory to run with arm v8 GPU(RK3399), opencl included. However, when executing the following command,

./UltraFace.out slim-320-quant-ADMM-50.mnn imgs/1.jpg

error information is shown as follows,

reshape not support dimensions == 3
The Creator Don't support type 73, 257
reshape not support dimensions == 3
The Creator Don't support type 73, 303
reshape not support dimensions == 3
The Creator Don't support type 73, 343
reshape not support dimensions == 3
The Creator Don't support type 73, 373
reshape not support dimensions == 3
The Creator Don't support type 73, 243
reshape not support dimensions == 3
The Creator Don't support type 73, 289
reshape not support dimensions == 3
The Creator Don't support type 73, 329
reshape not support dimensions == 3
The Creator Don't support type 73, 361
softmax not support dimensions == 3
The Creator Don't support type 85, scores

I define config.type = MNN_FORWARD_CPU in UltraFace.cpp is OK, however config.type=MNN_FORWARD_OPENCL report error above; I want to know If this model is not supported on arm GPU, mobilenet.mnn is runned on arm gpu with opencl is ok, claiming the opencl is compiled successfully, but running your model slim-320.mnn is error, print information as above, and then no face box are show on result.

Linzaer commented 4 years ago

From the error log description, it seems that there is a problem with the reshape operator support in opencl mode.I use the shape params [1,-1,4] and [1,-1,2]. I have not tested the code in opencl mode. I think mobilenet.mnn can work because it doesn't have reshape operator. Maybe you can go to MNN's issue to find the answer and I will test it when I have time.

HangJie720 commented 4 years ago

Thank you very much, I have released the issue on MNN's issue, waiting their response. UltraFace On ARM GPU Issue If you have time, could you help me test your model based MNN supported on arm gpu with opencl. you can compile MNN source code as follows,

  1. put your file UltraFace.cpp, UltraFace.hpp, main.cpp to MNN/demo/exec directory
  2. modify CMakeLists.txt in MNN/demo/exec, add
    add_executable(UltraFace.out, main.cpp, UltraFace.cpp, UltraFace.hpp)
    target_link_libraries(UltraFace.out MNN $(OpenCV_LIBS))
    target_link_libraries(UltraFace.out $(MNN_DEPEND))
  3. modify CMakeLists.txt in MNN directory, open option(MNN_OPENCL "Enable OpenCL" ON)
  4. compile MNN source code.
    cmake .. -DMNN_BUILD_DEMO=ON -DMNN_BUILD_CONVERTER=true -DOpenCL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu/ && make -j6
  5. run demo.
    ./UltraFace.out slim-320-quant-ADMM-50.mnn imgs/1.jpg

    Thank you very much !!