You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: tools/README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# Convert the label files to CSV
1
+
# Additional tools
2
2
3
-
## Introduction
3
+
## Convert the label files to CSV
4
+
5
+
### Introduction
4
6
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).
5
7
6
8
`label_to_csv.py` can convert the `txt` or `xml` label files to csv file. The labels files should strictly follow to below structure.
7
9
8
-
## Structures
9
-
* Images
10
+
###Structures
11
+
* Images
10
12
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.
11
13
```
12
14
<bucket_name> (on the cloud storage)
@@ -21,7 +23,7 @@ To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), w
21
23
| ...
22
24
```
23
25
Note, URI of the `class1_01.jpg` is `gs://<bucket_name>/class1/class1_01.jpg`
24
-
* Labels
26
+
* Labels
25
27
There are four types of training data - `TRAINING`, `VALIDATION`, `TEST` and `UNASSIGNED`. To assign different categories, we should create four directories.
26
28
Inside each folder, users should create the class folders with the same name in cloud storage (see below structure).
27
29
```
@@ -33,22 +35,22 @@ To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), w
33
35
| | -- class2
34
36
| | | -- class2_01.txt (or .xml)
35
37
| | | ...
36
-
| | ...
38
+
| | ...
37
39
| -- VALIDATION
38
40
| | -- class1
39
41
| | | -- class1_02.txt (or .xml)
40
42
| | | ...
41
43
| | -- class2
42
44
| | | -- class2_02.txt (or .xml)
43
45
| | | ...
44
-
| | ...
46
+
| | ...
45
47
| -- TEST
46
48
| | (same as TRAINING and VALIDATION)
47
49
| -- UNASSIGNED
48
50
| | (same as TRAINING and VALIDATION)
49
51
```
50
-
51
-
## Usage
52
+
53
+
### Usage
52
54
53
55
To see the argument of `label_to_csv.py`,
54
56
```commandline
@@ -82,4 +84,4 @@ python label_to_csv.py \
82
84
```
83
85
84
86
The output file is `res.csv` by default. Afterwards, upload the csv file to the cloud storage and you can start training!
0 commit comments