PKUZHOU / MTCNN_FaceDetection_TensorRT

MTCNN C++ implementation with NVIDIA TensorRT Inference accelerator SDK
202 stars 57 forks source link

bug the sample with image is not working #20

Closed fogelton closed 3 years ago

fogelton commented 3 years ago

I have a newly install jetpack4.5 on jetson nano it is basicly ubuntu 18.04 aarch64with all nvidia stuff cuda tensorrt etc

Start generating TenosrRT runtime models terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::replace: __pos (which is 15) > this->size() (which is 0) The program has unexpectedly finished.

when debugging the problem lies with line 44 in mtcnn.cpp

pnet_engine = new Pnet_engine[scales_.size()];
simpleFace_ = (Pnet**)malloc(sizeof(Pnet*)*scales_.size());
for (size_t i = 0; i < scales_.size(); i++) {
    int changedH = (int)ceil(row*scales_.at(i));
    int changedW = (int)ceil(col*scales_.at(i));
    pnet_engine[i].init(changedH,changedW); <--------- when the are negative values

I was just calling the attached photo image_test("/home/jetson/git/MTCNN_FaceDetection_TensorRT/4.jpg");

fogelton commented 3 years ago

my mistake, I use qtcreator and the active directory is different, so the prototxt model was not found due to relative path