Loading...
Loading...
High-precision Optical Character Recognition (OCR) service. Supports text detection and extraction for multi-language, multi-format images, and provides text area coordinates and confidence scores, suitable for document digitization and image content analysis.
npx skill4agent add lin-a1/skills-agent ocr-servicefrom services.ocr_service.client import OCRServiceClient
client = OCRServiceClient()
# Health check
status = client.health_check()
# OCR recognition
image_base64 = client.image_to_base64("/path/to/image.jpg")
result = client.ocr(image_base64)
# Get recognition results
texts = result["rec_texts"] # ["Recognized text 1", "Recognized text 2", ...]
scores = result["rec_scores"] # [0.98, 0.95, ...]{
"doc_preprocessor_res": {"angle": 0},
"dt_polys": [[x1,y1], [x2,y2], ...],
"rec_texts": ["Recognized text 1", "Recognized text 2"],
"rec_scores": [0.98, 0.95]
}rec_textsrec_scoresdt_polys