This project is a deep learning-based OCR solution designed to automatically solve CAPTCHA images from various Vietnamese banks including MB Bank, BIDV, Vietcombank, and Eximbank. It uses TensorFlow/Keras with CTC decoding and a Flask-based API for real-time CAPTCHA recognition.
- Trained OCR models per bank (MB Bank, BIDV, Eximbank, Vietcombank)
- Flask REST API endpoints for CAPTCHA solving
- Supports base64-encoded PNG images
- Uses TensorFlow, Keras, and custom CTC loss layer
- Character-level prediction with bidirectional LSTM layers
-
Clone the repo:
git clone https://github.com/your-repo/bank-captcha.git cd bank-captcha -
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python app.py
POST to one of the following endpoints with JSON body:
{
"base64": "your_image_data_base64"
}/api/captcha/mbbank/api/captcha/bidv/api/captcha/eximbank/api/captcha/vietcombank
{
"status": "success",
"captcha": "smcm"
}Use the provided training script to preprocess data, define and train the model, and export it using JSON and weight files. Models can be reloaded using LoadModel().
MIT License