Namespace(batch_size=1, height=300, input=‘’, labels=‘labels.txt’, model_dir=‘models/drugs’, net=‘ssd-mobilenet’, output=‘’, width=300)
Hi @AnamikaPaul, you may see this error when the number of classes in the labels file doesn’t match the number of classes that the model was trained with.
Can you use the --labels=models/drugs/labels.txt
argument when running onnx_export.py?
Thanks for quick response , I tried, still shows the same error.
Can you paste the contents of your models/drugs/labels.txt
file here?
It should have BACKGROUND
as the first class. This background class gets added by train_ssd.py when you train the model. Hence if your original labels.txt from your dataset has 10 classes, then the version of labels.txt that gets saved with your model by train_ssd.py should have 11 classes.
I was able to convert my model into onnx but when i run the next command i found error again. yes i have a background as a first class in models/drugs/labels.txt
root@anamika-desktop:/jetson-inference/python/training/detection/ssd# detectnet --model=models/drugs/ssd-mobilenet.onnx labels=models/drugs/labels.txt --input-blob=input_0 --output-cvg=scores --output-bbox=boxes /dev/video0
> listDir(‘/usr/local/bin/labels=models/drugs/labels.txt’) - found no matches
> [image] imageLoader – failed to find ‘labels=models/drugs/labels.txt’
> detectnet: failed to create input stream
i missed to put – before labels, sorry about that
Hi dusty, thanks for your help. Now it doesnt start the camera shows error below
[TRT] Could not register plugin creator - ::FlattenConcat_TRT version 1
it took some time but worked at last. Thanks for the help.
Hi @AnamikaPaul, sorry for the delay - glad to hear that you got it working!