pipeline field detection

This commit is contained in:
Pete Matsyburka
2026-04-18 22:06:58 +03:00
parent 888f1ec6df
commit 0af6ccf35f
3 changed files with 52 additions and 20 deletions
+12
View File
@@ -73,6 +73,18 @@ module Templates
build_fields_from_detections(detections, image)
end
def prepare_input(image, **opts)
{ image:, **opts }
end
def enqueue(image:, **infer_opts)
-> { call(image, **infer_opts) }
end
def process_outputs(outputs, **)
outputs
end
def call_v2(image, offset_x, offset_y, split_page, confidence:, resolution:)
if split_page && image.height > image.width
regions = build_split_image_regions(image)