{"id":19876956,"url":"https://github.com/eurus-holmes/chabcnet","last_synced_at":"2025-05-02T12:30:40.079Z","repository":{"id":43217302,"uuid":"220590067","full_name":"Eurus-Holmes/CHABCNet","owner":"Eurus-Holmes","description":"[CHABCNet] ABCNet on the Chinese dataset, building on Detectron2 (Facebook AI Research)","archived":false,"fork":false,"pushed_at":"2023-10-03T23:44:15.000Z","size":3477,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-20T19:44:45.569Z","etag":null,"topics":["chinese-dataset","detectron2","icdar2019","rects","text-detection-recognition","text-spotting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eurus-Holmes.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":"2019-11-09T04:14:58.000Z","updated_at":"2023-10-21T11:15:34.196Z","dependencies_parsed_at":"2023-01-22T00:16:50.860Z","dependency_job_id":"607b65a3-c5ae-417c-a792-4fb3c570c030","html_url":"https://github.com/Eurus-Holmes/CHABCNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eurus-Holmes%2FCHABCNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eurus-Holmes%2FCHABCNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eurus-Holmes%2FCHABCNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eurus-Holmes%2FCHABCNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eurus-Holmes","download_url":"https://codeload.github.com/Eurus-Holmes/CHABCNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224309547,"owners_count":17290210,"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":["chinese-dataset","detectron2","icdar2019","rects","text-detection-recognition","text-spotting"],"created_at":"2024-11-12T16:34:52.569Z","updated_at":"2024-11-12T16:34:53.578Z","avatar_url":"https://github.com/Eurus-Holmes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CHABCNet\n\n\u003e [ABCNet](https://github.com/aim-uofa/AdelaiDet) on the Chinese dataset.\n\n\n## Installation\n\n```shell script\ngit clone https://github.com/aim-uofa/AdelaiDet.git\ncd AdelaiDet\npython -m venv env\nsource env/bin/activate\npip install --upgrade pip\n``` \n\nFirst install Detectron2 following the official guide: [INSTALL.md](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md). Then build AdelaiDet with:\n```shell script\npip install -U torch==1.5 torchvision==0.6 -f https://download.pytorch.org/whl/cu101/torch_stable.html \npip install opencv-python\npip install cython pyyaml==5.1\npip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'\npip install detectron2==0.1.3 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.5/index.html\npython setup.py build develop\n```\n\nSome projects may require special setup, please follow their own `README.md` in [configs](configs).\n\n\n## Quick Start \n\n### Inference with our trained Models\n\n1. Select the model and config file above, for example, `configs/BAText/CTW1500/attn_R_50.yaml`.\n2. Run the demo with\n\n```\nwget -O ctw1500_attn_R_50.pth https://universityofadelaide.box.com/shared/static/1bqpg9hijtn2rcooqjpffateguh9eeme.pth\npython demo/demo.py \\\n    --config-file configs/BAText/CTW1500/attn_R_50.yaml \\\n    --input ./input/ \\\n    --output ./output/ \\\n    --opts MODEL.WEIGHTS ctw1500_attn_R_50.pth\n```\nor\n```\nwget -O tt_attn_R_50.pth https://cloudstor.aarnet.edu.au/plus/s/t2EFYGxNpKPUqhc/download\npython demo/demo.py \\\n    --config-file configs/BAText/TotalText/attn_R_50.yaml \\\n    --input ./input/ \\\n    --output ./output/ \\\n    --opts MODEL.WEIGHTS tt_attn_R_50.pth\n```\n\n\n### Train Your Own Models\n\n1. Step one: [Data processing](https://github.com/Eurus-Holmes/CHABCNet/tree/master/data_processing)\n\n2. Step two: Put the ReCTS dataset to `dataset` folder\n\n\n```\nReCTS:\n.\n├── images\n│   ├── 000001.jpg\n│   ├── 000002.jpg\n├── annotations\n│   ├── train.json\n```\n\n3. Step three: specify train img and annotations in `adet/data/builtin.py`:\n\nAdd the ReCTS dataset:\n\n```\n_PREDEFINED_SPLITS_TEXT = {\n    \"totaltext_train\": (\"totaltext/train_images\", \"totaltext/train.json\"),\n    \"totaltext_val\": (\"totaltext/test_images\", \"totaltext/test.json\"),\n    \"ctw1500_word_train\": (\"CTW1500/ctwtrain_text_image\", \"CTW1500/annotations/train_ctw1500_maxlen100_v2.json\"),\n    \"ctw1500_word_test\": (\"CTW1500/ctwtest_text_image\",\"CTW1500/annotations/test_ctw1500_maxlen100.json\"),\n    \"syntext1_train\": (\"syntext1/images\", \"syntext1/annotations/train.json\"),\n    \"syntext2_train\": (\"syntext2/images\", \"syntext2/annotations/train.json\"),\n    \"mltbezier_word_train\": (\"mlt2017/images\",\"mlt2017/annotations/train.json\"),\n    \"ReCTS_train\": (\"ReCTS/train_images\",\"ReCTS/annotations/train.json\"),\n    \"ReCTS_test\": (\"ReCTS/test_images\",\"ReCTS/annotations/test.json\"),\n}\n```\n\n4. Step four: specify train config in `configs/BAText/TotalText/Base-TotalText.yaml`:\n\nAdd the ReCTS dataset:\n\n```\nDATASETS:\n  TRAIN: (\"ReCTS_train\",)\n  TEST: (\"ReCTS_test\",)\n```\n\n5. Step five: run \n\n`OMP_NUM_THREADS=1 python tools/train_net2.py --config-file configs/BAText/CTW1500/attn_R_50.yaml --num-gpus 1`\n\n`OMP_NUM_THREADS=1 python tools/train_net.py --config-file configs/BAText/TotalText/attn_R_50.yaml --num-gpus 1`\n\n`OMP_NUM_THREADS=1 python tools/train_net2.py --config-file configs/BAText/Pretrain/attn_R_50.yaml --num-gpus 1`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feurus-holmes%2Fchabcnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feurus-holmes%2Fchabcnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feurus-holmes%2Fchabcnet/lists"}