--- id: ddddocr version: "1.6.1" license: The MIT License (MIT) Copyright © 2022 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # ddddocr — 带带弟弟OCR License: permissive · Maintenance: active · Downloads: 416.6K/mo ## What it is and what it does ddddocr is an offline, local captcha recognition library that uses pre-trained neural network models to identify text and objects in images. It handles common alphanumeric captchas, Chinese characters, slider puzzles, and special characters without requiring external API calls. The library wraps ONNX Runtime models and depends on numpy, Pillow, and OpenCV for image processing. You initialize it once, then call `classification()` on image bytes to get recognized text. It supports multiple modes—standard OCR, object detection, slider matching—and allows GPU acceleration if you have CUDA available. The package also provides probability distributions per character and lets you constrain recognition to specific character sets, useful when you know the captcha format in advance. Use it for: - Automate login flows that require solving simple alphanumeric captchas in web scraping or testing - Batch-process captcha images offline without hitting rate limits or costs of external OCR services - Detect and locate objects or text regions in images for accessibility or content moderation workflows - Recognize Chinese character captchas or mixed-language verification codes in regional applications - Match slider puzzle gaps by comparing edge patterns between template and target images ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Recognizes text and detects objects in captcha images using offline neural network models, supporting digits, letters, Chinese characters, and slider captchas. Yes, if you need offline captcha recognition and accept the trade-off that accuracy depends on model fit to your specific captcha style. The permissive MIT license, active maintenance, low install friction, and no known vulnerabilities make it a reasonable choice for development and production. Start with the default model; if accuracy is poor, try the beta model or train a custom one. ## Install pip install ddddocr uv add ddddocr poetry add ddddocr ## Installing ddddocr Before you install: Low friction install with pure-Python wheel and five runtime dependencies (numpy, onnxruntime, Pillow, opencv-python variants). Active maintenance with recent commits and 14606 GitHub stars. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install ddddocr import ddddocr ocr = ddddocr.DdddOcr() with open('captcha.jpg', 'rb') as f: result = ocr.classification(f.read()) print(result) Requires Python 3.10 or later; GPU acceleration needs CUDA and onnxruntime-gpu separately installed. Verify before relying: - Actual recognition accuracy rates across different captcha types and complexity levels - Memory footprint and latency benchmarks for batch processing - Whether custom model training via dddd_trainer is documented and accessible ## Package facts - License: The MIT License (MIT) Copyright © 2022 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 416.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags captcha recognition, ocr verification code, image text detection, offline captcha solver, neural network ocr, slide puzzle detection, chinese character recognition, captcha-solving, offline-ml, image-recognition [View on SkillFed](https://skillfed.io/packages/ddddocr) · [View on PyPI](https://pypi.org/project/ddddocr/)