Replies: 1 comment
-
@Zzcloudz hello! It looks like you're encountering a To resolve this issue, please ensure that 'CBAM' is correctly implemented and accessible in the model's definition. If 'CBAM' is a custom module, you need to make sure it is properly defined and registered in the codebase so that it can be recognized when the model configuration is parsed. If 'CBAM' is intended to be a part of the YOLOv8 architecture, double-check the YAML configuration file for any typos or errors in the module definition. Also, verify that your environment is up-to-date with the latest version of the Ultralytics YOLOv8 repository, as updates may include fixes or additional modules. For further guidance on model configuration and custom module integration, please refer to the documentation at https://docs.ultralytics.com. If the issue persists, consider opening an issue on the GitHub repository with detailed information about your setup and the steps you've taken so far, and the team will be happy to assist you. 🛠️ |
Beta Was this translation helpful? Give feedback.
-
File "D:\anaconda3\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "D:\anaconda3\Scripts\yolo.exe_main.py", line 7, in
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\cfg_init_.py", line 371, in entrypoint
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\cfg_init_.py", line 371, in entrypoint
model = YOLO(model, task=task)
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\engine\model.py", line 105, in init
model = YOLO(model, task=task)
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\engine\model.py", line 105, in init
self._new(model, task)
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\engine\model.py", line 138, in _new
File "D:\anaconda3\lib\site-packages\ultralytics\yolo\engine\model.py", line 138, in _new
self.model = TASK_MAP[self.task][0](cfg_dict, verbose=verbose and RANK == -1) # build model
File "D:\anaconda3\lib\site-packages\ultralytics\nn\tasks.py", line 231, in init
self.model, self.save = parse_model(deepcopy(self.yaml), ch=ch, verbose=verbose) # model, savelist
File "D:\anaconda3\lib\site-packages\ultralytics\nn\tasks.py", line 621, in parse_model
m = getattr(torch.nn, m[3:]) if 'nn.' in m else globals()[m] # get module
KeyError: 'CBAM'
use CBAM in yolov8
yolo task=detect mode=train model=D:\ultralytics-main\ultralytics\datasets\yolov8_ca.yaml data=D:\ultralytics-main\ultralytics\datasets\mydata.yaml epochs=100 imgsz=640 workers=4 batch=24 resume=true
Beta Was this translation helpful? Give feedback.
All reactions