I try to use tensorRT_optimization to generate a tensorRT model from YOLO.
The YOLO’s .prototxt file is from https://github.com/TLESORT/YOLO-TensorRT-GIE- and it’s .caffemodel is converted by using https://github.com/xingwangsfu/caffe-yolo/.
Now I successfully generated a optimized.bin model from tensorRT_optimization. I used the command line:
./tensorRT_optimization --modelType=caffe --prototxt=/path/to/my/prototxt/file.prototxt --caffemodel=/path/to/my/caffemodel/file.caffemodel --outputBlobs=result
Then, I tried to use sample_object_detector with the transfered model optimized.bin.
The command line:
However, it shows errors.
mec-lab@meclab-System-Product-Name:~/LBX/driveworks-1.2/bin$ ./sample_object_detector --tensorRT_model=/home/mec-lab/LBX/driveworks-1.2/tools/dnn/optimized.bin [19-11-2018 12:54:51] Initialize DriveWorks SDK v1.2.400 [19-11-2018 12:54:51] Release build with GNU 4.8.5 from v1.2.0-rc11-0-ga7f5475 [19-11-2018 12:54:51] Platform: Detected Generic x86 Platform [19-11-2018 12:54:51] TimeSource: monotonic epoch time offset is 1542597839247350 [19-11-2018 12:54:51] Platform: number of GPU devices detected 1 [19-11-2018 12:54:51] Platform: currently selected GPU device discrete ID 0 [19-11-2018 12:54:51] SDK: Resources mounted from .././data/resources [19-11-2018 12:54:51] SensorFactory::createSensor() -> camera.virtual, tensorRT_model=/home/mec-lab/LBX/driveworks-1.2/tools/dnn/optimized.bin,video=.././data/samples/sfm/triangulation/video_0.h264 [19-11-2018 12:54:51] CameraNVCUVID: no seek table found at .././data/samples/sfm/triangulation/video_0.h264.seek, seeking is not available. Camera image: 1280x800 Camera image with 1280x800 at 30 FPS [19-11-2018 12:54:52] Added linear block of size 12845056 [19-11-2018 12:54:52] Added linear block of size 12845056 [19-11-2018 12:54:52] Added linear block of size 12845056 [19-11-2018 12:54:52] Added linear block of size 1605632 [19-11-2018 12:54:53] Driveworks exception thrown: DW_INVALID_ARGUMENT: blobIndex is larger than output binding count terminate called after throwing an instance of 'std::runtime_error' what(): [2018-11-19 12:54:53] DW Error DW_INVALID_ARGUMENT executing DW function: dwDNN_getOutputSize(&m_networkOutputDimensions, 1U, m_dnn) at /builds/driveav/dw/sdk/samples/dnn/sample_object_detector/main.cpp:271 Aborted (core dumped)
By the way, I didn’t train the YOLO model by my own data. Is there something to do with this reasons?
Please give me some hints. Thanks!