{"id":28493553,"url":"https://github.com/shawnh2/bankcard-recognizer","last_synced_at":"2025-07-08T11:31:27.701Z","repository":{"id":54118947,"uuid":"199276910","full_name":"shawnh2/BankCard-Recognizer","owner":"shawnh2","description":"Identifying numbers from bankcard, based on Deep Learning with Keras","archived":false,"fork":false,"pushed_at":"2021-03-09T04:04:33.000Z","size":58593,"stargazers_count":80,"open_issues_count":9,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-08T09:09:18.803Z","etag":null,"topics":["cnn-blstm-ctc","crnn","deep-learning","east","keras","ocr","pyqt5","vgg"],"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/shawnh2.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-07-28T11:08:35.000Z","updated_at":"2025-05-05T02:34:02.000Z","dependencies_parsed_at":"2022-08-13T07:00:36.001Z","dependency_job_id":null,"html_url":"https://github.com/shawnh2/BankCard-Recognizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shawnh2/BankCard-Recognizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawnh2%2FBankCard-Recognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawnh2%2FBankCard-Recognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawnh2%2FBankCard-Recognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawnh2%2FBankCard-Recognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shawnh2","download_url":"https://codeload.github.com/shawnh2/BankCard-Recognizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawnh2%2FBankCard-Recognizer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264259719,"owners_count":23580871,"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":["cnn-blstm-ctc","crnn","deep-learning","east","keras","ocr","pyqt5","vgg"],"created_at":"2025-06-08T09:09:18.978Z","updated_at":"2025-07-08T11:31:27.696Z","avatar_url":"https://github.com/shawnh2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BankCard-Recognizer\n\nExtracting numbers from bankcard, based on Deep Learning with Keras.\n\nIncluding auto and manual location, number identification, with GUI.\n\n中文BLOG: [点击此处链接](https://blog.csdn.net/qq_25000387/article/details/100024666)\n\n![bankcard](./gui/icon/bankcard.png)\n\n\n## Roadmap\n* cnn_blstm_ctc\n* EAST/manual locate\n* GUI\n\n## Requirements\nPython == 3.6\n\n`pip install requirements`\n\n## Environment\nWindows10 x64, Anaconda, PyCharm 2018.3, NVIDIA GTX 1050.\n\n## Usage\n1. Download trained model, [CRNN](https://pan.baidu.com/s/1Cyj1YHhHxlX-3Lgj0vQ35A) extracting-code:`6eqw`, \n[EAST](https://pan.baidu.com/s/1R-kD0HGTomS8O0JhXJ-hCA) extracting-code:`qiw5`. \n2. Then put CRNN model into `crnn/model`, put EAST model into `east/model`.\n3. Run `python demo.py`.\n4. In GUI, press `Load` button to load one image about bankcard or load from `dataset/test/`. \n5. Press `Identify` button, it will start locate and do identification.\n6. Activate manual location by double click the Image view, then draw the interest area and press `Identify`.\n\n## Training\n### Prepare\nDownload my dataset, [CRNN](https://pan.baidu.com/s/1Ji0ZOv-rMSPcN2W6uO0K5Q) extracting-code:`1jax`,\n[EAST](https://pan.baidu.com/s/1UL1OdLEL-uNRQl8d11NkeQ) extracting-code:`pqba`. and unzip dataset in `./dataset`.\n\nThe structure of `dataset` looks like:\n```\n- dataset\n  - /card          # for east\n  - /crad_nbr      # for crnn\n  - /test\n  ...\n```\n\n### for CRNN\n1. Run `python crnn/preprocess.py`.\n3. Run `python crnn/run.py` to train, and you can change some parameters in `crnn/cfg.py`.\n\n### for EAST\n1. My dataset is collecting from Internet: Baidu, Google, and thanks [Kesci](https://www.kesci.com/home/dataset/5954cf1372ead054a5e25870).\n It has been labeld with ICDAR 2015 format, you can see it in `dataset/card/txt/`. \n This tiny dataset is unable to cover all the situation, if you have rich one, it may perform better.\n2. If you would like to get more data, make sure data has been labeled, or you can take `dataset/tagger.py` to label it.\n3. Modify `east/cfg.py`, see default values.\n4. Run `python east/preprocess.py`. If process goes well, you'll see generated data like this:\n\n![act_gt](./readme/act_gt_img_99.png)\n\n5. Finally, `python east/run.py`.\n\n## About\n### cnn_blstm_ctc\nThe model I used, refer to CNN_RNN_CTC. The CNN part is using VGG, with BLSTM as RNN and CTC loss.\n\nThe model's preview:\n\n![model](./readme/model.png)\n\n### EAST/manual locate\n\nAuto locate is using one famous Text Detection Algorithm - EAST. [See more details](https://zhuanlan.zhihu.com/p/37504120).\n\nIn this project, I prefer to use AdvancedEAST. It is an algorithm used for Scene-Image-Text-Detection, which is primarily based on EAST, and the significant improvement was also made, which make long text predictions more accurate. Original repo see Reference 1.\n\nAlso, training process is quiet quick and nice. As practical experience, img_size is better to be 384. The `epoch_nbr` is no longer important any more, for img_size like 384, usually training will early stop at epoch 20-22. But if you have a large dataset, try to play with these parameters.\n\nThis model's preview:\n\n![model](./readme/east.png)\n\nManual locate is only available in GUI. Here're some performance in .gif:\n\n![manual-locate1](./readme/manual-1.gif)\n\n![manual-locate2](./readme/manual-2.gif)\n\n### GUI\nUsing QtDesigner to design UI, and PyQt5 to finish other works.\n\n## Statement\n1. The bankcard images are collecting from Internet, if any images make you feel uncomfortable, please contact me.\n2. If you have any issues, post it in Issues.\n\n## Reference\n1. Advanced EAST - https://github.com/huoyijie/AdvancedEAST\n2. EAST model - https://www.cnblogs.com/lillylin/p/9954981.html \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawnh2%2Fbankcard-recognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawnh2%2Fbankcard-recognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawnh2%2Fbankcard-recognizer/lists"}