记录首次使用yolov8-obb

1.数据格式

之前使用的数据格式是yolov5_obb的数据格式,然后需要转数据格式:

目前的数据只支持四个坐标点标注的数据,参考:If a corner of the rotate rectangle is out of the image range, How to annotate the image? · Issue #7581 · ultralytics/ultralytics · GitHub

. YOLOv8 does not accept more than four points for a single object's annotation 

数据格式转换为:

label_index x0 y0 x1 y1 x2 y2 x3 y3 

数据不完整怎样进行数据标注:

If a corner of the rotate rectangle is out of the image range, How to annotate the image? · Issue #7581 · ultralytics/ultralytics · GitHub

 2.训练环境的配置遇到的问题

1)

subprocess.CalledProcessError: Command '['/opt/conda/bin/python', '-m', 'torch.distributed.launch', '--nproc_per_node', '2', '--master_port', '44569', '/root/.config/Ultralytics/DDP/_temp_dutx5q5j140559331981920.py']' returned non-zero exit status 1.

解决办法:

终端输入:

export MKL_THREADING_LAYER=GNU

2)

ModuleNotFoundError: No module named 'ultralytics'

解决办法,安装依赖库:

pip install ultralytics

3)

ile "/opt/conda/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

解决办法:

apt-get install
apt-get install libglib2.0-dev

3.训练代码:

from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-obb.yaml')  # build a new model from YAML
model = YOLO('./yolov8n-obb.pt')
# results = model.train(data='carddet.yaml', epochs=100, imgsz=640)
results = model.train(data='carddet.yaml', epochs=400, imgsz=640)

  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

猫猫与橙子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值