Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Annotator' object has no attribute 'draw' #2

Open
vigyanabikshu1 opened this issue Mar 13, 2024 · 0 comments
Open

Comments

@vigyanabikshu1
Copy link

vigyanabikshu1 commented Mar 13, 2024

Thank you very much for your excellent tutorial. I am getting the below error while running predictWithOCR.py with my own roboflow model
May be some problem with video

video 1/1 (2369/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 1 headsign, 1 numberplate, 10.8ms
video 1/1 (2370/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 1 headsign, 1 numberplate, 10.7ms
video 1/1 (2371/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 1 headsign, 1 numberplate, 16.9ms
video 1/1 (2372/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 1 headsign, 1 numberplate, 10.7ms
video 1/1 (2373/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 2 headsigns, 1 numberplate, 12.1ms
video 1/1 (2374/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 2 headsigns, 1 numberplate, 11.3ms
video 1/1 (2375/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 2 headsigns, 1 numberplate, 10.6ms
video 1/1 (2376/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 1 headsign, 1 numberplate, 13.7ms
video 1/1 (2377/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 12.2ms
video 1/1 (2378/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 10.9ms
video 1/1 (2379/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 11.7ms
video 1/1 (2380/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 2 headsigns, 1 numberplate, 19.4ms
video 1/1 (2381/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 3 headsigns, 1 numberplate, 10.9ms
video 1/1 (2382/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 2 headsigns, 1 numberplate, 12.4ms
video 1/1 (2383/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 14.6ms
video 1/1 (2384/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 22.8ms
video 1/1 (2385/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 15.0ms
video 1/1 (2386/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 2 headsigns, 1 numberplate, 14.0ms
video 1/1 (2387/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 2 busnames, 2 headsigns, 1 numberplate, 18.3ms
video 1/1 (2388/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 2 headsigns, 1 numberplate, 20.1ms
video 1/1 (2389/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 2 headsigns, 1 numberplate, 12.6ms
video 1/1 (2390/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 3 headsigns, 1 numberplate, 19.2ms
video 1/1 (2391/6022) /content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi: 384x640 1 bus, 1 busname, 1 headsign, 1 numberplate, 13.6ms
Error executing job with overrides: ['model=/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/parroteye.pt', 'source=/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/20230808181710536.avi']
Traceback (most recent call last):
File "/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/predictWithOCR.py", line 112, in predict
predictor()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/ultralytics/yolo/engine/predictor.py", line 189, in call
s += self.write_results(i, preds, (p, im, im0s))
File "/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/predictWithOCR.py", line 95, in write_results
self.annotator.box_label(xyxy, label, color=colors(c, True))
File "/content/Licence-Plate-Detection-and-Recognition-using-YOLO-V8-EasyOCR/ultralytics/yolo/utils/plotting.py", line 61, in box_label
self.draw.rectangle(box, width=self.lw, outline=color) # box
AttributeError: 'Annotator' object has no attribute 'draw'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant