CenterCrop In PyTorch: A Guide To Size Arguments And Usage
CenterCrop() crops an image centering on it. The size argument can be a single value (int or tuple/list(int)) for [size, size] or a tuple/list with 1 or 2 elements for [height, width].
Buy Me a Coffee☕ *Memos: My post explains FiveCrop(). My post explains RandomCrop() about size argument. My post explains RandomResizedCrop() about size argument. My post explains OxfordIIITPet(). CenterCrop() can crop an image, centering on it as shown below: *Memos: The 1st argument for initialization is size(Required-Type:int or tuple/list(int) or size()): *Memos: It's [height, width]. It must be 1 <= x. A tuple/list must be the 1D with 1 or 2 elements. A single value(int or tuple/list(int)) means [size, size]. The 1st argument is img(Required-Type:PIL Image or tensor(int)): *Memos:...