Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE

License

NotificationsYou must be signed in to change notification settings

HaozhengLi/EAST_ICPR

Repository files navigation

Introduction

This is a repository forked fromargman/EAST for theICPR MTWI 2018 CHALLENGE.
Origin Repository:argman/EAST - A tensorflow implementation of EAST text detector
Origin Author:argman

Author:Haozheng Li
Email:sai-2008@qq.com orakaHaozhengLi@gmail.com

Contents

  1. Transform
  2. Models
  3. Demo
  4. Train
  5. Test
  6. Results

Transform

Some data in the dataset is abnormal, just likeICPR MTWI 2018[BaiduYun]. Abnormal means that the ground true labels are anticlockwise, or the images are not in 3 channels. Then errors like'poly in wrong direction' will occur while usingargman/EAST.

So I wrote a matlab program to check and transform the dataset. The program named <transform.m> is in the folder 'data_transform/' and its parameters are descripted as bellow:

icpr_img_folder = 'image_9000\';                   %origin imagesicpr_txt_folder = 'txt_9000\';                     %origin ground true labelsicdar_img_folder = 'ICPR2018\';                    %transformed imagesicdar_gt_folder = 'ICPR2018\';                     %transformed ground true labelsicdar_img_abnormal_folder = 'ICPR2018_abnormal\';  %images not in 3 channels, which give errors in argman/EASTicdar_gt_abnormal_folder = 'ICPR2018_abnormal\';   %transformed ground true labels%images and ground true labels files must be renamed as <img_1>, <img_2>, ..., <img_xxx> while using argman/EASTfirst_index =  0;                                  %first index of the datasettransform_list_name = 'transform_list.txt';        %file name of the rename list

Note: For abnormal images not in 3 channels, please transform them to normal ones through other tools likeFormat Factory. Then add the right data to the <icdar_img_folder> and <icdar_gt_folder>, so finally you get a whole normal dataset which has been checked and transformed.

Models

  1. Resnet_V1_50 Models trained onICPR MTWI 2018 (train): [100k steps] [500k steps] [1035k steps]
  2. Resnet_V1_101 Models trained onICPR MTWI 2018 (train) +ICDAR 2017 MLT (train + val) +RCTW-17 (train): [100k steps]
  3. Resnet_V1_101 Models pre-trained on Models-2, then trained on justICPR MTWI 2018 (train): [987k steps]
  4. (Inargman/EAST) Resnet_V1_50 Models trained on ICDAR 2013 (train) + ICDAR 2015 (train): [50k steps]
  5. (Inargman/EAST) Resnet_V1_50 Models provided by tensorflow slim: [slim_resnet_v1_50]

Demo

Download the pre-trained models and run:

python run_demo_server.py --checkpoint-path models/east_icpr2018_resnet_v1_50_rbox_1035k/

Then Openhttp://localhost:8769 for the web demo server, or get the results in 'static/results/'.
Note: Seeargman/EAST#demo for more details.

Train

Prepare the training set and run:

python multigpu_train.py --gpu_list=0 --input_size=512 --batch_size_per_gpu=8 \--checkpoint_path=models/east_icpr2018_resnet_v1_50_rbox/ \--text_scale=512 --training_data_path=data/ICPR2018/ --geometry=RBOX \--learning_rate=0.0001 --num_readers=18 --max_steps=50000

Note 1: Images and ground true labels files must be renamed as <img_1>, <img_2>, ..., <img_xxx> while usingargman/EAST. Please see the examples in the folder 'training_samples/'.
Note 2: If--restore=True, training will restore from checkpoint and ignore the--pretrained_model_path. If--restore=False, training will delete checkpoint and initialize with the--pretrained_model_path (if exists).
Note 3: Seeargman/EAST#train for more details.

Test

Names of the images inICPR MTWI 2018 are abnormal. Like <LB1gXi2JVXXXXXUXFXXXXXXXXXX.jpg> but not <img_10001.jpg>. Then errors will occur while usingargman/EAST#test.

So I wrote two matlab programs to rename and inversely rename the dataset. Before evaluating, run the program named <rename.m> to make names of the images normal. This program is in the folder 'data_transform/' and its parameters are descripted as bellow:

icpr_img_folder = 'image_10000\';                      %origin imagesicdar_img_folder = 'ICPR2018_test\';                   %transformed imagesicdar_img_abnormal_folder = 'ICPR2018_test_abnormal\'; %images not in 3 channels, which give errors in argman/EASTicpr_count =  10000;                                   %first index of the datasetrename_list_name = 'rename_list.txt';                  %file name of the rename list

Note: Just like <transform.m>, please transform abnormal images through other tools likeFormat Factory.

After you have prepared the test set, run:

python eval.py --test_data_path=data/ICPR2018/ --gpu_list=0 \--checkpoint_path=models/east_icpr2018_resnet_v1_50_rbox_1035k/ --output_dir=results/1035k/

Then get the results in 'results/'.

Finally inversely rename the result labels files from <img_10001.txt> to <LB1gXi2JVXXXXXUXFXXXXXXXXXX.txt> according to the rename list generated by <rename.m>. Run the program named <rename_inverse.m> which is in the folder 'data_transform/' and its parameters are descripted as bellow:

rename_list_name = 'rename_list.txt';  %file name of the rename listicpr_img_folder = 'image_10000\';      %origin imagesicpr_txt_folder = 'results\';          %result labels files generated by argman/EASTicdar_gt_folder = 'txt_10000\';        %inversely renamed result labels files

Then zip the results in 'txt_10000/' and submit it to theICPR MTWI 2018 CHALLENGE.

Results

Finally our model <east_icpr2018_resnet_v1_50_rbox_1035k> rank 31 in theICPR MTWI 2018 CHALLENGE:
image

Here are some results onICPR MTWI 2018:
image
image
image
image
image

Have fun!! :)


[8]ページ先頭

©2009-2025 Movatter.jp