Captcha OCR API

Python flask API that resolve base64 captcha image. This project uses Google Vision AI API for OCR processing.

Prerequisite

  • Python3
  • Flask
  • OpenCV
  • Google APIs

Installation

  1. Clone this repository to your workspace
git clone https://github.com/parth-p-7span/captcha-visionAI-api.git
  1. Navigate to captcha-visionAI-api folder in your Terminal/CMD
cd captcha-visionAI-api
  1. Now install the required libraries using following command
pip install -r requirements.txt
  1. Create .env file in the root directory of the project and set your Vision AI API token with TOKEN key
  2. Run the project using following command
python app.py

Usage

Logic

  • Decode base64 string to numpy array
  • Convert numpy array to opencv image
  • Process image in opencv to connect dots of characters to get the better outcome
  • Send processed image to Google VisionAI API for OCR process
  • Difference between original image and opencv processed image