imlab.extractor_wrapper.preprocess

imlab.extractor_wrapper.preprocess(image: ndarray, device: str = 'cpu') FloatTensor[source]

preprocess. Pre process the input image: transform to float and normalize

Parameters
  • image (str) – image to be preprocessed

  • device – device to be used

Return type

torch.FloatTensor