nwesem / mtcnn_facenet_cpp_tensorRT

Face Recognition on NVIDIA Jetson (Nano) using TensorRT
GNU General Public License v3.0
200 stars 72 forks source link

Cant make MTCNN engines #1

Closed yomuevans closed 4 years ago

yomuevans commented 4 years ago

Hi, so i followed step by step instruction, but the build cant seem to make mtcnn model engines by itself, here's the output am getting

Start generating mtCNN TenosrRT runtime models changedH = 96, changedW = 128 rawName = ../mtCNNModels/det1_relu1.engine [libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format ditcaffe.NetParameter: 7:1: Expected identifier, got: < ERROR: CaffeParser: Could not parse deploy file Segmentation fault (core dumped)

"det1_relu1" i had succesfully created my own engines placed them in the folder, apparently the code seems to want to make its own hence adding '1' at the end the name Can i run the code with my custom made engines?

nwesem commented 4 years ago

Hi yomuevans, it could work when you created your custom engines, but the base_engine.cpp takes care of that. So, as stated in the README.md, you will only need the models from PKUZHOU's repo.

In this case freezing and converting the model to uff only holds for the Tensorflow model of the FaceNet (facenet.pb --> facenet.uff). Can you try again without creating custom .engine files, but just put the facenet.uff in the facenetModels and all the mtCNN models in the mtCNNModels folder?

nwesem commented 4 years ago
  1. You do not have to convert the models for the mtCNN. The mtCNN folder structure should look like this: det1_relu.caffemodel det1_relu.prototxt det2_relu.caffemodel det2_relu.prototxt det3_relu.caffemodel det3_relu.prototxt README.md

If you have all the files in the mtCNN folder you should be able to run the entire project using ./mtcnn_facenet_cpp_tensorRT. When run for the first time the baseengine.cpp will create several *.engine_ files.

  1. You will need TensorRT 5.1 or higher

Hope it works now

deaffella commented 4 years ago

Hi, so i followed step by step instruction, but the build cant seem to make mtcnn model engines by itself, here's the output am getting

Start generating mtCNN TenosrRT runtime models changedH = 96, changedW = 128 rawName = ../mtCNNModels/det1_relu1.engine [libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format ditcaffe.NetParameter: 7:1: Expected identifier, got: < ERROR: CaffeParser: Could not parse deploy file Segmentation fault (core dumped)

"det1_relu1" i had succesfully created my own engines placed them in the folder, apparently the code seems to want to make its own hence adding '1' at the end the name Can i run the code with my custom made engines?

hi! I ran into the same problem. how did you load the face detector models? I just try to execute step01_pb_to_uff.py, then download models with terminal by links in readme and run ./mtcnn_facenet_cpp_tensorRT but every time i've got an error like you

nwesem commented 4 years ago

Thanks @yomuevans, I will update the README.md according to that.