{"id":13543244,"url":"https://github.com/HaozhengLi/EAST_ICPR","last_synced_at":"2025-04-02T12:31:57.839Z","repository":{"id":201837556,"uuid":"132443667","full_name":"HaozhengLi/EAST_ICPR","owner":"HaozhengLi","description":"Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE","archived":false,"fork":false,"pushed_at":"2018-09-17T13:41:39.000Z","size":14522,"stargazers_count":153,"open_issues_count":1,"forks_count":60,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-03T10:32:11.257Z","etag":null,"topics":["detect","detecting","detection","detector","east","icdar","icdar2015","icpr","icpr2018","mtwi","mtwi2018","ocr","tensorflow","text","text-detect","text-detecting","text-detection","text-detector"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HaozhengLi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-07T10:16:03.000Z","updated_at":"2024-06-15T11:51:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7d240d4-c9ff-4117-b90d-73e5d3c3ce1e","html_url":"https://github.com/HaozhengLi/EAST_ICPR","commit_stats":null,"previous_names":["haozhengli/east_icpr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaozhengLi%2FEAST_ICPR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaozhengLi%2FEAST_ICPR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaozhengLi%2FEAST_ICPR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaozhengLi%2FEAST_ICPR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaozhengLi","download_url":"https://codeload.github.com/HaozhengLi/EAST_ICPR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815764,"owners_count":20838505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detect","detecting","detection","detector","east","icdar","icdar2015","icpr","icpr2018","mtwi","mtwi2018","ocr","tensorflow","text","text-detect","text-detecting","text-detection","text-detector"],"created_at":"2024-08-01T11:00:27.439Z","updated_at":"2025-04-02T12:31:52.832Z","avatar_url":"https://github.com/HaozhengLi.png","language":"Python","funding_links":[],"categories":["Text detection and localization"],"sub_categories":["EAST [paper:2017](https://arxiv.org/abs/1704.03155)"],"readme":"# EAST_ICPR: EAST for ICPR MTWI 2018 CHALLENGE\n\n### Introduction\nThis is a repository forked from [argman/EAST](https://github.com/argman/EAST) for the [ICPR MTWI 2018 CHALLENGE](https://tianchi.aliyun.com/competition/introduction.htm?spm=5176.100066.0.0.144ed780W1xl9s\u0026raceId=231651).\n\u003cbr\u003eOrigin Repository: [argman/EAST - A tensorflow implementation of EAST text detector](https://github.com/argman/EAST)\n\u003cbr\u003eOrigin Author: [argman](https://github.com/argman)\n\nAuthor: [Haozheng Li](https://github.com/HaozhengLi)\n\u003cbr\u003eEmail: sai-2008@qq.com or akaHaozhengLi@gmail.com\n\n### Contents\n1. [Transform](#transform)\n2. [Models](#models)\n3. [Demo](#demo)\n3. [Train](#train)\n4. [Test](#test)\n5. [Results](#results)\n\n### Transform\nSome data in the dataset is abnormal, just like [ICPR MTWI 2018](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651)[[BaiduYun](https://pan.baidu.com/s/1OBDwzGz0lJUjlooWZGyeHQ)]. Abnormal means that the ground true labels are anticlockwise, or the images are not in 3 channels. Then errors like ['poly in wrong direction'](https://github.com/argman/EAST/issues?utf8=%E2%9C%93\u0026q=poly+in+wrong+direction) will occur while using [argman/EAST](https://github.com/argman/EAST).\n\nSo I wrote a matlab program to check and transform the dataset. The program named \u003c[transform.m](https://github.com/HaozhengLi/EAST_ICPR/tree/master/data_transform/transform.m)\u003e is in the folder 'data_transform/' and its parameters are descripted as bellow:\n```\nicpr_img_folder = 'image_9000\\';                   %origin images\nicpr_txt_folder = 'txt_9000\\';                     %origin ground true labels\nicdar_img_folder = 'ICPR2018\\';                    %transformed images\nicdar_gt_folder = 'ICPR2018\\';                     %transformed ground true labels\nicdar_img_abnormal_folder = 'ICPR2018_abnormal\\';  %images not in 3 channels, which give errors in argman/EAST\nicdar_gt_abnormal_folder = 'ICPR2018_abnormal\\';   %transformed ground true labels\n\n%images and ground true labels files must be renamed as \u003cimg_1\u003e, \u003cimg_2\u003e, ..., \u003cimg_xxx\u003e while using argman/EAST\nfirst_index =  0;                                  %first index of the dataset\ntransform_list_name = 'transform_list.txt';        %file name of the rename list\n```\n***Note: For abnormal images not in 3 channels, please transform them to normal ones through other tools like [Format Factory](http://www.pcfreetime.com/). Then add the right data to the \u003cicdar_img_folder\u003e and \u003cicdar_gt_folder\u003e, so finally you get a whole normal dataset which has been checked and transformed.***\n\n### Models\n1. Resnet_V1_50 Models trained on [ICPR MTWI 2018 (train)](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651): [[100k steps](https://pan.baidu.com/s/1eBx4SYTZn4maxYVci7bSbQ)] [[500k steps](https://pan.baidu.com/s/17Qyu6U6or9Jbx7VAubCtgA)] [[1035k steps](https://pan.baidu.com/s/1jfjDxS4uknVavaOMO_wZQA)]\n2. Resnet_V1_101 Models trained on [ICPR MTWI 2018 (train)](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651) + [ICDAR 2017 MLT (train + val)](http://rrc.cvc.uab.es/?ch=8\u0026com=downloads) + [RCTW-17 (train)](http://www.icdar2017chinese.site:5080/dataset/): [[100k steps](https://pan.baidu.com/s/1EDt1eN99jGRkE641RrGgNQ)]\n3. Resnet_V1_101 Models pre-trained on Models-2, then trained on just [ICPR MTWI 2018 (train)](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651): [[987k steps](https://pan.baidu.com/s/1ao77XZtOZQF8wu_ghOH8ZA)]\n3. (In [argman/EAST](https://github.com/argman/EAST)) Resnet_V1_50 Models trained on ICDAR 2013 (train) + ICDAR 2015 (train): [[50k steps](https://pan.baidu.com/s/1ibyF0-fWE2AT3dEpwIltKw)]\n4. (In [argman/EAST](https://github.com/argman/EAST)) Resnet_V1_50 Models provided by tensorflow slim: [[slim_resnet_v1_50](https://pan.baidu.com/s/1PFiJ7YKeoLKiF0dRPocvNg)]\n\n### Demo\nDownload the pre-trained models and run:\n```\npython run_demo_server.py --checkpoint-path models/east_icpr2018_resnet_v1_50_rbox_1035k/\n```\nThen Open http://localhost:8769 for the web demo server, or get the results in 'static/results/'.\n\u003cbr\u003e***Note: See [argman/EAST#demo](https://github.com/argman/EAST#demo) for more details.***\n\n### Train\nPrepare the training set and run:\n```\npython multigpu_train.py --gpu_list=0 --input_size=512 --batch_size_per_gpu=8 \\\n--checkpoint_path=models/east_icpr2018_resnet_v1_50_rbox/ \\\n--text_scale=512 --training_data_path=data/ICPR2018/ --geometry=RBOX \\\n--learning_rate=0.0001 --num_readers=18 --max_steps=50000\n```\n***Note 1: Images and ground true labels files must be renamed as \u003cimg_1\u003e, \u003cimg_2\u003e, ..., \u003cimg_xxx\u003e while using [argman/EAST](https://github.com/argman/EAST). Please see the examples in the folder 'training_samples/'.\n\u003cbr\u003eNote 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).\n\u003cbr\u003eNote 3: See [argman/EAST#train](https://github.com/argman/EAST#train) for more details.***\n\n### Test\nNames of the images in [ICPR MTWI 2018](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651) are abnormal. Like \u003cLB1gXi2JVXXXXXUXFXXXXXXXXXX.jpg\u003e but not \u003cimg_10001.jpg\u003e. Then errors will occur while using [argman/EAST#test](https://github.com/argman/EAST#test).\n\nSo I wrote two matlab programs to rename and inversely rename the dataset. Before evaluating, run the program named \u003c[rename.m](https://github.com/HaozhengLi/EAST_ICPR/blob/master/data_transform/rename.m)\u003e to make names of the images normal. This program is in the folder 'data_transform/' and its parameters are descripted as bellow:\n```\nicpr_img_folder = 'image_10000\\';                      %origin images\nicdar_img_folder = 'ICPR2018_test\\';                   %transformed images\nicdar_img_abnormal_folder = 'ICPR2018_test_abnormal\\'; %images not in 3 channels, which give errors in argman/EAST\n\nicpr_count =  10000;                                   %first index of the dataset\nrename_list_name = 'rename_list.txt';                  %file name of the rename list\n```\n***Note: Just like \u003c[transform.m](https://github.com/HaozhengLi/EAST_ICPR/tree/master/data_transform/transform.m)\u003e, please transform abnormal images through other tools like [Format Factory](http://www.pcfreetime.com/).***\n\nAfter you have prepared the test set, run:\n```\npython eval.py --test_data_path=data/ICPR2018/ --gpu_list=0 \\\n--checkpoint_path=models/east_icpr2018_resnet_v1_50_rbox_1035k/ --output_dir=results/1035k/\n```\nThen get the results in 'results/'.\n\nFinally inversely rename the result labels files from \u003cimg_10001.txt\u003e to \u003cLB1gXi2JVXXXXXUXFXXXXXXXXXX.txt\u003e according to the rename list generated by \u003c[rename.m](https://github.com/HaozhengLi/EAST_ICPR/blob/master/data_transform/rename.m)\u003e. Run the program named \u003c[rename_inverse.m](https://github.com/HaozhengLi/EAST_ICPR/blob/master/data_transform/rename_inverse.m)\u003e which is in the folder 'data_transform/' and its parameters are descripted as bellow:\n```\nrename_list_name = 'rename_list.txt';  %file name of the rename list\nicpr_img_folder = 'image_10000\\';      %origin images\nicpr_txt_folder = 'results\\';          %result labels files generated by argman/EAST\nicdar_gt_folder = 'txt_10000\\';        %inversely renamed result labels files\n```\nThen zip the results in 'txt_10000/' and submit it to the [ICPR MTWI 2018 CHALLENGE](https://tianchi.aliyun.com/competition/introduction.htm?spm=5176.100066.0.0.144ed780W1xl9s\u0026raceId=231651).\n\n### Results\nFinally our model \u003c[east_icpr2018_resnet_v1_50_rbox_1035k](https://pan.baidu.com/s/1jfjDxS4uknVavaOMO_wZQA)\u003e rank 31 in the [ICPR MTWI 2018 CHALLENGE](https://tianchi.aliyun.com/competition/rankingList.htm?spm=5176.11165320.0.0.13eb6a9e8WAPZe\u0026season=0\u0026raceId=231651\u0026pageIndex=2):\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/rank_31.png)\n\nHere are some results on [ICPR MTWI 2018](https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4ec66a80qvIKLc\u0026raceId=231651):\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/1035k/img_1.jpg)\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/1035k/img_2.jpg)\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/1035k/img_3.jpg)\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/1035k/img_4.jpg)\n\u003cbr\u003e![image](https://github.com/HaozhengLi/EAST_ICPR/blob/master/results/1035k/img_5.jpg)\n\n# Have fun!! :)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHaozhengLi%2FEAST_ICPR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHaozhengLi%2FEAST_ICPR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHaozhengLi%2FEAST_ICPR/lists"}