Crop Images With FiveCrop In PyTorch
FiveCrop() crops an image into 5 parts. Use FiveCrop(size=(100, 100)) or FiveCrop(size=100) for a square crop. For non-square crops, use FiveCrop(size=[500, 394]).
Buy Me a Coffee☕ *Memos: My post explains OxfordIIITPet(). FiveCrop() can crop an image into 5 parts(Top-left, Top-right, bottom-left, bottom-right and center) 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: A tensor must be the 2D or 3D of one or more elements. Don't use img=. v2 is recom...