Skip to content

add 13 new dataset converters #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6e3c404
add CTW, ICDAR2019-ArT, ReCTS, TextOCR, COCO-Text dataset converters
hadipash Jun 6, 2023
888941c
add lsvt, rctw17, mlt2019, mtwi2018, casia10k and sroie dataset convert
Jun 12, 2023
565c872
refactor MLT2019
hadipash Jun 12, 2023
fa5185e
small fixes
hadipash Jun 12, 2023
a4163e6
MTWI2018 fix
hadipash Jun 13, 2023
ee1c24b
small fixed
Jun 13, 2023
72c1a96
add Born-Digital dataset converter
ShahJahanIshaq Jun 14, 2023
ce443ae
update documentation for dataset converters
ShahJahanIshaq Jun 20, 2023
b65f8f7
add documentation for datasets
ShahJahanIshaq Jun 20, 2023
0e32067
Small fixes in documentation for datasets
ShahJahanIshaq Jun 20, 2023
35c3aad
small fix in documentation for ic19_art dataset
ShahJahanIshaq Jun 20, 2023
7b3c625
fix datasets documentation
ShahJahanIshaq Jun 23, 2023
788bd05
typo fix in datasets documentation
ShahJahanIshaq Jun 23, 2023
ec11cd3
add CCPD dataset converter and documentation
ShahJahanIshaq Jun 23, 2023
81f863b
MLT2019 import fix
hadipash Jun 23, 2023
bd3b3fb
fix docs
hadipash Jun 29, 2023
0e89086
add CTW, ICDAR2019-ArT, ReCTS, TextOCR, COCO-Text dataset converters
hadipash Jun 6, 2023
6d68255
add lsvt, rctw17, mlt2019, mtwi2018, casia10k and sroie dataset convert
Jun 12, 2023
862fa1a
refactor MLT2019
hadipash Jun 12, 2023
710ebd9
small fixes
hadipash Jun 12, 2023
c269a37
MTWI2018 fix
hadipash Jun 13, 2023
3a4097d
small fixed
Jun 13, 2023
8f6012e
add Born-Digital dataset converter
ShahJahanIshaq Jun 14, 2023
7c5ac2d
update documentation for dataset converters
ShahJahanIshaq Jun 20, 2023
4bcbe1d
add documentation for datasets
ShahJahanIshaq Jun 20, 2023
a666f5c
Small fixes in documentation for datasets
ShahJahanIshaq Jun 20, 2023
cc891a1
small fix in documentation for ic19_art dataset
ShahJahanIshaq Jun 20, 2023
a09bb57
fix datasets documentation
ShahJahanIshaq Jun 23, 2023
4fc4800
typo fix in datasets documentation
ShahJahanIshaq Jun 23, 2023
3f9a0c6
add CCPD dataset converter and documentation
ShahJahanIshaq Jun 23, 2023
c1bc2b2
MLT2019 import fix
hadipash Jun 23, 2023
508f023
fix docs
hadipash Jun 29, 2023
6eb2b57
fix ccpd and bdi
hadipash Jun 29, 2023
f752244
fix synthadd
hadipash Jun 29, 2023
23fd4be
add new dataset chinese readme
Jun 29, 2023
f6e1475
update
Jun 29, 2023
79e3940
small update
Jun 29, 2023
cf4da4d
small fix
Jun 29, 2023
6bc80a7
small fix
Jun 29, 2023
3e9d373
small fix
Jun 29, 2023
c2962dc
small fix
Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,28 @@ MindOCR provides a [dataset conversion tool](tools/dataset_converters) to OCR da
<details open markdown>
<summary>General OCR Datasets</summary>

- [x] [ICDAR2015](https://rrc.cvc.uab.es/?ch=4) [[paper](https://rrc.cvc.uab.es/files/short_rrc_2015.pdf)] [[download](docs/en/datasets/icdar2015.md)]
- [x] [Total-Text](https://github.com/cs-chan/Total-Text-Dataset/tree/master/Dataset) [[paper](https://arxiv.org/abs/1710.10400)] [[download](docs/en/datasets/totaltext.md)]
- [x] [Syntext150k](https://github.com/aim-uofa/AdelaiDet) [[paper](https://arxiv.org/abs/2002.10200)] [[download](docs/en/datasets/syntext150k.md)]
- [x] [MLT2017](https://rrc.cvc.uab.es/?ch=8&com=introduction) [[paper](https://ieeexplore.ieee.org/abstract/document/8270168)] [[download](docs/en/datasets/mlt2017.md)] (multi-language)
- [x] [MSRA-TD500](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)) [[paper](https://ieeexplore.ieee.org/abstract/document/6247787)] [[download](docs/en/datasets/td500.md)]
- [x] [SCUT-CTW1500](https://github.com/Yuliang-Liu/Curve-Text-Detector) [[paper](https://www.sciencedirect.com/science/article/pii/S0031320319300664)] [[download](docs/en/datasets/ctw1500.md)]
- [x] [Chinese-Text-Recognition-Benchmark](https://github.com/FudanVI/benchmarking-chinese-text-recognition) [[paper](https://arxiv.org/abs/2112.15093)] [[download](https://github.com/FudanVI/benchmarking-chinese-text-recognition#download)]
- [Born-Digital Images](https://rrc.cvc.uab.es/?ch=1) [[download](docs/en/datasets/borndigital.md)]
- [CASIA-10K](http://www.nlpr.ia.ac.cn/pal/CASIA10K.html) [[download](docs/en/datasets/casia10k.md)]
- [CCPD](https://github.com/detectRecog/CCPD) [[download](docs/en/datasets/ccpd.md)]
- [Chinese Text Recognition Benchmark](https://github.com/FudanVI/benchmarking-chinese-text-recognition) [[paper](https://arxiv.org/abs/2112.15093)] [[download](docs/en/datasets/chinese_text_recognition.md)]
- [COCO-Text](https://rrc.cvc.uab.es/?ch=5) [[download](docs/en/datasets/cocotext.md)]
- [CTW](https://ctwdataset.github.io/) [[download](docs/en/datasets/ctw.md)]
- [ICDAR2015](https://rrc.cvc.uab.es/?ch=4) [[paper](https://rrc.cvc.uab.es/files/short_rrc_2015.pdf)] [[download](docs/en/datasets/icdar2015.md)]
- [ICDAR2019 ArT](https://rrc.cvc.uab.es/?ch=14) [[download](docs/en/datasets/ic19_art.md)]
- [LSVT](https://rrc.cvc.uab.es/?ch=16) [[download](docs/en/datasets/lsvt.md)]
- [MLT2017](https://rrc.cvc.uab.es/?ch=8) [[paper](https://ieeexplore.ieee.org/abstract/document/8270168)] [[download](docs/en/datasets/mlt2017.md)]
- [MSRA-TD500](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)) [[paper](https://ieeexplore.ieee.org/abstract/document/6247787)] [[download](docs/en/datasets/td500.md)]
- [MTWI-2018](https://tianchi.aliyun.com/competition/entrance/231651/introduction) [[download](docs/en/datasets/mtwi2018.md)]
- [RCTW-17](https://rctw.vlrlab.net/) [[download](docs/en/datasets/rctw17.md)]
- [ReCTS](https://rrc.cvc.uab.es/?ch=12) [[download](docs/en/datasets/rects.md)]
- [SCUT-CTW1500](https://github.com/Yuliang-Liu/Curve-Text-Detector) [[paper](https://www.sciencedirect.com/science/article/pii/S0031320319300664)] [[download](docs/en/datasets/ctw1500.md)]
- [SROIE](https://rrc.cvc.uab.es/?ch=13) [[download](docs/en/datasets/sroie.md)]
- [SVT](http://www.iapr-tc11.org/mediawiki/index.php/The_Street_View_Text_Dataset) [[download](docs/en/datasets/svt.md)]
- [SynText150k](https://github.com/aim-uofa/AdelaiDet) [[paper](https://arxiv.org/abs/2002.10200)] [[download](docs/en/datasets/syntext150k.md)]
- [SynthText](https://www.robots.ox.ac.uk/~vgg/data/scenetext/) [[paper](https://www.robots.ox.ac.uk/~vgg/publications/2016/Gupta16/)] [[download](docs/en/datasets/synthtext.md)]
- [TextOCR](https://textvqa.org/textocr/) [[download](docs/en/datasets/textocr.md)]
- [Total-Text](https://github.com/cs-chan/Total-Text-Dataset/tree/master/Dataset) [[paper](https://arxiv.org/abs/1710.10400)] [[download](docs/en/datasets/totaltext.md)]

</details>

We will include more datasets for training and evaluation. This list will be continuously updated.
Expand Down
33 changes: 24 additions & 9 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ MindOCR基于MindSpore AI框架(支持CPU/GPU/NPU)开发,并适配以下
- mindspore >= 1.9 [[安装](https://www.mindspore.cn/install)]
- python >= 3.7
- openmpi 4.0.3 (for distributed training/evaluation) [[安装](https://www.open-mpi.org/software/ompi/v4.0/)]
- mindspore lite (for inference) [[安装](docs/en/inference/environment.md)]
- mindspore lite (for inference) [[安装](docs/cn/inference/environment.md)]

#### 包依赖

Expand Down Expand Up @@ -167,7 +167,7 @@ python tools/eval.py \

关于以上模型的具体训练方法和结果,请参见[configs](./configs)下各模型子目录的readme文档。

关于[MindSpore Lite](https://www.mindspore.cn/lite)和[ACL](https://www.hiascend.com/document/detail/zh/canncommercial/63RC1/inferapplicationdev/aclcppdevg/aclcppdevg_000004.html)模型推理的支持列表,请参见[MindOCR支持模型列表](docs/en/inference/models_list.md) and [第三方模型推理支持列表](docs/en/inference/models_list_thirdparty.md)(如PaddleOCR、MMOCR等)。
关于[MindSpore Lite](https://www.mindspore.cn/lite)和[ACL](https://www.hiascend.com/document/detail/zh/canncommercial/63RC1/inferapplicationdev/aclcppdevg/aclcppdevg_000004.html)模型推理的支持列表,请参见[MindOCR支持模型列表](docs/cn/inference/models_list.md) and [第三方模型推理支持列表](docs/cn/inference/models_list_thirdparty.md)(如PaddleOCR、MMOCR等)。

## 数据集列表

Expand All @@ -177,13 +177,28 @@ MindOCR提供了[数据格式转换工具](tools/dataset_converters) ,以支
<details open markdown>
<summary>通用OCR数据集</summary>

- [x] [ICDAR2015](https://rrc.cvc.uab.es/?ch=4) [[paper](https://rrc.cvc.uab.es/files/short_rrc_2015.pdf)] [[download](docs/cn/datasets/icdar2015.md)]
- [x] [Total-Text](https://github.com/cs-chan/Total-Text-Dataset/tree/master/Dataset) [[paper](https://arxiv.org/abs/1710.10400)] [[download](docs/en/datasets/totaltext.md)]
- [x] [Syntext150k](https://github.com/aim-uofa/AdelaiDet) [[paper](https://arxiv.org/abs/2002.10200)] [[download](docs/en/datasets/syntext150k.md)]
- [x] [MLT2017](https://rrc.cvc.uab.es/?ch=8&com=introduction) [[paper](https://ieeexplore.ieee.org/abstract/document/8270168)] [[download](docs/en/datasets/mlt2017.md)] (multi-language)
- [x] [MSRA-TD500](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)) [[paper](https://ieeexplore.ieee.org/abstract/document/6247787)] [[download](docs/en/datasets/td500.md)]
- [x] [SCUT-CTW1500](https://github.com/Yuliang-Liu/Curve-Text-Detector) [[paper](https://www.sciencedirect.com/science/article/pii/S0031320319300664)] [[download](docs/en/datasets/ctw1500.md)]
- [x] [Chinese-Text-Recognition-Benchmark](https://github.com/FudanVI/benchmarking-chinese-text-recognition) [[paper](https://arxiv.org/abs/2112.15093)] [[download](https://github.com/FudanVI/benchmarking-chinese-text-recognition#download)]
- [Born-Digital Images](https://rrc.cvc.uab.es/?ch=1) [[download](docs/cn/datasets/borndigital.md)]
- [CASIA-10K](http://www.nlpr.ia.ac.cn/pal/CASIA10K.html) [[download](docs/cn/datasets/casia10k.md)]
- [CCPD](https://github.com/detectRecog/CCPD) [[download](docs/cn/datasets/ccpd.md)]
- [Chinese Text Recognition Benchmark](https://github.com/FudanVI/benchmarking-chinese-text-recognition) [[paper](https://arxiv.org/abs/2112.15093)] [[download](docs/cn/datasets/chinese_text_recognition.md)]
- [COCO-Text](https://rrc.cvc.uab.es/?ch=5) [[download](docs/cn/datasets/cocotext.md)]
- [CTW](https://ctwdataset.github.io/) [[download](docs/cn/datasets/ctw.md)]
- [ICDAR2015](https://rrc.cvc.uab.es/?ch=4) [[paper](https://rrc.cvc.uab.es/files/short_rrc_2015.pdf)] [[download](docs/cn/datasets/icdar2015.md)]
- [ICDAR2019 ArT](https://rrc.cvc.uab.es/?ch=14) [[download](docs/cn/datasets/ic19_art.md)]
- [LSVT](https://rrc.cvc.uab.es/?ch=16) [[download](docs/cn/datasets/lsvt.md)]
- [MLT2017](https://rrc.cvc.uab.es/?ch=8) [[paper](https://ieeexplore.ieee.org/abstract/document/8270168)] [[download](docs/cn/datasets/mlt2017.md)]
- [MSRA-TD500](http://www.iapr-tc11.org/mediawiki/index.php/MSRA_Text_Detection_500_Database_(MSRA-TD500)) [[paper](https://ieeexplore.ieee.org/abstract/document/6247787)] [[download](docs/cn/datasets/td500.md)]
- [MTWI-2018](https://tianchi.aliyun.com/competition/entrance/231651/introduction) [[download](docs/cn/datasets/mtwi2018.md)]
- [RCTW-17](https://rctw.vlrlab.net/) [[download](docs/cn/datasets/rctw17.md)]
- [ReCTS](https://rrc.cvc.uab.es/?ch=12) [[download](docs/cn/datasets/rects.md)]
- [SCUT-CTW1500](https://github.com/Yuliang-Liu/Curve-Text-Detector) [[paper](https://www.sciencedirect.com/science/article/pii/S0031320319300664)] [[download](docs/cn/datasets/ctw1500.md)]
- [SROIE](https://rrc.cvc.uab.es/?ch=13) [[download](docs/cn/datasets/sroie.md)]
- [SVT](http://www.iapr-tc11.org/mediawiki/index.php/The_Street_View_Text_Dataset) [[download](docs/cn/datasets/svt.md)]
- [SynText150k](https://github.com/aim-uofa/AdelaiDet) [[paper](https://arxiv.org/abs/2002.10200)] [[download](docs/cn/datasets/syntext150k.md)]
- [SynthText](https://www.robots.ox.ac.uk/~vgg/data/scenetext/) [[paper](https://www.robots.ox.ac.uk/~vgg/publications/2016/Gupta16/)] [[download](docs/cn/datasets/synthtext.md)]
- [TextOCR](https://textvqa.org/textocr/) [[download](docs/cn/datasets/textocr.md)]
- [Total-Text](https://github.com/cs-chan/Total-Text-Dataset/tree/master/Dataset) [[paper](https://arxiv.org/abs/1710.10400)] [[download](docs/cn/datasets/totaltext.md)]

</details>

我们会在更多的数据集上进行模型训练和验证。该列表将持续更新。
Expand Down
47 changes: 47 additions & 0 deletions docs/cn/datasets/borndigital.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Born-Digital Images 数据集

## 数据集下载

原生数字图像数据集(Born-Digital Images)[官网](https://rrc.cvc.uab.es/?ch=1)

注意: 在下载之前,你需要先注册一个账号。

<details>
<summary>从何处下载Born-Digital Images数据集</summary>

[下载地址](https://rrc.cvc.uab.es/?ch=1&com=downloads)

该数据集分为4个任务: 任务1为文本定位, 任务2为文本分割, 任务3为单词识别, 任务4为端到端文本检测识别。这里我们仅考虑下载使用任务1数据集。

</details>

下载图像和注释后,解压缩文件并根据需要重命名,例如`train_images`是图像,`train_labels` 是标签, 最终目录结构如下:
```txt
Born-Digital
|--- train_images
| |--- <image_name>.jpg
| |--- <image_name>.jpg
| |--- ...
|--- train_labels
| |--- <image_name>.txt
| |--- <image_name>.txt
| |--- ...
```

## 数据准备

### 检测任务

要准备用于文本检测的数据,您可以运行以下命令:

```bash
python tools/dataset_converters/convert.py \
--dataset_name borndigital --task det \
--image_dir path/to/Born-Digital/train_images/ \
--label_dir path/to/Born-Digital/train_labels \
--output_path path/to/Born-Digital/det_gt.txt
```

运行后,在文件夹`Born-Digital/`下会生成注释文件`det_gt.txt`。

[返回dataset converters](converters.md)
49 changes: 49 additions & 0 deletions docs/cn/datasets/casia10k.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# CASIA-10K 数据集

## 数据集下载
CASIA-10K 数据集[官网](http://www.nlpr.ia.ac.cn/pal/CASIA10K.html)

<details>
<summary>从何处下载CASIA-10K数据集</summary>

[下载地址](http://www.nlpr.ia.ac.cn/pal/CASIA10K.html)

</details>

请从上述网站下载数据并解压缩文件。解压文件后,数据结构应该是这样的:

```txt
CASIA-10K
|--- test
| |--- PAL00001.jpg
| |--- PAL00001.txt
| |--- PAL00005.jpg
| |--- PAL00005.txt
| |--- ...
|--- train
| |--- PAL00003.jpg
| |--- PAL00003.txt
| |--- PAL00006.jpg
| |--- PAL00006.txt
| |--- ...
|--- CASIA-10K_test.txt
|--- CASIA-10K_train.txt
```

## 数据准备

### 检测任务

要准备用于文本检测的数据,您可以运行以下命令:

```bash
python tools/dataset_converters/convert.py \
--dataset_name casia10k --task det \
--image_dir path/to/CASIA-10K/train/ \
--label_dir path/to/CASIA-10K/train \
--output_path path/to/CASIA-10K/det_gt.txt
```

运行后,在文件夹`CASIA-10K/`下会生成注释文件`det_gt.txt`。

[返回dataset converters](converters.md)
52 changes: 52 additions & 0 deletions docs/cn/datasets/ccpd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Chinese City Parking Dataset (CCPD) 2019 数据集

## 数据集下载

CCPD数据集[官网](https://github.com/detectRecog/CCPD)
<details>
<summary>从何处下载CCPD数据集</summary>

[下载地址](https://github.com/detectRecog/CCPD)

该数据集被分为3个部分:训练集、验证集和测试集,每个集合的标签可在`splits`文件夹下发现。

图像的注释可在图像的文件名中找到,具体格式及描述可在[官网](https://github.com/detectRecog/CCPD#dataset-annotations)查阅。

</details>

请从上述网站下载数据并解压缩文件。解压文件后,数据结构应该是这样的:

```txt
CCPD2019
|--- ccpd_base
| |--- <image_name>.jpg
| |--- <image_name>.jpg
| |--- ...
|--- ccpd_blur
| |--- <image_name>.jpg
| |--- <image_name>.jpg
| |--- ...
|--- ...
|--- ...
|--- ...
|--- splits
```

## 数据准备

### 检测任务

要准备用于文本检测的数据,您可以运行以下命令:

```bash
python tools/dataset_converters/convert.py \
--dataset_name ccpd --task det \
--image_dir path/to/CCPD2019/ccpd_base/ \
--label_dir path/to/CCPD2019/splits/train.txt
--output_path path/to/CCPD2019/det_gt.txt
```

运行后,在文件夹`CCPD2019/`下会生成注释文件`det_gt.txt`。


[返回dataset converters](converters.md)
43 changes: 43 additions & 0 deletions docs/cn/datasets/cocotext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# COCO-Text 数据集

## 数据集下载

COCO-Text数据集[官网](https://rrc.cvc.uab.es/?ch=5)

注意: 在下载之前,你需要先注册一个账号。

<details>
<summary>从何处下载COCO-Text数据集</summary>

[下载地址](https://rrc.cvc.uab.es/?ch=5&com=downloads),注释可下载 `annotations v1.4 JSON`。

</details>

请从上述网站下载数据并解压缩文件。解压文件后,数据结构应该是这样的:

```txt
COCO-Text
|--- train_images
| |--- COCO_train2014_000000000036.jpg
| |--- COCO_train2014_000000000064.jpg
| |--- ...
|--- COCO_Text.json
```

## 数据准备

### 检测任务

要准备用于文本检测的数据,您可以运行以下命令:

```bash
python tools/dataset_converters/convert.py \
--dataset_name cocotext --task det \
--image_dir path/to/COCO-Text/train_images/ \
--label_dir path/to/COCO-Text/COCO_Text.json \
--output_path path/to/COCO-Text/det_gt.txt
```

运行后,在文件夹`COCO-Text/`下会生成注释文件`det_gt.txt`。

[返回ataset converters](converters.md)
27 changes: 26 additions & 1 deletion docs/cn/datasets/converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,32 @@

您也可以参考 [`convert_datasets.sh`](https://github.com/mindspore-lab/mindocr/blob/main/tools/convert_datasets.sh)。这是将给定目录下所有数据集的标注文件转换为通用格式的Shell 脚本。

要下载OCR数据集并进行格式转换,您可以参考 [Chinese text recognition](chinese_text_recognition.md), [CTW1500](ctw1500.md), [ICDAR2015](icdar2015.md), [MLT2017](mlt2017.md), [SVT](svt.md), [Syntext 150k](syntext150k.md), [TD500](td500.md), [Total Text](totaltext.md), [SynthText](synthtext.md) 的说明。
<details>
<summary>要下载OCR数据集并将其转换为所需的数据格式,请参阅以下介绍.</summary>

- [Born-Digital Images](borndigital.md)
- [CASIA-10K](casia10k.md)
- [CCPD](ccpd.md)
- [Chinese text recognition](chinese_text_recognition.md)
- [COCO-Text](cocotext.md)
- [CTW](ctw.md)
- [ICDAR2015](icdar2015.md)
- [ICDAR2019 ArT](ic19_art.md)
- [LSVT](lsvt.md)
- [MLT2017](mlt2017.md)
- [MSRA-TD500](td500.md)
- [MTWI-2018](mtwi2018.md)
- [RCTW-17](rctw17.md)
- [ReCTS](rects.md)
- [SCUT-CTW1500](ctw1500.md)
- [SROIE](sroie.md)
- [SVT](svt.md)
- [SynText150k](syntext150k.md)
- [SynthText](synthtext.md)
- [TextOCR](textocr.md)
- [Total-Text](totaltext.md)

</details>

## 文本检测/端到端文本检测

Expand Down
50 changes: 50 additions & 0 deletions docs/cn/datasets/ctw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# CTW 数据集

## 数据集下载

COCO-Text数据集[官网](https://ctwdataset.github.io/)

注意: 您需要填写表格才能下载此数据集。

<details>
<summary>从何处下载CTW数据集</summary>

[下载地址](https://ctwdataset.github.io/downloads.html)

图像分为26批,即26个不同的.tar存档文件,格式为`images-trainval/ctw-trainval*.tar`。所有26批都需要下载。
注释存档文件名为`ctw-annotations.tar.gz`。
</details>

下载压缩后的图像后,解压后将所有图像收集到单个文件夹中,例如`train_val/`,注释也进行相应解压。最终目录结构如下:

```txt
CTW
|--- train_val
| |--- 0000172.jpg
| |--- 0000174.jpg
| |--- ...
|--- train.jsonl
|--- val.jsonl
|--- test_cls.jsonl
|--- info.json
```

## 数据准备

### 检测任务

要准备用于文本检测的数据,您可以运行以下命令:

```bash
python tools/dataset_converters/convert.py \
--dataset_name ctw --task det \
--image_dir path/to/CTW/train_val/ \
--label_dir path/to/CTW/train.jsonl \
--output_path path/to/CTW/det_gt.txt
```

运行后,在文件夹`CTW/`下会生成注释文件`det_gt.txt`。

请注意,可以更改`label_dir`以准备验证集。

[返回dataset converters](converters.md)
2 changes: 1 addition & 1 deletion docs/cn/datasets/ctw1500.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SCUT-CTW1500 Datasets
# SCUT-CTW1500 数据集

## 数据下载
文本检测数据集(SCUT-CTW1500)[官网](https://github.com/Yuliang-Liu/Curve-Text-Detector)
Expand Down
Loading