lcsd-captcha-solver

所属分类:数值算法/人工智能
开发工具:Dockerfile
文件大小:57108KB
下载次数:0
上传日期:2022-11-07 15:20:54
上 传 者sh-1993
说明:  lcsd captcha求解器,captcha解算器使用基于注意力的OCR深度学习模型为康乐及文化事务署(LCS...
(The captcha solver uses attention-based OCR deep learning model for the Leisure and Cultural Services Department (LCSD) of Hong Kong SAR Government Online Booking system with TensorFlow Serving.)

文件列表:
Dockerfile (197, 2022-11-07)
docker-compose.yml (582, 2022-11-07)
models (0, 2022-11-07)
models\lcsd-captcha-4 (0, 2022-11-07)
models\lcsd-captcha-4\01 (0, 2022-11-07)
models\lcsd-captcha-4\01\saved_model.pb (661757, 2022-11-07)
models\lcsd-captcha-4\01\variables (0, 2022-11-07)
models\lcsd-captcha-4\01\variables\variables.data-00000-of-00003 (4, 2022-11-07)
models\lcsd-captcha-4\01\variables\variables.data-00001-of-00003 (3920, 2022-11-07)
models\lcsd-captcha-4\01\variables\variables.data-00002-of-00003 (31653004, 2022-11-07)
models\lcsd-captcha-4\01\variables\variables.index (1701, 2022-11-07)
models\lcsd-captcha-5 (0, 2022-11-07)
models\lcsd-captcha-5\01 (0, 2022-11-07)
models\lcsd-captcha-5\01\saved_model.pb (696482, 2022-11-07)
models\lcsd-captcha-5\01\variables (0, 2022-11-07)
models\lcsd-captcha-5\01\variables\variables.data-00000-of-00003 (4, 2022-11-07)
models\lcsd-captcha-5\01\variables\variables.data-00001-of-00003 (3920, 2022-11-07)
models\lcsd-captcha-5\01\variables\variables.data-00002-of-00003 (31653004, 2022-11-07)
models\lcsd-captcha-5\01\variables\variables.index (1701, 2022-11-07)

# LCSD Captcha Solver ## Description The captcha solver uses [attention-based OCR deep learning model](https://arxiv.org/pdf/1609.04938.pdf) for the [Leisure and Cultural Services Department (LCSD) of Hong Kong SAR Government](https://www.lcsd.gov.hk/tc/index.html) Online Booking system with TensorFlow Serving.
## Prerequisites - [Docker](https://www.docker.com/) ## Installation To build the TensorFlow model with AOCR support image, run the following command: ```bash docker build -t tf-aocr:v1 . ``` To start the containers with TensorFlow Serving, run the following command: ```bash docker-compose up -d ``` ## Usage ### Captcha Solving Prediction API 1. Download the image from the LCSD Online Booking system. 2. Dilate the captcha image to make the characters more distinguishable. 3. Convert the captcha image to grayscale. 4. Crop the captcha image to 79x32 and 92x32 for 4 and 5 characters captcha. 5. Post the captcha image to the TensorFlow Serving API with: ``` For 4 characters captcha: http://localhost:9000/v1/models/lcsd-captcha-4:predict For 5 characters captcha: http://localhost:9001/v1/models/lcsd-captcha-5:predict For 4 characters captcha in the same docker-compose file: http://tf-aocr-lcsd-4:8501/v1/models/lcsd-captcha-4:predict For 5 characters captcha in the same docker-compose file: http://tf-aocr-lcsd-5:8501/v1/models/lcsd-captcha-5:predict ``` 6. Get the prediction result from the response. ## Contributing Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. 1. Fork the project 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the branch (`git push origin feature/AmazingFeature`) 5. Open a pull request ## Acknowledgements This project is based on a model by [Qi Guo](http://qiguo.ml) and [Yuntian Deng](https://github.com/da03).
You can find the original model in the [da03/Attention-OCR](https://github.com/da03/Attention-OCR) repository.
The TensorFlow version of the model is available in the [@emedvedev/attention-ocr](https://github.com/emedvedev/attention-ocr) ## References - [TensorFlow Serving](https://www.tensorflow.org/tfx/serving/docker) - [Pypi AOCR](https://pypi.org/project/aocr/) - [@emedvedev/attention-ocr](https://github.com/emedvedev/attention-ocr)

近期下载者

相关文件


收藏者