Directory inference classification_tf1 TAO5 is not working

Hi,
I am using classfication_tf1 (TAO 5) for a binary classification task.
When I infer just one image using the following commad, it runs successfuly and got the result:

tao model classification_tf1 inference -e tao-experiments/spec.txt -m tao-experiments/weights/model.hdf5 -cm tao-experiments/output/classmap.json -i tao-experiments/image.bmp

Wheras when I want to infer a directory of images using the following command:
tao model classification_tf1 inference -e tao-experiments/spec.txt -m tao-experiments/weights/model.hdf5 -cm tao-experiments/output/classmap.json -d tao-experiments/infer_dir

I got the following error :

Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/inference.py”, line 374, in
main()
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py”, line 717, in return_func
raise e
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py”, line 705, in return_func
return func(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/inference.py”, line 370, in main
raise e
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/inference.py”, line 358, in main
inference(args)
File “/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/inference.py”, line 306, in inference
s_logger.write(
UnboundLocalError: local variable ‘s_logger’ referenced before assignment
Execution status: FAIL

PS: inference -d used to work in TAO 4

1 Like

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

I cannot reproduce the issue. The folder inference works well.
Please double check the files in your tao-experiments/infer_dir.

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