yolov8训练自己的关键点检测模型

参考:
https://blog.csdn.net/weixin_38807927/article/details/135036450

标注数据集

安装labelme

pip install labelme -i https://pypi.tuna.tsinghua.edu.cn/simple

如果报错

$ labelme
2024-01-31 03:16:20,636 [INFO   ] __init__:get_config:67- Loading config file from: /home/diyun/.labelmerc
QObject::moveToThread: Current thread (0x56471fd8b1e0) is not the object's thread (0x564721420cb0).
Cannot move to target thread (0x56471fd8b1e0)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/diyun/anaconda3/envs/pytorch_gpu/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.


原因是pyqt5版本过高导致,指定版本:5.12.0

pip uninstall pyqt5
pip install pyqt5==5.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

先取消“保存图片数据”(减少标注文件大小);在文件下yolov8训练自己的关键点检测模型_第1张图片

创建labels.txt文件,内存放物体类别名称与关键点名称

cd /media/diyun/T9/diyun/10_train_data/9_Chinese_chess/key_point/24_0125_train_184
touch label.txt
__ignore__
_background_
checkerboard
point_0
point_1
point_2
point_3

进入创建的labels.txt存在的文件夹下,输入以下命令打开labelme

labelme --labels labels.txt

鼠标点击右键,出现菜单栏,选择Create Retctangle,将需要检测的物体用矩形框框起来,然后给矩形框命名,点击弹出的框里面的命名,然后点击OK,Group ID可根据自己具体需求进行处理。


右键出现菜单栏,点击Create Point ,然后左键点击需要标注的位置并命名,随后点击OK。

你可能感兴趣的:(深度学习,YOLO)