mirror of
https://github.com/heartexlabs/labelImg.git
synced 2023-05-24 23:26:06 +03:00
move convert dir to tools dir
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
# Convert the label files to CSV
|
||||
# Additional tools
|
||||
|
||||
## Introduction
|
||||
## 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
|
||||
### 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)
|
||||
@@ -21,7 +23,7 @@ To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), w
|
||||
| ...
|
||||
```
|
||||
Note, URI of the `class1_01.jpg` is `gs://<bucket_name>/class1/class1_01.jpg`
|
||||
* Labels
|
||||
* 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).
|
||||
```
|
||||
@@ -33,7 +35,7 @@ To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), w
|
||||
| | -- class2
|
||||
| | | -- class2_01.txt (or .xml)
|
||||
| | | ...
|
||||
| | ...
|
||||
| | ...
|
||||
| -- VALIDATION
|
||||
| | -- class1
|
||||
| | | -- class1_02.txt (or .xml)
|
||||
@@ -41,14 +43,14 @@ To train the images on [Google Cloud AutoML](https://cloud.google.com/automl), w
|
||||
| | -- class2
|
||||
| | | -- class2_02.txt (or .xml)
|
||||
| | | ...
|
||||
| | ...
|
||||
| | ...
|
||||
| -- TEST
|
||||
| | (same as TRAINING and VALIDATION)
|
||||
| -- UNASSIGNED
|
||||
| | (same as TRAINING and VALIDATION)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Usage
|
||||
|
||||
To see the argument of `label_to_csv.py`,
|
||||
```commandline
|
||||
@@ -82,4 +84,4 @@ python label_to_csv.py \
|
||||
```
|
||||
|
||||
The output file is `res.csv` by default. Afterwards, upload the csv file to the cloud storage and you can start training!
|
||||
|
||||
|
||||
0
convert/label_to_csv.py → tools/label_to_csv.py
Normal file → Executable file
0
convert/label_to_csv.py → tools/label_to_csv.py
Normal file → Executable file
Reference in New Issue
Block a user