# Additional tools
## Convert the label files to CSV
### Introduction
To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), we should prepare the specific csv files follow [this format](https://cloud.google.com/vision/automl/object-detection/docs/csv-format).
`label_to_csv.py` can convert the `txt` or `xml` label files to csv file. The labels files should strictly follow to below structure.
### Structures
* Images
To train the object detection tasks, all the images should upload to the cloud storage and access it by its name. All the images should stay in the **same buckets** in cloud storage. Also, different classes should have their own folder as below.
```
<bucket_name> (on the cloud storage)
| -- class1
| | -- class1_01.jpg
| | -- class1_02.jpg
| | ...
| -- class2
| | -- class2_01.jpg
| | -- class2_02.jpg
| | ...
| ...
```
Note, URI of the `class1_01.jpg` is `gs://<bucket_name>/class1/class1_01.jpg`
* Labels
There are four types of training data - `TRAINING`, `VALIDATION`, `TEST` and `UNASSIGNED`. To assign different categories, we should create four directories.
Inside each folder, users should create the class folders with the same name in cloud storage (see below structure).
```
labels (on PC)
| -- TRAINING
| | -- class1
| | | -- class1_01.txt (or .xml)
| | | ...
| | -- class2
| | | -- class2_01.txt (or .xml)
| | | ...
| | ...
| -- VALIDATION
| | -- class1
| | | -- class1_02.txt (or .xml)
| | | ...
| | -- class2
| | | -- class2_02.txt (or .xml)
| | | ...
| | ...
| -- TEST
| | (same as TRAINING and VALIDATION)
| -- UNASSIGNED
| | (same as TRAINING and VALIDATION)
```
### Usage
To see the argument of `label_to_csv.py`,
```commandline
python label_to_csv.py -h
```
```commandline
usage: label_to_csv.py [-h] -p PREFIX -l LOCATION -m MODE [-o OUTPUT]
[-c CLASSES]
optional arguments:
-h, --help show this help message and exit
-p PREFIX, --prefix PREFIX
Bucket of the cloud storage path
-l LOCATION, --location LOCATION
Parent directory of the label files
-m MODE, --mode MODE 'xml' for converting from xml and 'txt' for converting
from txt
-o OUTPUT, --output OUTPUT
Output name of csv file
-c CLASSES, --classes CLASSES
Label classes path
```
For example, if mine bucket name is **test**, the location of the label directory is **/User/test/labels**, the mode I choose from is **txt**, the output name and the class path is same as default.
```commandline
python label_to_csv.py \
-p test\
-l /User/test/labels \
-m txt
```
The output file is `res.csv` by default. Afterwards, upload the csv file to the cloud storage and you can start training!
没有合适的资源?快使用搜索试试~ 我知道了~
自动标注工具(适用于yolo系列所有数据集)
共115个文件
png:42个
py:29个
svg:9个
需积分: 5 3 下载量 98 浏览量
2022-10-06
22:29:06
上传
评论 1
收藏 6.3MB ZIP 举报
温馨提示
自动标注工具(适用于yolo系列所有数据集)
资源详情
资源评论
资源推荐
收起资源包目录
自动标注工具(适用于yolo系列所有数据集) (115个子文件)
test.512.512.bmp 257KB
setup.cfg 97B
.gitignore 405B
.gitignore 108B
.gitignore 9B
app.icns 8B
MANIFEST.in 300B
demo3.jpg 89KB
demo.jpg 57KB
臉書.jpg 747B
LICENSE 1KB
Makefile 520B
README.md 3KB
README.md 454B
issue_template.md 145B
demo5.png 3.09MB
demo4.png 2.71MB
app.png 31KB
prev.png 30KB
next.png 30KB
feBlend-icon.png 8KB
format_createml.png 4KB
resetall.png 4KB
close.png 3KB
verify.png 3KB
save-as.png 3KB
labels.png 2KB
color_line.png 2KB
fit.png 2KB
done.png 2KB
cancel.png 2KB
open.png 2KB
undo.png 2KB
undo-cross.png 2KB
quit.png 2KB
help.png 2KB
delete.png 1KB
color.png 1KB
fit-width.png 1KB
eye.png 1KB
save.png 1KB
zoom.png 1KB
objects.png 1KB
fit-window.png 1KB
zoom-in.png 1KB
edit.png 1KB
zoom-out.png 1KB
new.png 977B
format_voc.png 786B
file.png 765B
format_yolo.png 675B
copy.png 646B
light_reset.png 587B
light_darken.png 487B
light_lighten.png 477B
expert2.png 335B
expert1.png 278B
strings-ja-JP.properties 3KB
strings.properties 3KB
strings-zh-CN.properties 3KB
strings-zh-TW.properties 2KB
labelImg.py 70KB
canvas.py 28KB
label_to_csv.py 7KB
shape.py 7KB
pascal_voc_io.py 6KB
labelFile.py 6KB
yolo_io.py 5KB
test_io.py 4KB
create_ml_io.py 4KB
labelDialog.py 4KB
setup.py 3KB
utils.py 3KB
stringBundle.py 2KB
colorDialog.py 1KB
settings.py 1KB
toolBar.py 1KB
test_stringBundle.py 1KB
combobox.py 967B
lightWidget.py 964B
default_label_combobox.py 880B
hashableQListWidgetItem.py 784B
test_settings.py 782B
zoomWidget.py 780B
test_utils.py 723B
constants.py 668B
ustr.py 534B
test_qt.py 310B
__init__.py 76B
__init__.py 0B
resources.qrc 2KB
README.rst 11KB
README.jp.rst 7KB
README.zh.rst 6KB
HISTORY.rst 2KB
CONTRIBUTING.rst 83B
envsetup.sh 2KB
build-windows-binary.sh 882B
build-for-macos.sh 724B
build-for-pypi.sh 680B
共 115 条
- 1
- 2
小兮风
- 粉丝: 49
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2c60fbb3dt9ad50ed8864298eea1484b.MP4
- 基于yolov8+dlib实现视觉识别的安全驾驶监测系统部署到jetson NX平台源码+模型.zip
- Qt框架+OpenCV+动态爱心+编程教学+520
- 基于opencv+yolov8实现目标追踪及驻留时长统计源码.zip
- 水稻病害基于Yolov8算法优化目标检测识别与AI辅助决策python源码+模型+使用说明.zip
- 海尔618算价表_七海5.20_16.00xlsx(1)(2).xlsx
- WebCrawler.scr
- 【计算机专业毕业设计】大学生就业信息管理系统设计源码.zip
- YOLO 数据集:8种路面缺陷病害检测【包含划分好的数据集、类别class文件、数据可视化脚本】
- JAVA实现Modbus RTU或Modbus TCPIP案例.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0