ddddocr  by sml2h3

Offline OCR SDK for general verification codes

created 4 years ago
12,403 stars

Top 4.1% on sourcepulse

GitHubView on GitHub
Project Summary

DdddOcr is an open-source, offline SDK for general-purpose CAPTCHA recognition, developed collaboratively by sml2h3 and kerlomz. It aims to provide a user-friendly experience with minimal dependencies, leveraging deep neural networks trained on large datasets of randomly generated data. The library is suitable for developers and researchers needing to automate CAPTCHA solving tasks, offering features beyond basic OCR.

How It Works

DdddOcr utilizes ONNX Runtime for inference, with models trained using PyTorch via the dddd_trainer framework. It offers two built-in OCR models, selectable during initialization. The library also includes capabilities for image color filtering using HSV color spaces, object detection to identify potential target locations (bounding boxes), and slide puzzle matching using OpenCV algorithms.

Quick Start & Requirements

  • Install: pip install ddddocr
  • API Service: pip install ddddocr[api]
  • Prerequisites: Python 3.12, ONNX Runtime. GPU support is available with use_gpu=True.
  • Documentation: Project Documentation

Highlighted Details

  • Supports OCR, object detection, and slide puzzle matching.
  • Features image color filtering (predefined or custom HSV ranges).
  • Offers OCR probability output and character set range limiting.
  • Can import custom ONNX models trained with dddd_trainer.
  • Provides an HTTP API service for easier integration.
  • Supports MCP protocol for AI Agent interaction.

Maintenance & Community

The project is actively maintained by sml2h3. Community interaction and issue reporting are encouraged via GitHub Issues.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Compatible with Windows (64-bit), Linux (64/ARM64), and macOS (x64, M1/M2/M3 chips). Commercial use is permitted under the MIT license.

Limitations & Caveats

Slide detection algorithms may not be robust for all screenshotting methods. The README notes that recognition effectiveness can be "mystical" and may vary. Users are advised against re-initializing the DdddOcr instance for every recognition task, as initializations are slow.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
5
Star History
835 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.