ddddocr-fastapi  by sml2h3

FastAPI service for OCR tasks

created 3 years ago
1,015 stars

Top 37.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a high-performance OCR API service using FastAPI and DdddOcr, targeting developers needing to integrate image text recognition, sliding captcha matching, and object detection into their applications. It offers a simple, Docker-friendly deployment for quick integration.

How It Works

The API leverages the DdddOcr library to perform OCR tasks. It exposes three main endpoints: /ocr for general text recognition, /slide_match for comparing images in sliding captcha puzzles, and /detection for object detection within images. Requests can be made using either image files or Base64 encoded strings, with options to control output verbosity and image processing.

Quick Start & Requirements

  • Install/Run:
    • Clone the repository: git clone https://github.com/your-repo/ddddocr-api.git
    • Navigate to the directory: cd ddddocr-api
    • Build and run with Docker:
      docker build -t ddddocr-api .
      docker run -d -p 8000:8000 --name ddddocr-api-container ddddocr-api
      
    • Alternatively, run directly: python app/main.py or uvicorn app.main:app --reload
  • Prerequisites: Docker (20.10+), Docker Compose (1.29+). Recommended OS: Linux (Ubuntu 20.04 LTS+).
  • Verification: Access http://localhost:8000/docs for Swagger UI.
  • Links: GitHub Repository (Note: The provided README uses a placeholder URL for cloning).

Highlighted Details

  • Supports OCR, sliding captcha matching, and object detection.
  • Accepts image input via file upload or Base64 encoding.
  • Provides options for probability output and PNG fixing in OCR.
  • Includes example API calls for Python, Node.js, C#, PHP, and Go.

Maintenance & Community

  • The project is maintained by sml2h3.
  • No specific community links (Discord/Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license is permissive and generally compatible with commercial and closed-source applications.

Limitations & Caveats

  • The README uses a placeholder URL for cloning the repository.
  • Production deployment recommendations include HTTPS and authentication, which are not configured by default.
Health Check
Last commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
56 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.