XmlToTxt
ImageNet file xml format to Darknet text format
Install / Use
/learn @isabek/XmlToTxtREADME
XmlToTxt
ImageNet file xml format to Darknet text format. Works well with directories and subdirectories.
Installation
sudo pip install -r requirements.txt
Usage
python xmltotxt.py -c cls.txt -xml xml -out out
Mandatory arguments
-xml
Optional arguments
-c, -out
Example
Input xml file.
<annotation>
<filename>image-0000016.jpg</filename>
<size>
<width>1920</width>
<height>1080</height>
</size>
<object>
<name>sedan</name>
<bndbox>
<xmin>75</xmin>
<ymin>190</ymin>
<xmax>125</xmax>
<ymax>210</ymax>
</bndbox>
</object>
</annotation>
Output text file.
5 0.052083 0.185185 0.026042 0.018519
Motivation
I used Darknet for real-time object detection and classification. Sometimes you need to collect your own training dataset for train your model. I collected training dataset images and fine awesome tool for labeling images. But it generates xml files. So I needed to implement tool which translates from ImageNet xml format to Darknet text format. Also compatible with latest YOLOv5 by Ultralytics.
Related Skills
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
