marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.1 / 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.5k stars 362 forks source link

deepstream-app: utils.cpp:104: std::vector<float> loadWeights(std::__cxx11::string, const string&): Assertion `count > 0 && "\nInvalid .wts file."' failed. Aborted (core dumped) #207

Closed formerlya closed 2 years ago

formerlya commented 2 years ago

deepstream-app version 6.0.1 DeepStreamSDK 6.0.1 CUDA Driver Version: 10.2 CUDA Runtime Version: 10.2 TensorRT Version: 8.2 cuDNN Version: 8.2 libNVWarp360 Version: 2.0.1d3

I trained yolov5n.pt(v6.0) Then I am implementing mobile phone detection of yolov5n v6.0 with deepstream6.0. when I use deepstream's gen_wts_yoloV5.py to get .wts .cfg,done. When I put them into deepstream and compiled and modified the relevant files,error. image

image

formerlya commented 2 years ago

image image

formerlya commented 2 years ago

image

marcoslucianops commented 2 years ago

The wts file is wrong.

formerlya commented 2 years ago

yes, my wts file is wrong. I use the newest gen_wts_yoloV5.py it say "YOLOv5 2022-5-16 Python-3.8.13 torch-1.8.0 CPU

'cat' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 " When I use the gen_wts_yoloV5.py download 60+ days ago, it worked. Then I get the right .wts for me. So it's some version problem? I succeeded two months ago.

marcoslucianops commented 2 years ago

Please install

sudo apt-get install coreutils

And try again using the new gen_wts_yoloV5.py file

EdouardEPFL commented 2 years ago

I obtain the exact same error using the last gen_wts_yoloV5.py maybe something is still wrong with it ? Ps: coreutils is already installed and up to date.

I'm just trying to use the default yolov5s or yolov5n models given by the yolov5 repo, and not a specific trained one. Hence, if you're not able to solve the problem, I would be very happy with the yolov5s.wts or yolov5n.wts that works :)

Thank you in advance for any kind of help

formerlya commented 2 years ago

I obtain the exact same error using the last gen_wts_yoloV5.py maybe something is still wrong with it ? Ps: coreutils is already installed and up to date.

I'm just trying to use the default yolov5s or yolov5n models given by the yolov5 repo, and not a specific trained one. Hence, if you're not able to solve the problem, I would be very happy with the yolov5s.wts or yolov5n.wts that works :)

Thank you in advance for any kind of help

My problem is the version, then I use the old one.But I didn't try the newest. If you use the default yolo5,download the newest deepstream-yolo and install all the packages(check one by one). When generate the wts file, it should just print YOLOv5 2022-5-16 Python-3.8.13…… Good luck!

EdouardEPFL commented 2 years ago

I obtain the exact same error using the last gen_wts_yoloV5.py maybe something is still wrong with it ? Ps: coreutils is already installed and up to date. I'm just trying to use the default yolov5s or yolov5n models given by the yolov5 repo, and not a specific trained one. Hence, if you're not able to solve the problem, I would be very happy with the yolov5s.wts or yolov5n.wts that works :) Thank you in advance for any kind of help

My problem is the version, then I use the old one.But I didn't try the newest. If you use the default yolo5,download the newest deepstream-yolo and install all the packages(check one by one). When generate the wts file, it should just print YOLOv5 2022-5-16 Python-3.8.13…… Good luck!

Would it be possible to send me the old one ? Because I already have the configuration that you suggest i.e "the newest deepstream-yolo" but I still have the same error.

Thank you in advance

formerlya commented 2 years ago

Of course. What's your email address? @EdouardEPFL

EdouardEPFL commented 2 years ago

edouard.deponnat "arobase" epfl.ch

Thank you very much

Ps: I wrote arobase for @ to avoid to get spam botted by automatic mail bot searchers, in case you wonder why

formerlya commented 2 years ago

edouard.deponnat@epfl.ch? I searched that the epfl.ch is your college. Have you received the file? My pleasure.

EdouardEPFL commented 2 years ago

edouard.deponnat@epfl.ch? I searched that the epfl.ch is your college. Have you received the file? My pleasure.

You're right, I confirm that I received the file. Thank you again !

marcoslucianops commented 2 years ago

There's a cat command in the end of the gen_wts file. You need to install the package to run code without issues.

dingyan-dy commented 2 years ago

edouard.deponnat@epfl.ch? I searched that the epfl.ch is your college. Have you received the file? My pleasure.

I obtain the exact same error using the last gen_wts_yoloV5.py ,Would it be possible to send me the old one ? very thanks

marcoslucianops commented 2 years ago

Run sudo apt install --reinstall coreutils to install cat commandm, then convert you model again using the gen_wts.