Skip to main content

What is EasyOCR?

Ready-to-use OCR with 80+ supported languages using deep learning models. Best for multi-language support with high accuracy.

Usage

from upsonic.ocr import OCR
from upsonic.ocr.easyocr import EasyOCR

# Create OCR with EasyOCR
ocr = OCR(EasyOCR, languages=['en', 'zh'], gpu=True, rotation_fix=True)

# Extract text
text = ocr.get_text('document.pdf')
print(text)

# Get detailed results
result = ocr.process_file('image.png')
print(f"Confidence: {result.confidence:.2%}")
for block in result.blocks:
    print(f"Text: {block.text}, Confidence: {block.confidence:.2%}")

Parameters

ParameterTypeDefaultDescription
languagesList[str]['en']List of language codes to detect
gpuboolFalseEnable GPU acceleration for faster processing
rotation_fixboolFalseAuto-detect and fix image rotation
enhance_contrastboolFalseEnhance image contrast
remove_noiseboolFalseApply noise reduction
confidence_thresholdfloat0.0Minimum confidence for text blocks
paragraphboolFalseGroup text into paragraphs
min_sizeint10Minimum text region size
text_thresholdfloat0.7Text detection threshold

Supported Languages

80+ languages including English, Chinese, Japanese, Korean, Thai, Vietnamese, Arabic, Russian, and most European languages.