roboflow / notebooks

Examples and tutorials on using SOTA computer vision models and techniques. Learn everything from old-school ResNet, through YOLO and object-detection transformers like DETR, to the latest models like Grounding DINO and SAM.
https://roboflow.com/models
5.29k stars 820 forks source link

Trouble with the custom model load Yolov8 #126

Closed alcarvalhox closed 1 year ago

alcarvalhox commented 1 year ago

Search before asking

Notebook name

!pip install ultralytics==8.0.20

!pip install ultralytics

from IPython import display display.clear_output()

import ultralytics ultralytics.checks()

from collections.abc import Iterable from ultralytics import YOLO

model = YOLO(f'{HOME}/runs/detect/train5/weights/best.pt') results = model.predict(source = '/content/drive/MyDrive/Yolo_V8/test/images', conf = 0.25)

Bug

I have a trouble with the custom model line code : " model = YOLO(f'{HOME}/runs/detect/train5/weights/best.pt') results = model.predict(source = '/content/drive/MyDrive/Yolo_V8/test/images', conf = 0.25) ' the following error occurs " AttributeError: Can't get attribute 'IterableSimpleNamespace' on <module 'ultralytics.yolo.utils' from '/usr/local/lib/python3.10/dist-packages/ultralytics/yolo/utils/init.py'>" someone can help i´ve tried some solutions but dont work until now. Tks !!!

Environment

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

👋 Hello @alcarvalhox, thank you for leaving an issue on Roboflow Notebooks.

🐞 Bug reports

If you are filing a bug report, please be as detailed as possible. This will help us more easily diagnose and resolve the problem you are facing. To learn more about contributing, check out our Contributing Guidelines.

If you require support with custom code that is not part of Roboflow Notebooks, please reach out on the Roboflow Forum or on the GitHub Discussions page associated with this repository.

💬 Get in touch

Do you have more questions about Roboflow that we haven't responded to yet? Feel free to ask them on the Roboflow Discuss forum. Our developer advocates and community team actively respond to questions there.

To ask questions about Notebooks, head over to the GitHub Discussions section of this repository.

SkalskiP commented 1 year ago

Hi, @alcarvalhox 👋🏻! Sorry for the late response. I was quite busy. It looks like this problem originates in the YOLOv8 code. I recommend opening a new issue in YOLOv8 repository. Maybe they will be able to help you.

I'm closing the issue for now, but feel free to reopen it if you won't get any help there.