MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / preprocess_auto

Method preprocess_auto

openrec/preprocess/cmer_label_encode.py:582–590  ·  view source on GitHub ↗
(self,
                        images: ImageInput,
                        return_tensors: Optional[Union[str,
                                                       TensorType]] = None,
                        trainer=None,
                        **kwargs)

Source from the content-addressed store, hash-verified

580 input_data_format=ChannelDimension.LAST)
581
582 def preprocess_auto(self,
583 images: ImageInput,
584 return_tensors: Optional[Union[str,
585 TensorType]] = None,
586 trainer=None,
587 **kwargs) -> BatchFeature:
588 if trainer is not None and getattr(trainer, 'is_in_train', False):
589 kwargs.setdefault('do_augment', True)
590 return self.preprocess(images, return_tensors=return_tensors, **kwargs)
591
592 @filter_out_non_signature_kwargs()
593 def preprocess(

Callers

nothing calls this directly

Calls 1

preprocessMethod · 0.95

Tested by

no test coverage detected