{"id":13543159,"url":"https://github.com/autonise/CRAFT-Remade","last_synced_at":"2025-04-02T12:31:42.762Z","repository":{"id":40980533,"uuid":"198413922","full_name":"autonise/CRAFT-Remade","owner":"autonise","description":"Implementation of CRAFT Text Detection","archived":false,"fork":false,"pushed_at":"2023-07-06T21:42:20.000Z","size":2784,"stargazers_count":191,"open_issues_count":8,"forks_count":47,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-03T10:32:05.580Z","etag":null,"topics":["craft","detection","ocr","pytorch","pytorch-implementation","text-detection","weak-supervision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/autonise.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,"roadmap":null,"authors":null}},"created_at":"2019-07-23T11:08:39.000Z","updated_at":"2024-05-29T12:50:42.000Z","dependencies_parsed_at":"2024-01-15T23:27:11.688Z","dependency_job_id":"9f2b41cb-afd1-48c9-a162-93d0dc8814f7","html_url":"https://github.com/autonise/CRAFT-Remade","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/autonise%2FCRAFT-Remade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autonise%2FCRAFT-Remade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autonise%2FCRAFT-Remade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autonise%2FCRAFT-Remade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autonise","download_url":"https://codeload.github.com/autonise/CRAFT-Remade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815658,"owners_count":20838478,"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":["craft","detection","ocr","pytorch","pytorch-implementation","text-detection","weak-supervision"],"created_at":"2024-08-01T11:00:24.563Z","updated_at":"2025-04-02T12:31:37.751Z","avatar_url":"https://github.com/autonise.png","language":"Python","funding_links":[],"categories":["Text detection and localization"],"sub_categories":["CRAFT [paper:2019](https://arxiv.org/pdf/1904.01941.pdf)"],"readme":"# Re-Implementing CRAFT-Character Region Awareness for Text Detection\n\n\n## Objective\n\n- [X] Reproduce weak-supervision training as mentioned in the paper https://arxiv.org/pdf/1904.01941.pdf\n- [ ] Generate character bbox on all the popular data sets.\n- [ ] Expose pre-trained models with command line interface to synthesize results on custom images\n\n\n## Clone the repository\n\n    git clone https://github.com/autonise/CRAFT-Remade.git\n    cd CRAFT-Remade\n\n## Option 1: Conda Environment Installation\n    conda env create -f environment.yml\n    conda activate craft\n\n## Option 2: Pip Installation\n    pip install -r requirements.txt\n\n## Running on custom images\n\nPut the images inside a folder.\n\u003cbr\u003eGet a pre-trained model from the pre-trained model list (Currently only strong supervision using SYNTH-Text available)\n\u003cbr\u003eRun the command - \n\n    python main.py synthesize --model=./model/final_model.pkl --folder=./input\n    \n## Results\n\n| Dataset | Recall | Precision | F-score |\n|---------|--------|-----------|---------|\n| ICDAR2013 | TBD | TBD | 0.8201(Improving) |\n| ICDAR2015 | TBD | TBD | TBD(Coming Soon) |\n| ICDAR2017 | TBD | TBD | TBD(Coming Soon) |\n| Total Text | TBD | TBD | TBD(Coming Soon) |\n| MS COCO | TBD | TBD | TBD(Coming Soon) |\n\n## Pre-trained models\n\n### Strong Supervision\n\nSynthText(CRAFT Model) - https://drive.google.com/open?id=1QH0B-iQ1Ob2HkWCQ2bVCsLPwVSmbcSgN\u003cbr\u003e\nSynthText(ResNet-UNet Model) - https://drive.google.com/file/d/1qnLM_iMnR1P_6OLoUoFtrReHe4bpFW3T\u003cbr\u003e\nOriginal Model by authors - https://drive.google.com/open?id=1ZQE0tK9498RhLcXwYRgod4upmrYWdgl9\u003cbr\u003e\n    \n### Weak Supervision\n\n- [ ] ICDAR 2013 - https://drive.google.com/file/d/16dl08NtuXX0_8N-vi6uNqQHe83eIvy3U/view?usp=sharing\n- [ ] ICDAR 2015 - In Progress\n- [ ] ICDAR 2017 - In Progress\n- [ ] Total Text - yet_to_be_completed\n- [ ] MS-COCO - yet_to_be_completed\n    \n## Pre-generated on popular data sets\n\n- [ ] ICDAR 2013 - In Progress\n- [ ] ICDAR 2015 - In Progress\n- [ ] ICDAR 2017 - yet_to_be_completed\n- [ ] Total Text - yet_to_be_completed\n- [ ] MS-COCO - yet_to_be_completed\n    \n## How to train the model from scratch\n\n### Strong Supervision on Synthetic dataset\n\nDownload the pre-trained model on Synthetic dataset at https://drive.google.com/open?id=1qnLM_iMnR1P_6OLoUoFtrReHe4bpFW3T\n\u003cbr\u003e Otherwise if you want to train from scratch\n\u003cbr\u003e Run the command - \n    \n    python main.py train_synth\n    \n\u003cbr\u003e To test your model on SynthText, Run the command -\n    \n    python main.py test_synth --model /path/to/model\n    \n### Weak Supervision\n\n#### First Pre-Process your dataset\n\n*Currently Supported - [IC13, IC15]\n\nThe assumed structure of the dataset is\n\n    .\n    ├── Generated (This folder will contain the weak-supervision intermediate targets)\n    └── Images\n        ├── test\n        │   ├── img_1.jpg\n        │   ├── img_2.jpg\n        │   ├── img_3.jpg\n        │   ├── img_4.jpg\n        │   └── img_5.jpg\n        │   └── ...\n        ├── test_gt.json (This can be generated using the pre_process function described below)\n        ├── train\n        │   ├── img_1.jpg\n        │   ├── img_2.jpg\n        │   ├── img_3.jpg\n        │   ├── img_4.jpg\n        │   └── img_5.jpg\n        │   └── ...\n        └── train_gt.json (This can be generated using the pre_process function described below)\n\nTo generate the json files for IC13 - \n\n    In config.py change the corresponding values\n    \n    'ic13': {\n\t\t'train': {\n\t\t\t'target_json_path': None,  --\u003e path to where you want the target json file (Images/train_gt.json)\n\t\t\t'target_folder_path': None,  --\u003e path to where you downloaded the train gt (ch2_training_localization_transcription_gt)\n\t\t},\n\t\t'test': {\n\t\t\t'target_json_path': None,  --\u003e path to where you want the target json file (Images/test_gt.json)\n\t\t\t'target_folder_path': None,  --\u003e path to where you downloaded the train gt (Challenge2_Test_Task1_GT)\n\t\t}\n\t\t\nRun the command - \n\t\n\tpython main.py pre_process --dataset IC13\n\t\t\nTo generate the json files for IC15 - \n\n    In config.py change the corresponding values\n    \n    'ic15': {\n\t\t'train': {\n\t\t\t'target_json_path': None,  --\u003e path to where you want the target json file (Images/train_gt.json)\n\t\t\t'target_folder_path': None,  --\u003e path to where you downloaded the train gt (ch4_training_localization_transcription_gt)\n\t\t},\n\t\t'test': {\n\t\t\t'target_json_path': None,  --\u003e path to where you want the target json file (Images/test_gt.json)\n\t\t\t'target_folder_path': None,  --\u003e path to where you downloaded the train gt (Challenge4_Test_Task1_GT)\n\t\t}\n\nRun the command - \n\tpython main.py pre_process --dataset IC15\n\n#### Second Train your model based on weak-supervision\n\n\u003cbr\u003e Run the command - \n\n    python main.py weak_supervision --model /path/to/strong/supervision/model --iterations \u003cnum_of_iterations(20)\u003e\n    \nThis will train the weak supervision model for the number of iterations you specified\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautonise%2FCRAFT-Remade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautonise%2FCRAFT-Remade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautonise%2FCRAFT-Remade/lists"}