File size: 1,554 Bytes
948d40c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | name: "ocr"
platform: "ensemble"
input [
{
name: "IMAGE_BYTES"
data_type: TYPE_STRING
dims: [1]
}
]
output [
{
name: "TEXT_LIST"
data_type: TYPE_STRING
dims: [-1]
},
{
name: "OCR_BOX_LIST"
data_type: TYPE_FP32
dims: [-1, 4, 2]
}
]
ensemble_scheduling {
step {
model_name: "ocr_td_preprocess"
model_version: -1
input_map { key: "image_bytes" value: "IMAGE_BYTES" }
output_map { key: "resized_image" value: "resized_image" },
output_map { key: "resize_ratio" value: "resize_ratio" },
output_map { key: "original_image" value: "original_image" }
}
step {
model_name: "ocr_td_engine"
model_version: -1
input_map { key: "input" value: "resized_image" }
output_map { key: "output" value: "td_output" }
}
step {
model_name: "ocr_td_postprocess"
model_version: -1
input_map { key: "td_output" value: "td_output" },
input_map { key: "resize_ratio" value: "resize_ratio" }
output_map { key: "detected_text_box_list" value: "detected_text_box_list" }
}
step {
model_name: "ocr_tr_bls"
model_version: -1
input_map { key: "original_image" value: "original_image" },
input_map { key: "detected_text_box_list" value: "detected_text_box_list" }
output_map { key: "text_list" value: "TEXT_LIST" },
output_map { key: "box_list" value: "OCR_BOX_LIST" }
}
}
|