(img, target)
| 28 | # We define a transformation function which does transform the annotation |
| 29 | # to the required format for the Resize transformation |
| 30 | def _transform(img, target): |
| 31 | boxes = target["boxes"] |
| 32 | transformed_img, transformed_boxes = T.Resize( |
| 33 | input_shape, preserve_aspect_ratio=args.keep_ratio, symmetric_pad=args.symmetric_pad |
| 34 | )(img, boxes) |
| 35 | return transformed_img, {"boxes": transformed_boxes, "labels": target["labels"]} |
| 36 | |
| 37 | predictor = ocr_predictor( |
| 38 | args.detection, |
nothing calls this directly
no outgoing calls
no test coverage detected