{"id":15639987,"url":"https://github.com/wovchena/text-detection-fots.pytorch","last_synced_at":"2025-04-30T07:24:53.155Z","repository":{"id":157103772,"uuid":"168155905","full_name":"Wovchena/text-detection-fots.pytorch","owner":"Wovchena","description":"FOTS text detection branch reimplementation, hmean: 83.3%","archived":false,"fork":false,"pushed_at":"2020-01-09T10:26:13.000Z","size":88,"stargazers_count":79,"open_issues_count":12,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T13:51:16.281Z","etag":null,"topics":["cvpr2018","fots","pytorch","text-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wovchena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-29T13:05:03.000Z","updated_at":"2024-08-25T08:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c998668-6e4b-4e5d-9ede-ac1b73f70011","html_url":"https://github.com/Wovchena/text-detection-fots.pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wovchena%2Ftext-detection-fots.pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wovchena%2Ftext-detection-fots.pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wovchena%2Ftext-detection-fots.pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wovchena%2Ftext-detection-fots.pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wovchena","download_url":"https://codeload.github.com/Wovchena/text-detection-fots.pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251659446,"owners_count":21623049,"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":["cvpr2018","fots","pytorch","text-detection"],"created_at":"2024-10-03T11:29:35.114Z","updated_at":"2025-04-30T07:24:53.135Z","avatar_url":"https://github.com/Wovchena.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [FOTS: Fast Oriented Text Spotting with a Unified Network](https://arxiv.org/abs/1801.01671) text detection branch reimplementation ([PyTorch](https://pytorch.org/))\n\n## Train\n1. Train with SynthText for 9 epochs\n    ```sh\n    time python3 train.py --train-folder SynthText/ --batch-size 21 --batches-before-train 2\n    ```\n    At this point the result was `Epoch 8: 100%|█████████████| 390/390 [08:28\u003c00:00,  1.00it/s, Mean loss=0.98050]`.\n2. Train with ICDAR15\n\n    Replace a data set in `data_set = datasets.SynthText(args.train_folder, datasets.transform)` with `datasets.ICDAR2015` in [`train.py`](./train.py) and run\n    ```sh\n    time python3 train.py --train-folder icdar15/ --continue-training --batch-size 21 --batches-before-train 2\n    ```\n    It is expected that the provided `--train-folder` contains unzipped `ch4_training_images` and `ch4_training_localization_transcription_gt`. To avoid saving model at each epoch, the line `if True:` in [`train.py`](./train.py) can be replaced with `if epoch \u003e 60 and epoch % 6 == 0:`\n\n    The result was `Epoch 582: 100%|█████████████| 48/48 [01:05\u003c00:00,  1.04s/it, Mean loss=0.11290]`.\n\n### Learning rate schedule:\nEpoch   175: reducing learning rate of group 0 to 5.0000e-04.\n\nEpoch   264: reducing learning rate of group 0 to 2.5000e-04.\n\nEpoch   347: reducing learning rate of group 0 to 1.2500e-04.\n\nEpoch   412: reducing learning rate of group 0 to 6.2500e-05.\n\nEpoch   469: reducing learning rate of group 0 to 3.1250e-05.\n\nEpoch   525: reducing learning rate of group 0 to 1.5625e-05.\n\nEpoch   581: reducing learning rate of group 0 to 7.8125e-06.\n\n## Test\n```sh\npython3 test.py --images-folder ch4_test_images/ --output-folder res/ --checkpoint epoch_582_checkpoint.pt \u0026\u0026 zip -jmq runs/u.zip res/* \u0026\u0026 python2 script.py -g=gt.zip -s=runs/u.zip\n```\n`ch4_training_images` and `ch4_training_localization_transcription_gt` are available in [Task 4.4: End to End (2015 edition)](http://rrc.cvc.uab.es/?ch=4\u0026com=downloads). `script.py` and `ch4_test_images` can be found in [My Methods](https://rrc.cvc.uab.es/?ch=4\u0026com=mymethods\u0026task=1) (`Script: IoU` and `test set samples`).\n\nIt gives `Calculated!{\"precision\": 0.8694968553459119, \"recall\": 0.7987481945113144, \"hmean\": 0.8326223337515684, \"AP\": 0}`.\n\nThe pretrained models are here: https://drive.google.com/open?id=1xaVshLRrMEkb9LA46IJAZhlapQr3vyY2\n\n[`test.py`](./test.py) has a commented code to visualize results.\n\n## Difference with the paper\n1. The model is different compared to what the paper describes. An explanation is in [`model.py`](./model.py).\n2. The authors of FOTS could not train on clipped words because they also have a recognition branch. The whole word is required to be present on an image to be able to be recognized correctly. This reimplementation has only detection branch and that allows to train on crops of the words.\n3. The paper suggest using some other data sets in addition. Training on SynthText is simplified in this reimplementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwovchena%2Ftext-detection-fots.pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwovchena%2Ftext-detection-fots.pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwovchena%2Ftext-detection-fots.pytorch/lists"}