datumaro.plugins.openvino_plugin.samples.clip_visual_vit_l_14_336px_int8_interp#
Classes
- class datumaro.plugins.openvino_plugin.samples.clip_visual_vit_l_14_336px_int8_interp.ClipViTL14ModelInterpreter[source]#
Bases:
IModelInterpreter
- mean = array([[[123.675, 116.28 , 103.53 ]]])#
- std = array([[[58.395, 57.12 , 57.375]]])#
- preprocess(inp: DatasetItem) Tuple[ndarray | Dict[str, ndarray], PrepInfo] [source]#
Preprocessing an dataset item input.
- Parameters:
img – DatasetItem input
- Returns:
It returns a tuple of preprocessed input and preprocessing information. The preprocessing information will be used in the postprocessing step. One use case for this would be an affine transformation of the output bounding box obtained by object detection models. Input images for those models are usually resized to fit the model input dimensions. As a result, the postprocessing step should refine the model output bounding box to match the original input image size.
- postprocess(pred: Dict[str, ndarray] | List[Dict[str, ndarray]], info: PrepInfo) List[Annotation] [source]#
Postprocess a model prediction.
- Parameters:
pred – Model prediction
info – Preprocessing information coming from the preprocessing step
- Returns:
A list of annotations which is created from the model predictions