sbt-idp/cope2n-ai-fi/configs/sdsap_sbt/configs.py

36 lines
1.5 KiB
Python
Executable File

device = "cuda:0"
ocr_engine = {
"detector": {
"version": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsvtd/27Dec_washing420_79_epoch_100_params.pth",
"rotator_version": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsvtd/best_bbox_mAP_epoch_30_lite.pth",
"auto_rotate": False,
"device": device
},
"recognizer": {
"version": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsvtr/hub/sbt_20231218_e116_sdstr.pth",
"device": device
},
"deskew": {
"enable": True,
"text_detector": {
"config": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsv_dewarp/det.yaml",
"weight": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsv_dewarp/ch_PP-OCRv3_det_infer"
},
"text_cls": {
"config": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsv_dewarp/cls.yaml",
"weight": "/workspace/cope2n-ai-fi/weights/models/ocr_engine/sdsv_dewarp/ch_ppocr_mobile_v2.0_cls_infer"
},
"device": device
}
}
kvu_model = {
"device": device,
"mode": 4,
"option": "sbt_v2",
"model": {
"pretrained_model_path": "/workspace/cope2n-ai-fi/weights/layoutxlm-base",
"config": "/workspace/cope2n-ai-fi/weights/models/sdsvkvu/key_value_understanding_for_sbt-20240603-081908/base.yaml",
"checkpoint": "/workspace/cope2n-ai-fi/weights/models/sdsvkvu/key_value_understanding_for_sbt-20240603-081908/checkpoints/best_model.pth"
}
}