PCB-Defect-Detection-using-Deepstream.Best.wts is not supported.Assertion '0' failed

I use Jetson P3450.I followed instructions for the deepsrteam isntallation on the jetson not on the dgpu.



As a result, i downloaded deepstream_sdk_v6.0.1_x86_64tbz2, because it was in the instruction for the installation of the deepstream on the Jetson.I am sorry, but i dont understand what did i do wrong and what should i do to fix that.Could you explain me, please ?

“noticing you are using Jetson GPU, please install Jetson version Deepstream. deepstream_sdk_v6.0.1_x86_64tbz2 is for DGPU.”

If deepstream_sdk_v6.0.1_x86_64tbz2 is for the DGPU Method2 in this instruction for the Jetson setup is incorrect ?If so, where can i find correct insturction ?

which website are you referring to? as the screenshot shown, one is for Jetson installation. the other is for dgpu.
image

I got it.I wrote incorrect name of the instalaltion reporst. I didnt notice that until now.

(I wrote,that i installed deepstream_sdk_v6.0.1_x86_64tbz2, but in fact i installed deepstream_sdk_v6.0.1_jetson.tbz2.).

I am sorry for the disinformation and waste of time.Now i corrected my report.Lets start from it one more time.
(If it is possible. all previous messadges should be deleted, to prevent confusion)

1.Jetson P3450.
2.deepstream_sdk_v6.0.1_x86_64tbz2 (Downloaded the DeepStream tar package:
https://developer.nvidia.com/deepstream_sdk_v6.0.1_jetsontbz2)
3/4/5: I can get all necessary information by the command : sudo apt-cache show nvidia-jetpack right?

(I dont know why it shows multiple jetpack versions)

atlas@atlas-desktop:~$ sudo apt-cache show nvidia-jetpack
[sudo] password for atlas:
Sorry, try again.
[sudo] password for atlas:
Package: nvidia-jetpack
Version: 4.6.4-b39
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0), nvidia-cuda (= 4.6.4-b39), nvidia-tensorrt (= 4.6.4-b39), nvidia-nsight-sys (= 4.6.4-b39), nvidia-cudnn8 (= 4.6.4-b39), nvidia-opencv (= 4.6.4-b39), nvidia-container (= 4.6.4-b39), nvidia-visionworks (= 4.6.4-b39), nvidia-vpi (= 4.6.4-b39)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.4-b39_arm64.deb
Size: 29388
SHA256: adf7a6660f73cdc4f95bc15c48d8588688e3afa5ee18bfd5b3a3caa3a458aa02
SHA1: 5abbe0df74f71579c1a0ee30ab7c2c236e1bcdbb
MD5sum: ec293a56d17f2b2793448d621811330d
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.3-b17
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0), nvidia-cuda (= 4.6.3-b17), nvidia-tensorrt (= 4.6.3-b17), nvidia-nsight-sys (= 4.6.3-b17), nvidia-cudnn8 (= 4.6.3-b17), nvidia-opencv (= 4.6.3-b17), nvidia-container (= 4.6.3-b17), nvidia-vpi (= 4.6.3-b17)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.3-b17_arm64.deb
Size: 29368
SHA256: 694254a8667ebbf13852548bdd13a5b8ae61481ac059845b706398eefdcb9e01
SHA1: 67140fc8463ec61fd69352b225244b639c799edd
MD5sum: afa1382b6caded6b736d494fc481bab4
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.2-b5
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.2-b5), nvidia-opencv (= 4.6.2-b5), nvidia-cudnn8 (= 4.6.2-b5), nvidia-tensorrt (= 4.6.2-b5), nvidia-visionworks (= 4.6.2-b5), nvidia-container (= 4.6.2-b5), nvidia-vpi (= 4.6.2-b5), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.2-b5_arm64.deb
Size: 29378
SHA256: 925f4abff97e6024d86cff3b9e132e7c7554d05fb83590487381b7e925d5b2bb
SHA1: e3ef727e87df5c331aece34508c110d57d744fe9
MD5sum: 7cb2e387af41bc8143ac7b6525af7794
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.1-b110
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.1-b110), nvidia-opencv (= 4.6.1-b110), nvidia-cudnn8 (= 4.6.1-b110), nvidia-tensorrt (= 4.6.1-b110), nvidia-visionworks (= 4.6.1-b110), nvidia-container (= 4.6.1-b110), nvidia-vpi (= 4.6.1-b110), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.1-b110_arm64.deb
Size: 29366
SHA256: acfd9e75af780eab165361d61de4b4fe4974890864fe191060b402ac4c2f54d5
SHA1: a016568ac53705acc145a9f7e60505707bea259f
MD5sum: 79be976b184a8c885bd9169ea5b7fb7b
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

6.Issue type: Question.

7.Reproducing the issue:

1.Install the dependencies and the same Jetpack version (on the fresh Jeston nano sd card image):

sudo apt update
sudo apt install nvidia-jetpack

NVIDIA Developer

Get Started With Jetson Nano Developer Kit

Build practical AI applications, AI robots, and more.

2.Install Deepstream SDK by method 2.

(Quickstart Guide — DeepStream 6.0.1 Release documentation)

(GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models)

4.Download wts and cfg files from from here :

github.com

//github.com/clintonoduor/PCB-Defect-Detection-using-Deepstream/tree/main/Weights

5.Put them in the the DeepStream-Yolo folder

  1. Edit the config_infer_primary.txt file according to the model:

