{"id":18735376,"url":"https://github.com/wenmuzhou/psenet.pytorch","last_synced_at":"2025-04-05T20:10:35.622Z","repository":{"id":54189955,"uuid":"171590855","full_name":"WenmuZhou/PSENet.pytorch","owner":"WenmuZhou","description":"A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network","archived":false,"fork":false,"pushed_at":"2021-03-04T09:03:07.000Z","size":8319,"stargazers_count":463,"open_issues_count":26,"forks_count":138,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T19:08:37.715Z","etag":null,"topics":["ocr","python3","pytorch","text-detection"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/WenmuZhou.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}},"created_at":"2019-02-20T03:03:06.000Z","updated_at":"2024-11-26T03:12:07.000Z","dependencies_parsed_at":"2022-08-13T08:50:14.864Z","dependency_job_id":null,"html_url":"https://github.com/WenmuZhou/PSENet.pytorch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WenmuZhou%2FPSENet.pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WenmuZhou%2FPSENet.pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WenmuZhou%2FPSENet.pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WenmuZhou%2FPSENet.pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WenmuZhou","download_url":"https://codeload.github.com/WenmuZhou/PSENet.pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393574,"owners_count":20931813,"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":["ocr","python3","pytorch","text-detection"],"created_at":"2024-11-07T15:16:46.421Z","updated_at":"2025-04-05T20:10:35.603Z","avatar_url":"https://github.com/WenmuZhou.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shape Robust Text Detection with Progressive Scale Expansion Network\r\n\r\n## Requirements\r\n* pytorch 1.1\r\n* torchvision 0.3\r\n* pyclipper\r\n* opencv3\r\n* gcc 4.9+\r\n\r\n## Update \r\n### 20190401\r\n\r\n1. add author loss, the results are compared in [Performance](#Performance)\r\n\r\n\r\n### Download\r\nresnet50 and resnet152 model on icdar 2015: \r\n\r\n1. ~~[bauduyun](https://pan.baidu.com/s/1rN0oGBRsdUYmcQUayMZUOA) extract code: rxjf~~\r\n\r\n2. ~~[google drive](https://drive.google.com/drive/folders/1r3Q1GJ5990WYrwXKT29aHvfQNW92QkXv?usp=sharing)~~\r\n\r\n## Data Preparation\r\nfollow icdar15 dataset format\r\n```\r\nimg\r\n│   1.jpg\r\n│   2.jpg   \r\n│\t\t...\r\ngt\r\n│   gt_1.txt\r\n│   gt_2.txt\r\n|\t\t...\r\n```\r\n\r\n## Train\r\n1. config the `trainroot`,`testroot`in [config.py](config.py)\r\n2. use following script to run\r\n```sh\r\npython3 train.py\r\n```\r\n\r\n## Test\r\n[eval.py](eval.py) is used to test model on test dataset\r\n\r\n1. config `model_path`, `data_path`, `gt_path`, `save_path` in [eval.py](eval.py)\r\n2. use following script to test\r\n```sh\r\npython3 eval.py\r\n```\r\n\r\n## Predict \r\n[predict.py](predict.py) is used to inference on single image\r\n\r\n1. config `model_path`, `img_path`, `gt_path`, `save_path` in [predict.py](predict.py)\r\n2. use following script to predict\r\n```sh\r\npython3 predict.py\r\n```\r\n\r\n\r\n\u003ch2 id=\"Performance\"\u003ePerformance\u003c/h2\u003e\r\n\r\n### [ICDAR 2015](http://rrc.cvc.uab.es/?ch=4)\r\nonly train on ICDAR2015 dataset with single NVIDIA 1080Ti\r\n\r\nmy implementation with my loss use adam and warm_up\r\n\r\n| Method                   | Precision (%) | Recall (%) | F-measure (%) | FPS(1080Ti) |\r\n|--------------------------|---------------|------------|---------------|-----|\r\n| PSENet-1s with resnet50 batch 8  | 81.13 | 77.03 | 79.03 | 1.76 |\r\n| PSENet-2s with resnet50 batch 8  | 81.36 | 77.13 | 79.18 | 3.55 |\r\n| PSENet-4s with resnet50 batch 8  | 81.00 | 76.55 | 78.71 | 4.43 |\r\n| PSENet-1s with resnet152 batch 4 | 85.45 | 80.06 | 82.67 | 1.48 |\r\n| PSENet-2s with resnet152 batch 4 | 85.42 | 80.11 | 82.68 | 2.56 |\r\n| PSENet-4s with resnet152 batch 4 | 83.93 | 79.00 | 81.39 | 2.99 |\r\n\r\nmy implementation with my loss use adam and MultiStepLR\r\n\r\n| Method                   | Precision (%) | Recall (%) | F-measure (%) | FPS(1080Ti) |\r\n|--------------------------|---------------|------------|---------------|-----|\r\n| PSENet-1s with resnet50 batch 8  | 83.39 | 79.29 | 81.29 | 1.76 |\r\n| PSENet-2s with resnet50 batch 8  | 83.22 | 79.05 | 81.08 | 3.55 |\r\n| PSENet-4s with resnet50 batch 8  | 82.57 | 78.23 | 80.34 | 4.43 |\r\n| PSENet-1s with resnet152 batch 4 | 85.33 | 79.87 | 82.51 | 1.48 |\r\n| PSENet-2s with resnet152 batch 4 | 85.36 | 79.73 | 82.45 | 2.56 |\r\n| PSENet-4s with resnet152 batch 4 | 83.95 | 78.86 | 81.33 | 2.99 |\r\n\r\nmy implementation with author loss use adam and warm_up\r\n\r\n| Method                   | Precision (%) | Recall (%) | F-measure (%) | FPS(1080Ti) |\r\n|--------------------------|---------------|------------|---------------|-----|\r\n| PSENet-1s with resnet50 batch 8  | 83.33 | 77.75 | 80.44 | 1.76 | \r\n| PSENet-2s with resnet50 batch 8  | 83.01 | 77.66 | 80.24 | 3.55 |\r\n| PSENet-4s with resnet50 batch 8  | 82.38 | 76.98 | 79.59 | 4.43 |\r\n| PSENet-1s with resnet152 batch 4 | 85.16 | 79.87 | 82.43 | 1.48 |\r\n| PSENet-2s with resnet152 batch 4 | 85.03 | 79.63 | 82.24 | 2.56 |\r\n| PSENet-4s with resnet152 batch 4 | 84.53S | 79.20 | 81.77 | 2.99 |\r\n\r\nmy implementation with author loss use adam and MultiStepLR\r\n\r\n| Method                   | Precision (%) | Recall (%) | F-measure (%) | FPS(1080Ti) |\r\n|--------------------------|---------------|------------|---------------|-----|\r\n| PSENet-1s with resnet50 batch 8  | 83.93 | 79.48 | 81.65 | 1.76 |\r\n| PSENet-2s with resnet50 batch 8  | 84.17 | 79.63 | 81.84 | 3.55 |\r\n| PSENet-4s with resnet50 batch 8  | 83.50 | 78.71 | 81.04 | 4.43 |\r\n| PSENet-1s with resnet152 batch 4 | 85.16 | 79.58 | 82.28 | 1.48 |\r\n| PSENet-2s with resnet152 batch 4 | 85.13 | 79.15 | 82.03 | 2.56 |\r\n| PSENet-4s with resnet152 batch 4 | 84.40 | 78.71 | 81.46 | 2.99 |\r\n\r\nofficial implementation use SGD and StepLR\r\n\r\n| Method                   | Precision (%) | Recall (%) | F-measure (%) | FPS(1080Ti) |\r\n|--------------------------|---------------|------------|---------------|-----|\r\n| PSENet-1s with resnet50 batch 8  |  84.15 | 80.26  | 82.16 | 1.76 |\r\n| PSENet-2s with resnet50 batch 8  |  83.61 | 79.82  | 81.67 | 3.72 |\r\n| PSENet-4s with resnet50 batch 8  |  81.90 | 78.23  | 80.03 | 4.51 |\r\n| PSENet-1s with resnet152 batch 4 |  82.87 | 78.76  | 80.77 | 1.53 |\r\n| PSENet-2s with resnet152 batch 4 |  82.33 | 78.33  | 80.28 | 2.61 |\r\n| PSENet-4s with resnet152 batch 4 |  81.19 | 77.13  | 79.11 | 3.00 |\r\n\r\n### examples\r\n![](imgs/img_31.jpg)\r\n\r\n![](imgs/img_73.jpg)\r\n\r\n![](imgs/img_83.jpg)\r\n\r\n![](imgs/img_98.jpg)\r\n\r\n![](imgs/img_125.jpg)\r\n\r\n### reference\r\n1. https://github.com/liuheng92/tensorflow_PSENet\r\n2. https://github.com/whai362/PSENet\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenmuzhou%2Fpsenet.pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwenmuzhou%2Fpsenet.pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenmuzhou%2Fpsenet.pytorch/lists"}