Configuration for input preprocessing pipeline.
Defines preprocessing operations to be applied to model inputs, including operations like resize, normalize, color conversion, etc. Each pipeline entry is {"op": <name>, ...op keys}; unknown keys are rejected. resize/letterbox take "backend": "torch" (default, float interpolate), "pil" (Pillow, bit-exact, bilinear/bicubic) or "opencv" (cv2 INTER_LINEAR, bit-exact), so calibration sees the same pixels as an evaluator built on that library. letterbox "alignType" is 0 (default: center, padding split around the image) or 1 (top-left: padding only at the bottom and right, as YOLOX and DAMO-YOLO use). letterbox "roundType" is 0 (default: each backend's rounding of the resized size) or 1 (floor: upstream YOLOX and DAMO-YOLO's int(w * r)); a fuseIntoFirstLayer letterbox ignores it, since its exact odd decimation has no fraction to round.
- Parameters
-
| apply | bool. If true, apply preprocessing pipeline |
| auto_convert_format | bool. If true, automatically convert input format |
| pipeline | List[Dict[str, Any]]. List of preprocessing operations to apply globally |
| input_configs | Dict[str, Any]. Per-input preprocessing configurations. Keys are input names |
Definition at line 47 of file models.py.