Module contrib.classification.transforms
Contains the transforms used in every spot:
- Training
- Making figures
- Web app
For both figures and the webapp, the transform is:
- Resize the image so that the shortest size is 512 pixels.
- Take the middle 448x448 as a crop
This gives us object-centric images that are 448x448 (fixed pixel size is important for the web app) and not distorted.
Functions
def for_figures()
def for_training(vit_ckpt: str)
def for_webapp(img: PIL.Image.Image) ‑> PIL.Image.Image