Shortcuts

InferencerLoader

class mmocr.datasets.transforms.InferencerLoader(**kwargs)[source]

Load the image in Inferencer’s pipeline.

Modified Keys:

  • img

  • img_path

  • img_shape

  • ori_shape

Parameters

to_float32 (bool) – Whether to convert the loaded image to a float32 numpy array. If set to False, the loaded image is an uint8 array. Defaults to False.

Return type

None

transform(single_input)[source]

Transform function to add image meta information.

Parameters

single_input (str or dict or np.ndarray) – The raw input from inferencer.

Returns

The dict contains loaded image and meta information.

Return type

dict