Inference output not able to save in the output directory- (Detectnet_v2)

Docker_tag:–> v3.21.08-py3
Network Type → detectnet_v2
Training spec file →
t_spec.txt (4.1 KB)
Inference Spec file →
inference_spec.txt (1.4 KB)

Hi,

I am trying to run inference by using below command but the output images not able to save in the output directory :-

Inference command →

tao detectnet_v2 inference -e “/workspace/tao-experiments/specs/inference_file.txt” -i “/workspace/tao-experiments/images/” -o “workspace/tao-experiments/results/” -k tlt_encode

Terminal inference l0g →


Layer (type) Output Shape Param #

input_1 (InputLayer) (None, 3, 544, 960) 0


model_1 (Model) [(None, 2, 34, 60), (None 22243146

Total params: 22,243,146
Trainable params: 22,210,890
Non-trainable params: 32,256


2022-03-07 04:15:01,782 [INFO] main: Initialized model
2022-03-07 04:15:01,783 [INFO] main: Commencing inference
100%|███████████████████████████████████████████████████████████████| 37/37 [01:22<00:00, 2.23s/it]
2022-03-07 04:16:24,170 [INFO] main: Inference complete
2022-03-07 09:46:26,170 [INFO] tlt.components.docker_handler.docker_handler: Stopping container.

Please make sure

  • the path is correct
  • the folder has privilege for write access.

in inference command I can save output images in any of the directory right?.

results directory is present, do u think I am making mistake in the below inference command.

Inference command →
tao detectnet_v2 inference -e “/workspace/tao-experiments/specs/inference_file.txt” -i “/workspace/tao-experiments/images/” -o “workspace/tao-experiments/results/” -k tlt_encode

Please remove all the double quotation marks and retry.

tao detectnet_v2 inference -e  /workspace/tao-experiments/specs/inference_file.txt  -i  /workspace/tao-experiments/images  -o  /workspace/tao-experiments/results  -k tlt_encode

Also , I find that you are missing one “/”.

I tried without using quotes but unable to get the output images and where exactly I am missing one “/” in training command?

-o “workspace/tao-experiments/results/” should be
-o “/workspace/tao-experiments/results”

tao detectnet_v2 inference -e /workspace/tao-experiments/specs/inference_file.txt -i /workspace/tao-experiments/images -o workspace/tao-experiments/results -k tlt_encode

still I am not able to get output images after inference command completed.

Hi, Yeah I am able to get the output images now by using exactly this command.

Inference command :-
tao detectnet_v2 inference -e /workspace/tao-experiments/specs/inference_file.txt -i /workspace/tao-experiments/images -o /workspace/tao-experiments/results -k tlt_encode

I got two folders named as images_annotated and labels in the results directory but when I open one images from images_annotated folder bounding box is there but the class is not predicted. I want bounding boxes along with the predicted class name.

So, In order to get the bounding box along with the class name what exactly I need to do?

The labels folder has the class name for each bbox.

so it is behaving differently if I compare with the yolov4 output. here I got labels seperately and in yolov4 output images comes with bbox along the the predicted class name written on the bbox.

is there any option in detectnet_v2 through which I can get the class name in the bbox also?

Yes, for detectnet_v2, additional work is expected here.

is there any way in detectnet_v2 through which I can get the class name in the bbox also just like in yolo?

Based on the bboxes, you can draw class name to the annotated images.

Or you can run with deepstream. It will print the label.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.