Segmentation from tutorial not working on TX2 inference

Hello,

I keep getting a tensor error on the Jetson TX2 when trying to run an inference at the segmentation part of the tutorial: [url]https://github.com/dusty-nv/jetson-inference#image-segmentation-with-segnet[/url]

The error is "failed to retrieve tensor for output ‘score_fr_21classes’ "

Here is a copy of the error and log: [url]Dropbox - IMG_2388.JPG - Simplify your life

I appreciate any help out there.

Thanks.

Hi,

It looks like you are using custom model.
Please check if there is a score_fr_21classes blob in your custom model.

Thanks.

I’m not sure what you mean. I followed the instructions from the tutorial exactly.

It works fine on the Host machine testing one image, and I can access Digits from the TX2 and it runs the one image test on the TX2 just fine as well.

It’s only when I run it from the console:

./segnet-console drone_0428.png output_0428.png \
--prototxt=$NET/deploy.prototxt \
--model=$NET/snapshot_iter_22610.caffemodel \
--labels=$NET/fpv-labels.txt \
--colors=$NET/fpv-deploy-colors.txt \
--input_blob=data \ 
--output_blob=score_fr

The --output_blob I tried both =score_fr and =score_fr_21classes and it gives me the same error as seen in the attached file.

Hi, due to the other messages in your output log (kernel weights has count 1 but N was expected), it looks like the model you trained may be corrupt somehow. However there are also several built-in pretrained segmentation models that you can try:

$./segnet-console drone_0428.png output_0428.png fcn-alexnet-aerial-fpv-720p

This command will run the pretrained segnet model which is downloaded with the repo instead of the one you trained. Does that work for you?

Also on your DIGITS system, are you using nvcaffe-0.15 as per the tutorial? Models trained with nvcaffe-0.16 or newer may be incompatible with TensorRT running on the Jetson.

That works perfectly fine.

I’m using nvcaffe16 as it was the latest one, which may be the issue. I just assumed if Nvidia released it it would be ok. I’ll definitely keep an eye out for that in the future. Is there a work-around yet you’re aware of?

The error is caused by a invisible typo. There is a space after the backslash on this line
–input_blob=data \

This causes the output_blob line to be ignored.

Remove the space and it all works fine.

Also FYI, the colors file has changed too. This is the new version

–colors=$NET/fpv-training-colors.txt \

Cheers
Peter

1 Like