欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > 名人名企 > label-studio 导入既有的yolo格式标注

label-studio 导入既有的yolo格式标注

2025/2/21 3:15:13 来源:https://blog.csdn.net/twicave/article/details/145683160  浏览:    关键词:label-studio 导入既有的yolo格式标注

这是新增识别物体训练前的一个预处理过程。你的额外标注要建立在模型已经具备的识别能力的基础上。

0.参考资料:

1.主要参考源:

Tutorial: Importing Local YOLO Pre-Annotated Images to Label Studio | Label Studio

2.备用的label-studio-converter文档: 

GitHub - HumanSignal/label-studio-converter: Tools for converting Label Studio annotations into common dataset formats


 

1.安装label转换工具

pip install label-studio-converter

2.将原有的coco数据集放在C:根目录下:例如:

2.1 classes.txt的内容为

classes的列表

person
bicycle
car  

2.2 image, labels不再拆分为训练和验证 

3.转换

注意,命令行中,images在classes.txt文件所在目录中单独列出,然后, -i的参数是 classes.txt所在目录。

C:\Users\twica>label-studio-converter import yolo -i /dataset/before_import -o output.json --image-root-url "/data/local
-files/?d=dataset/before_import/images"

INFO:root:Reading YOLO notes and categories from C:\dataset\before_import
INFO:root:Found 81 categories
INFO:root:Converting labels from C:\dataset\before_import\labels
INFO:root:image extensions->, ['.jpg']
INFO:root:Saving Label Studio JSON to C:\Users\twica\output.json

  1. Create a new project in Label Studio
  2. Use Labeling Config from "C:\Users\twica\output.label_config.xml"
  3. Setup serving for images
       E.g. you can use Local Storage (or others):
       https://labelstud.io/guide/storage.html#Local-storage
       See tutorial here:
https://github.com/HumanSignal/label-studio-converter/tree/master?tab=readme-ov-file#yolo-to-label-studio-converter

  4. Import "C:\Users\twica\output.json" to the project

4.导入

4.1 导入label-config

这个需要把output.label_config.xml,手工粘贴进来

4.2 设置工程的image src源


4.3 import

 4.4 导入后

 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词