diff --git a/convert/README.md b/tools/README.md similarity index 95% rename from convert/README.md rename to tools/README.md index 1e9adda..05fbdbb 100644 --- a/convert/README.md +++ b/tools/README.md @@ -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. ``` (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:///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! - \ No newline at end of file + diff --git a/convert/label_to_csv.py b/tools/label_to_csv.py old mode 100644 new mode 100755 similarity index 100% rename from convert/label_to_csv.py rename to tools/label_to_csv.py