Describe your question/issue here! (delete this when you post)
I’m trying to use Yolov8-OBB on Roboflow, which is supported, but there’s a bunch of weird inconsistencies. Yolov8 works when I create a new version, download it, train locally, and upload, but if I try the same with OBB (which says is supported), it does not work.
See error below:
Traceback (most recent call last):
File “c:\Users\user\source\repos\project\train_yolov8_obb.py”, line 39, in
main()
File “c:\Users\user\source\repos\project\train_yolov8_obb.py”, line 19, in main
model = YOLO(“runs/obb/train21/weights/best.pt”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\ultralytics\engine\model.py”, line 97, in init
self._load(model, task)
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\ultralytics\engine\model.py”, line 149, in _load
self.model, self.ckpt = attempt_load_one_weight(weights)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\ultralytics\nn\tasks.py”, line 628, in attempt_load_one_weight
ckpt, weight = torch_safe_load(weight) # load ckpt
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\ultralytics\nn\tasks.py”, line 567, in torch_safe_load
return torch.load(file, map_location=‘cpu’), file # load
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\torch\serialization.py”, line 1097, in load
return _load(
^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\torch\serialization.py”, line 1525, in _load
result = unpickler.load()
^^^^^^^^^^^^^^^^
File “C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\torch\serialization.py”, line 1515, in find_class
return super().find_class(mod_name, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Can’t get attribute ‘OBBModel’ on <module ‘ultralytics.nn.tasks’ from ‘C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\project-AUXtvAGv-py3.11\Lib\site-packages\ultralytics\nn\tasks.py’>
Furthermore, there’s some weird inconsistencies on Roboflow with Yolov8-OBB and Yolov10, specifically if you select export and Yolov10, it shows the same code to export as yolov8:
It also doesn’t seem like “yolov8-obb” is a download format, even though it should be (?) - my guess is that yolov8 supports both yolov8 and yolov8-obb? Well, at least it should, because it doesn’t let you actually upload yolov8-obb.
- Project Type:
- Custom model training, using Roboflow for annotation
- Operating System & Browser:
- Windows 11 with 2080Ti GPU for training
- Project Universe Link or Workspace/Project ID:
- Sign in to Roboflow