Closed SAIL-LAB155 closed 1 year ago
Can you run mkdir ../training/classification/data/cat_dog/test/test_cat_result
first?
Yes, I have created the folder before evaluating. But this error still occurs. The following information is shown below.
hkuit155@hkuit155-desktop:~/jetson-inference/python/examples$ mkdir ../training/classification/data/cat_dog/test/test_cat_result mkdir: cannot create directory ‘../training/classification/data/cat_dog/test/test_cat_result’: File exists hkuit155@hkuit155-desktop:~/jetson-inference/python/examples$ python3 imagenet.py --model=../training/classification/models/cat_dog/resnet18.onnx --input_blob=input_0 --output_blob=output_0 --labels=../training/classification/data/cat_dog/labels.txt ../training/classification/data/cat_dog/test/cat ../training/classification/data/cat_dog/test/test_cat_result jetson.inference -- imageNet loading network using argv command line params
imageNet -- loading classification network model from: -- prototxt (null) -- model ../training/classification/models/cat_dog/resnet18.onnx -- class_labels ../training/classification/data/cat_dog/labels.txt -- input_blob 'input_0' -- output_blob 'output_0' -- batch_size 1
-- URI: file:///home/hkuit155/jetson-inference/python/examples/../training/classification/data/cat_dog/test/cat
-- URI: file:///home/hkuit155/jetson-inference/python/examples/../training/classification/data/cat_dog/test/test_cat_result
-- URI: display://0
[image] loaded '../training/classification/data/cat_dog/test/cat/01.jpg' (500x334, 3 channels)
class 0000 - 0.999999 (cat)
[OpenGL] glDisplay -- set the window size to 500x334
[OpenGL] creating 500x334 texture (GL_RGB8 format, 501000 bytes)
[cuda] registered openGL texture for interop access (500x334, GL_RGB8, 501000 bytes)
[image] invalid extension format './training/classification/data/cat_dog/test/test_cat_result' saving image '../training/classification/data/cat_dog/test/test_cat_result'
[image] valid extensions are: JPG/JPEG, PNG, TGA, BMP.
[image] imageWriter -- failed to save '../training/classification/data/cat_dog/test/test_cat_result'
Traceback (most recent call last):
File "imagenet.py", line 79, in
Hi. After I trained a cat-dog classification model and was going to test a folder of images using the following command:
_python3 imagenet.py --model=../training/classification/models/cat_dog/resnet18.onnx --input_blob=input_0 --output_blob=output_0 --labels=../training/classification/data/cat_dog/labels.txt ../training/classification/data/cat_dog/test/cat ../training/classification/data/cat_dog/test/test_cat_result_
An error happened:
_[cuda] registered openGL texture for interop access (500x334, GL_RGB8, 501000 bytes) [image] invalid extension format './training/classification/data/cat_dog/test/test_cat_result' saving image '../training/classification/data/cat_dog/test/test_cat_result' [image] valid extensions are: JPG/JPEG, PNG, TGA, BMP. [image] imageWriter -- failed to save '../training/classification/data/cat_dog/test/test_catresult' Traceback (most recent call last): File "/usr/local/bin/imagenet.py", line 77, in
output.Render(img)
Exception: jetson.utils -- videoOutput failed to render image
The paths are right because I successfully in inferring images without assigning the output folder.