CenterCrop
https://pytorch.org/vision/stable/generated/torchvision.transforms.CenterCrop.html
Heard about this term at NVIDIA.
Implementing CenterCrop is actually kind of annoying.
Doing the math for this
Source code implementation for augment.py from Ultralytics (NOT USED)
They actually use the torch
centercrop version:
tfl += [T.CenterCrop(size)]
Source code
https://pytorch.org/vision/main/_modules/torchvision/transforms/transforms.html#CenterCrop
Calls center_crop
→ https://pytorch.org/vision/main/_modules/torchvision/transforms/functional.html#center_crop