mkang315 / BGF-YOLO

[MICCAI'24] Official implementation of "BGF-YOLO: Enhanced YOLOv8 with Multiscale Attentional Feature Fusion for Brain Tumor Detection".
GNU Affero General Public License v3.0
77 stars 12 forks source link

no module found #7

Open Ham-png opened 6 months ago

Ham-png commented 6 months ago

ModuleNotFoundError: No module named 'ultralytics.yolo'

Ham-png commented 6 months ago

Moreover,

File "/home/ubuntu/NoFileReplication/root/BGF-YOLO-1.1/nn/tasks.py", line 209, in init self.model, self.save = parse_model(deepcopy(self.yaml), ch=ch, verbose=verbose) # model, savelist File "/home/ubuntu/NoFileReplication/root/BGF-YOLO-1.1/nn/tasks.py", line 560, in parse_model elif m in (Detect, Segment, Pose, RTDETRDecoder): NameError: name 'Segment' is not defined

mkang315 commented 6 months ago

Thanks for pointing issues out. I've fixed the bugs you mentioned.

Ham-png commented 6 months ago

File "/home/ubuntu/SomethingNew/BGF-YOLO-1.2/nn/tasks.py", line 560, in parse_model elif m in (Detect, Segment, Pose, RTDETRDecoder): NameError: name 'Pose' is not defined

I'm also going to guess that RTDETRDecoder won't be defined either.

Ham-png commented 6 months ago

To give some context, I am changing all the paths to absolute imports and running python -m yolo.bgf.detect.train

mkang315 commented 6 months ago

File "/home/ubuntu/SomethingNew/BGF-YOLO-1.2/nn/tasks.py", line 560, in parse_model elif m in (Detect, Segment, Pose, RTDETRDecoder): NameError: name 'Pose' is not defined

I'm also going to guess that RTDETRDecoder won't be defined either.

Thank you very much! Some packages were omitted when changing the directories from the original YOLOv8 code.

mkang315 commented 6 months ago

To give some context, I am changing all the paths to absolute imports and running python -m yolo.bgf.detect.train

There were not bugs if not changing the original directory path of ultralytics. Thank you for your understanding.