isarsoft / yolov4-triton-tensorrt

This repository deploys YOLOv4 as an optimized TensorRT engine to Triton Inference Server
http://www.isarsoft.com
Other
276 stars 63 forks source link

customized yolov4 model build failed #39

Closed Amanda-Barbara closed 3 years ago

Amanda-Barbara commented 3 years ago

Hi @philipp-schmidt the ./main program is crashed when I build my customized yolov4 model from darknet trained, I have modified the network/yolov4.h defined CLASS_NUM parameter, where else should I modify? thanks. my program reported errors like this: [Info] Creating builder [Info] Creating model yolov4 [06/07/2021-07:08:04] [E] [TRT] Parameter check failed at: ../builder/Network.cpp::addScale::494, condition: shift.count > 0 ? (shift.values != nullptr) : (shift.values == nullptr) main: /yolov4-triton-tensorrt/networks/yolov4.h:65: nvinfer1::IScaleLayer yolov4::addBatchNorm2d(nvinfer1::INetworkDefinition, std::map<std::__cxx11::basic_string, nvinfer1::Weights>&, nvinfer1::ITensor&, std::string, float): Assertion `scale_1' failed. Aborted (core dumped)

Amanda-Barbara commented 3 years ago

@philipp-schmidt I have succeed run my customized yolov4 model on triton-21.03 after I used your shared converter.py script to convert yolov4 model. and the tool is from https://github.com/Tianxiaomo/pytorch-YOLOv4

philipp-schmidt commented 3 years ago

Yes, I will make a short tutorial for this soon. But the gist of it is to use the converter.py script to make everything compatible with the repo you mentioned above and give the layer weights the correct ids.

dhirajpatnaik16297 commented 3 years ago

@philipp-schmidt I have succeed run my customized yolov4 model on triton-21.03 after I used your shared converter.py script to convert yolov4 model. and the tool is from https://github.com/Tianxiaomo/pytorch-YOLOv4

Hi @Amanda-Barbara. Could you please elaborate on the steps to create the engine file from the customized yolov4 model? I could not follow. I am also getting the same issue for my custom model:: [Info] Creating builder [Info] Creating model yolov4 [07/08/2021-08:07:57] [E] [TRT] Parameter check failed at: ../builder/Network.cpp::addScale::484, condition: shift.count > 0 ? (shift.values != nullptr) : (shift.values == nullptr) main: /workspace/yolov4-triton-tensorrt/networks/yolov4.h:65: nvinfer1::IScaleLayer yolov4::addBatchNorm2d(nvinfer1::INetworkDefinition, std::map<std::__cxx11::basic_string, nvinfer1::Weights>&, nvinfer1::ITensor&, std::string, float): Assertion `scale_1' failed. Aborted (core dumped)

Thanks