(Change the names of the cfg and wts files according to the downloaded wts and cfg files)

[property]
...
custom-network-config=best.cfg
model-file=best.weights
...
  1. 
    

deepstream-app -c deepstream_app_config.txt

how did you install Jetpack?

I did not see the command-line in the link, where did you get this?

I installed jetpack by these two commads on the fresh sd card.(It seems it was installed by the first one).


as the doc said “The following commands will install all other JetPack components that correspond to your version of Jetson Linux L4T”, that is why there are many Jetpack versions on your device. did you install deepstream SDK? can deeptream-test1 work? if yes, you can continue to test PCB-Defect-Detection-using-Deepstream above.

I could launch this sample /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264, so, it works.

I installed deesptream in the system by commands:

Download the DeepStream tar package: https://developer.nvidia.com/deepstream_sdk_v6.0.1_jetsontbz2

Navigated to the location of the downloaded DeepStream package and extracted and installed the DeepStream SDK:

$ sudo tar -xvf deepstream_sdk_v6.0.1_x86_64.tbz2 -C /
$ cd /opt/nvidia/deepstream/deepstream-6.0/
$ sudo ./install.sh
$ sudo ldconfig
After that, I could launch deepstream in the system by these commands:
cd /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1

make CUDA_VER=10.2

./deepstream-test1-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264.

OK. you can continue to test PCB-Defect-Detection-using-Deepstream above.

I dont know how to fix “wts is not supported” and i need help with that.
(First of all i don even know the source of the problem)

I installed https://developer.nvidia.com/deepstream_sdk_v6.0.1_jetsontbz2 on my jetson P3450.I could launch this sample /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264, so, it works.

Then, i do:

git clone GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
cd DeepStream-Yolo

  1. I took wts and cfg files from here: [ https://github.com/clintonoduor/PCB-Defect-Detection-using-Deepstream/tree/main/Weights ] and put them in the DeepStream-Yolo folder.

CUDA_VER=10.2 make -C nvdsinfer_custom_impl_Yolo

  1. I edited the config_infer_primary.txt file according to my model

deepstream-app -c deepstream_app_config.txt

As a result:

(best0 is the same to best from here: [ https://github.com/clintonoduor/PCB-Defect-Detection-using-Deepstream/tree/main/Weights ].I just changed the name of it everywhere)

I want to solve this error, but to do that i ,first of all, need to relize the source of the problem.Is problem associated with incorrect wts and cfg files or with something else ?

Could you, please, give me 100 % working cfg and wts files to check that ?

Or, could you try to launch the detection with the same cfg and wts files ?

[From here: [ https://github.com/clintonoduor/PCB-Defect-Detection-using-Deepstream/tree/main/Weights ]]

Or, maybe, you can give me other way to solve this error ?

I tested on Jetson with DS6.0. after set correct path of wts and cfg, I can’t reproduce your “*.wts is not supported”. here is the cfg and log.

custom-network-config=../Weights/best.cfg
model-file=../Weights/best.wts

PCB.txt (5.8 KB)

but there is a new error:
ERROR: [TRT]: 4: [layers.cpp::estimateOutputDims::1954] Error Code 4: Internal Error (route_49: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [256,80,80], Input 1 shape: [512,40,40])
deepstream-app: utils.cpp:147: int getNumChannels(nvinfer1::ITensor*): Assertion `d.nbDims == 3’ failed.
Aborted (core dumped)

config_infer_primary.txt (739 Bytes)

First fo all lets check config_infer_primary.txt file.Do you have the same ?(As far as i am concerned, i set correct path in this file)

(I put best0.cfg and best0.wts directly in the DeepStream-Yolo folder.)

please see my last comment. please correct custom-network-config and model-file setting.

To set correct path of wts and cfg I edited custom-network-config and model-file in the config_infer_primary.txt

according to this instruction:

As a result:

.image

(Inside of the config_infer_primary.txt , which was uploaded in my last reply)

please set the relative path of wts. are best0.wts in Weights directory or in the same path with config_infer_primary.txt?

It is located directly in the DeepStream-Yolo folder.I suppose, it is the same path with config_infer_primary.txt.
(I put wts adn cfg files in it, according to the instructions:

from here: GitHub - clintonoduor/PCB-Defect-Detection-using-Deepstream: PCB defect detection using deepstream & YoloV5)

So, should i put wts and cfg files in the Weights directory and change config_infer_primary.txt one more time instead ?

custom-network-config=…/Weights/best.cfg
model-file=…/Weights/best.wts

?

are you testing Darknet in PCB-Defect-Detection-using-Deepstream project? In PCB-Defect-Detection-using-Deepstream, you need to use the native model in Weights direcoty because this model can detect PCB. if you need to test Darknet, please test it in this code.

I didnt download anything form the darknet.I downloaded weights from here instead https://github.com/clintonoduor/PCB-Defect-Detection-using-Deepstream/tree/main/Weights
and put them directly in the DeepStream-Yolo folder.

(According to the: GitHub - clintonoduor/PCB-Defect-Detection-using-Deepstream: PCB defect detection using deepstream & YoloV5)

why did you download weights and put it to DeepStream-Yolo? why not test PCB-Defect-Detection-using-Deepstream which already has weights file. you only need to correct the weights path in config_infer_primary_yoloV5.txt.

I thought that the only way to test it is to download weights and put it to DeepStream-Yoloю.I didnt find any instruction about testing of the PCB-Defect-Detection-using-Deepstream .How can i test PCB-Defect-Detection-using-Deepstream?