Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL authored Oct 24, 2023
1 parent ce11e3d commit e7fb920
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions content/docs/SupportConversions/coco_to_labelimg.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ publishdate: "2022-09-30T05:33:22+01:00"
---

- One-click conversion of COCO format data to labelImg labeled yolo format data.
- COCO format directory structure(see `dataset/YOLOV5_COCO_format` for details):
- COCO format directory structure(see `dataset/COCO_format` for details):
```text {linenos=table}
YOLOV5_COCO_format
COCO_format
├── annotations
│ ├── instances_train2017.json
│ └── instances_val2017.json
Expand All @@ -25,16 +25,16 @@ publishdate: "2022-09-30T05:33:22+01:00"
```
- Convert
```bash {linenos=table}
coco_to_labelImg --data_dir dataset/YOLOV5_COCO_format
coco_to_labelImg --data_dir dataset/COCO_format
```
- `--data_dir`: the directory where the COCO format dataset is located. Default is `dataset/YOLOV5_COCO_format`.
- Converted directory structure (see `dataset/COCO_labelImg_format` for details):
- `--data_dir`: the directory where the COCO format dataset is located. Default is `dataset/COCO_format`.
- Converted directory structure (see `dataset/labelImg_format` for details):
```text {linenos=table}
COCO_labelImg_format
labelImg_format
├── train
│ ├── 000000000001.jpg
│ ├── 000000000001.txt
|-- 000000000002.jpg
├── 000000000002.jpg
│ └── classes.txt
└── val
├── 000000000001.jpg
Expand All @@ -43,7 +43,7 @@ publishdate: "2022-09-30T05:33:22+01:00"
```
- For the converted directory, you can directly use the [labelImg](https://github.com/tzutalin/labelImg) library to open it directly and change the label. The specific commands are as follows:
```bash {linenos=table}
$ cd dataset/COCO_labelImg_format
$ cd dataset/labelImg_format
$ labelImg train train/classes.txt

# or
Expand Down
4 changes: 2 additions & 2 deletions content/docs/SupportConversions/coco_visual.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ publishdate: "2022-09-30T05:33:22+01:00"

```bash {linenos=table}
coco_visual --vis_num 1 \
--json_path dataset/YOLOV5_COCO_format/annotations/instances_train2017.json \
--img_dir dataset/YOLOV5_COCO_format/train2017
--json_path dataset/COCO_format/annotations/instances_train2017.json \
--img_dir dataset/COCO_format/train2017
```

- `--vis_num`: specify the index of the image to be viewed
Expand Down
8 changes: 4 additions & 4 deletions content/docs/SupportConversions/labelimg_to_publaynet.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ publishdate: "2022-09-30T05:33:22+01:00"
```bash {linenos=table}
labelImg_to_publaynet --data_dir dataset/labelImg_dataset \
--val_ratio 0.2 \
--have_test true \
--have_test \
--test_ratio 0.2
```
- `--data_dir`: the directory where labelImg is stored after labeling.
- `--val_ratio`: the ratio of the generated validation set to the whole data, default is `0.2`.
- `--have_test`: whether to generate the test part of the data, the default is `True`.
- `--have_test`: whether to generate the test part of the data, the default is `False`. If this parameter appears, it is `True`.
- `--test_ratio`: percentage of the whole data of the test data, default is `0.2`.
- Converted directory structure (see `dataset/labelImg_dataset_publaynet` for details):
- Converted directory structure (see `dataset/publaynet_format` for details):
````text {linenos=table}
labelImg_dataset_publaynet
publaynet_format
├── test
│   ├── images5.jpg
│   └── images5.txt
Expand Down
4 changes: 2 additions & 2 deletions content/docs/SupportConversions/labelimg_to_yolov5.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ publishdate: "2022-09-30T05:33:22+01:00"
labelimg_to_yolov5 --src_dir dataset/labelImg_dataset \
--out_dir dataset/labelImg_dataset_output \
--val_ratio 0.2 \
--have_test true \
--have_test \
--test_ratio 0.2
```
- `--src_dir`: the directory where labelImg is stored after labeling.
- `--out_dir`: the location where the data is stored after conversion.
- `--val_ratio`: the ratio of the generated validation set to the whole data, default is `0.2`.
- `--have_test`: whether to generate the test part of the data, the default is `True`.
- `--have_test`: whether to generate the test part of the data, the default is `False`. If this parameter appears, it is `True`.
- `--test_ratio`: percentage of the whole data of the test data, default is `0.2`.
- Converted directory structure (see `dataset/labelImg_dataset_output` for details):
Expand Down
4 changes: 2 additions & 2 deletions content/docs/SupportConversions/yolov5_to_coco.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ publishdate: "2022-09-30T05:33:22+01:00"
- `--data_dir`: the directory where the collated dataset is located
- `--mode_list`: specify the generated json, provided that there is a corresponding txt file, which can be specified separately. (e.g. `train,val,test`)
- The structure of the converted directory (see `dataset/YOLOV5_COCO_format` for details)
- The structure of the converted directory (see `dataset/COCO_format` for details)
```text {linenos=table}
YOLOV5_COCO_format
COCO_format
├── annotations
│ ├── instances_train2017.json
│ └── instances_val2017.json
Expand Down

0 comments on commit e7fb920

Please sign in to comment.