dots-ocr-idcard / scripts /test_config.json
tommulder's picture
feat(api): fast FastAPI app + model loader refactor; add mock mode for tests\n\n- Add pyproject + setuptools config and console entrypoint\n- Implement enhanced field extraction + MRZ heuristics\n- Add response builder with compatibility for legacy MRZ fields\n- New preprocessing pipeline for PDFs/images\n- HF Spaces GPU: cache ENV, optional flash-attn, configurable base image\n- Add Make targets for Spaces GPU and local CPU\n- Add httpx for TestClient; tests pass in mock mode\n- Remove embedded model files and legacy app/modules
211e423
{
"api_endpoints": {
"local": "http://localhost:7860",
"staging": "https://algoryn-dots-ocr-idcard-staging.hf.space",
"production": "https://algoryn-dots-ocr-idcard.hf.space"
},
"test_images": [
"tom_id_card_front.jpg",
"tom_id_card_back.jpg"
],
"expected_fields": [
"document_number",
"surname",
"given_names",
"nationality",
"date_of_birth",
"gender",
"date_of_issue",
"date_of_expiry"
],
"roi_test_cases": [
{
"name": "full_image",
"roi": null,
"description": "Process entire image"
},
{
"name": "center_crop",
"roi": {
"x1": 0.25,
"y1": 0.25,
"x2": 0.75,
"y2": 0.75
},
"description": "Process center 50% of image"
},
{
"name": "top_half",
"roi": {
"x1": 0.0,
"y1": 0.0,
"x2": 1.0,
"y2": 0.5
},
"description": "Process top half of image"
}
],
"performance_thresholds": {
"max_processing_time": 10.0,
"min_confidence": 0.7,
"min_fields_extracted": 3
},
"test_timeout": 30
}