Open mcyhaha opened 2 months ago
It seems like you modified the code and broke it. This is not there in the official ultralytics:
File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\pose\train.py", line 74, in from ultralytics import YOLO
There's no from ultralytics import YOLO
at that line.
I added this myself. Will deleting this sentence fix it?
C:\Users\mcy\anaconda3\envs\face_env\python.exe D:/dlcode/STF-YOLO-main/ultralytics/models/yolo/pose/train.py
Traceback (most recent call last):
File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\pose\train.py", line 5, in
进程已结束,退出代码1 I deleted 74 lines of code, and there are errors in other lines How can this be solved?
Why did you add that code there? It's broken. You still have the code in line 5.
from ultralytics import YOLO This line of code, if not added, YOLO reports an error
It seems like there's a circular import issue. Ensure you're using the latest version of the package and check your import structure to avoid conflicts.
Traceback (most recent call last):
File "D:\dlcode\ultralytics-main\ultralytics-main\ultralytics\models\yolo\pose\train.py", line 85, in
KeyError: 'pose'
Hello, I am now using the new version, after adding ghost module running this error, how to solve it?
C:\Users\mcy\anaconda3\envs\face_env\python.exe D:/yolov8_pose/train_yolo.py
Traceback (most recent call last):
File "D:\yolov8_pose\train_yolo.py", line 5, in
KeyError: 'pose'
how to solve it?
It seems like there's a KeyError related to the 'pose' module. Please ensure your custom module is correctly defined and integrated into the codebase. Also, verify that you're using the latest version of the Ultralytics package. If the issue persists, consider checking the module's implementation for any discrepancies.
Search before asking
Question
C:\Users\mcy\anaconda3\envs\face_env\python.exe D:/dlcode/STF-YOLO-main/ultralytics/models/yolo/pose/train.py Traceback (most recent call last): File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\pose\train.py", line 5, in
from ultralytics.models import yolo
File "D:\dlcode\STF-YOLO-main\ultralytics__init.py", line 5, in
from ultralytics.models import RTDETR, SAM, YOLO
File "D:\dlcode\STF-YOLO-main\ultralytics\models\ init.py", line 3, in
from .rtdetr import RTDETR
File "D:\dlcode\STF-YOLO-main\ultralytics\models\rtdetr\ init.py", line 3, in
from .model import RTDETR
File "D:\dlcode\STF-YOLO-main\ultralytics\models\rtdetr\model.py", line 9, in
from .train import RTDETRTrainer
File "D:\dlcode\STF-YOLO-main\ultralytics\models\rtdetr\train.py", line 7, in
from ultralytics.models.yolo.detect import DetectionTrainer
File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\ init.py", line 3, in
from ultralytics.models.yolo import classify, detect, pose, segment
File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\pose\ init.py", line 4, in
from .train import PoseTrainer
File "D:\dlcode\STF-YOLO-main\ultralytics\models\yolo\pose\train.py", line 74, in
from ultralytics import YOLO
ImportError: cannot import name 'YOLO' from partially initialized module 'ultralytics' (most likely due to a circular import) (D:\dlcode\STF-YOLO-main\ultralytics\ init__.py)
进程已结束,退出代码1
Additional
How is this supposed to work? It's been bothering me for so long