Skip to content

Commit 858832d

Browse files
committed
docs(data): 数据集使用
1 parent 89fed19 commit 858832d

File tree

3 files changed

+47
-8
lines changed

3 files changed

+47
-8
lines changed

docs/index.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22

33
实现`YOLO_v1`算法
44

5-
## 数据集
6-
7-
使用`3`类定位数据集,参考[[数据集]Image Localization Dataset](https://blog.zhujian.life/posts/a2d65e1.html)
8-
9-
```
10-
{'cucumber': 63, 'mushroom': 61, 'eggplant': 62}
11-
```
12-
135
## 实现流程
146

157
1. 创建训练数据集

docs/数据集.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# 数据集
3+
4+
当前使用`3`类定位数据集,参考[[数据集]Image Localization Dataset](https://blog.zhujian.life/posts/a2d65e1.html)
5+
6+
```
7+
{'cucumber': 63, 'mushroom': 61, 'eggplant': 62}
8+
```
9+
10+
## 解析
11+
12+
下载数据集后,解压到`py/data`目录,得到`training_images`,其格式如下:
13+
14+
```
15+
。。。
16+
cucumber_4.xml eggplant_35.jpg mushroom_20.xml mushroom_7.jpg
17+
cucumber_50.jpg eggplant_35.xml mushroom_21.jpg mushroom_7.xml
18+
cucumber_50.xml eggplant_36.jpg mushroom_21.xml mushroom_8.jpg
19+
cucumber_51.jpg eggplant_36.xml mushroom_22.jpg mushroom_8.xml
20+
cucumber_51.xml eggplant_37.jpg mushroom_22.xml mushroom_9.jpg
21+
cucumber_52.jpg eggplant_37.xml mushroom_23.jpg mushroom_9.xml
22+
。。。
23+
```
24+
25+
每个图像都有对应的标注文件,使用`parse_location.py`将两者分离
26+
27+
```
28+
$ cd py/lib/data
29+
$ python parse_location.py
30+
```
31+
32+
最后在`/py/data/location_dataset`目录下得到`imgs``annotations`文件夹
33+
34+
```
35+
├── annotations
36+
│   ├── cucumber_10.xml
37+
│   ├── cucumber_11.xml
38+
│   ├── cucumber_12.xml
39+
。。。
40+
。。。
41+
└── imgs
42+
├── cucumber_10.jpg
43+
├── cucumber_11.jpg
44+
。。。
45+
。。。
46+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ extra_javascript:
3131
nav:
3232
- Home: index.md
3333
- 架构解析: '架构解析.md'
34+
- 数据集: '数据集.md'
3435
- log: log.md

0 commit comments

Comments
 (0)