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

When running "python yolo/bgf/detect/train.py", I encountered the above problem. How to solve it? #10

Open
Kao404 opened this issue May 2, 2024 · 3 comments

Comments

@Kao404
Copy link

Kao404 commented May 2, 2024

Traceback (most recent call last):
File "yolo/bgf/detect/train.py", line 7, in
from ...nn.tasks import DetectionModel
ImportError: attempted relative import with no known parent package

@mkang315
Copy link
Owner

mkang315 commented May 6, 2024

Please try the absolute directory path:
from BGF-YOLO-main.nn.tasks import DetectionModel

@ngocnh22
Copy link

ngocnh22 commented Jul 5, 2024

Hello,
when I run with your comment. It appears like that.
from BGF-YOLO-main.nn.tasks import DetectionModel
^
SyntaxError: invalid syntax

how can I solve it?

@mkang315
Copy link
Owner

You may try to put our code in the folder of 'ultralytics' of YOLOv8 and replace all the import dependencies with ultralytics.xxx.xxxx. Our code was generated based on that of YOLOv8.

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

3 participants