image-processing - 如何为视网膜网络训练准备我的图像和注释?
问题描述
我按照本教程在 coco 数据集上训练对象检测模型。本教程包含一个下载和使用coco 数据集及其注释并将它们转换为TFRecord的步骤。
我需要使用自己的自定义数据进行训练,我使用labelimg工具进行了注释,该工具生成了包含 (w,h,xmin,ymin,xmax,ymax) 的图像的 xml 文件。
但是coco 数据集具有 JSON格式,带有用于创建TFRecord的图像分割字段。
训练 resnet、retinanet 是否必须进行分段?
那么,任何人都可以指导我从没有分段值的 XML 注释创建 JSON 注释的过程吗?
xml:
<annotation>
<folder>frames</folder>
<filename>83.jpg</filename>
<path>/home/tdadmin/Downloads/large/f/frames/83.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>640</width>
<height>480</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>person</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>246</xmin>
<ymin>48</ymin>
<xmax>350</xmax>
<ymax>165</ymax>
</bndbox>
</object>
</annotation>
解决方案
你现在做的有点像我之前做过的一个项目。所以我有一些建议给你。
当我训练我的 Mask RCNN 模型时,我使用了 VGG Image Annotator(你可以在 Google 上轻松找到它)。通过使用该工具,可以轻松创建 json 注释文件。然后将其插入您的训练中。
希望对您有所帮助。如果您仍有疑问,请随时对此发表评论。
罗文
推荐阅读
- html - 使用 BeautifulSoup4 从标签中获取标题属性
- asp.net - 使用必填字段验证器联系资源文件值
- node.js - Npm install 与本地依赖和 package-lock.json 抛出错误
- unit-testing - PowerMockito whenNew thenReturn 不工作
- .net - 带有 .net 框架的 gRPC 的 PEM 文件
- excel - 更改组中的复选框表单控件
- swift - 如何在 SwiftUI 中使用来自网络调用的数据填充 TextField?
- reactjs - 使用 formik 设置字段值以从外部按钮反应选择组件
- go - 处理上下文取消错误
- python - 如何使用我当前的 python 设置安装 NumPy 和 Pandas?