70、训练yolov11-pose关键点训练、部署TensorRTNCNN部署昇腾310I Duo卡
基本思想:进行yolov11-pose关键点训练,进行简单记录,纯粹为了方便年使用查找
一、使用labelme 标注关键点进行数据集转换
import os
import json
bbox_class = {
'fish_tilapia':0
}
keypoint_class = [
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9',
'10', '11', '12'
]
# 设定文件夹路径
folder_path = r'/home/ubuntu/fish_data_mmpose/train'
files = os.listdir(folder_path)
for file in files:
print(file)
if file.endswith('.json'):
# 完整的文件路径
labelme_path = os.path.join(folder_path, file)
with open(labelme_path, 'r', encoding='utf-8') as f:
labelme = json.load(f)
img_width &