seanavery / yolov5-tensorrt

YOLOv5 in TensorRT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'NoneType' object has no attribute 'shape'

abuelgasimsaadeldin opened this issue · comments

commented

My environment:

  • Jetson Nano with JetPack 4.5
  • OS: Ubuntu 18.04
  • Cuda version: 10.2
  • TensorRT version: 7.1.3

Hi @seanavery thank you for this amazing repo, I ran into this error when trying to run the demo script using the following command python3 demo.py --image=inputs/ --model yolov5s.trt:

skymind@skymind:~/yolov5-tensorrt-sean/python/lib$ python3 demo.py --image=inputs/ --model yolov5s.trt
trtbin /home/skymind/yolov5-tensorrt-sean/python/lib/models/yolov5s.trt
image arg inputs/
Traceback (most recent call last):
  File "demo.py", line 49, in <module>
    main()   
  File "demo.py", line 29, in main
    output = processor.detect(img) 
  File "/home/skymind/yolov5-tensorrt-sean/python/lib/Processor.py", line 61, in detect
    shape_orig_WH = (img.shape[1], img.shape[0])
AttributeError: 'NoneType' object has no attribute 'shape'

Any help or suggestion would be highly appreciated.