AttributeError: 'Detections' object has no attribute 'imgs'
mayankclassy opened this issue · comments
Traceback (most recent call last):
File "C:\Users\Mayank\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\Mayank\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\Mayank\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1517, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\Mayank\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1503, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "E:\Downloadsnew\Downloads\yolov5-flask-master\yolov5-flask-master\webapp.py", line 38, in predict
for img in results.imgs:
Encountered the same problem
try this for img in results.render(): instead of for img in results.imgs: