You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar things with Transforms module and classes:
RandomRotation: fill/resample
RandomAffine: fillcolor/resample
RandomPerspective: fill/interpolation
RandomResizedCrop: interpolation
Pad: fill
RandomCrop: fill
Resize: interpolation
fill is mainly used: 4 times in transforms and 3 times in functional vs fillcolor is used 2 times in transforms and functional (RandomAffine and F.affine) => we can decide to replace fillcolor by fill and set a warning about argument deprecation.
interpolation is used 6 times in transforms/functional vs resample is used 4 times in transforms/functional => we can similarly decide to replace resample by interpolation and set a warning about argument deprecation.
🚀 Feature
Currently, we can observe a certain freedom in argument names and their meaning:
F.resize
,F.resized_crop
,F.perspective
vision/torchvision/transforms/functional.py
Line 313 in ab73b44
vision/torchvision/transforms/functional.py
Lines 443 to 445 in ab73b44
vision/torchvision/transforms/functional.py
Line 512 in ab73b44
have
interpolation
argumentfill
argumentF.rotate
,F.affine
vision/torchvision/transforms/functional.py
Line 761 in ab73b44
vision/torchvision/transforms/functional.py
Lines 843 to 846 in ab73b44
have
resample
argument for interpolation (with a wrong default value asbool
instead ofint
)fill
orfillcolor
arguments for filling outside part of imageangle
is interpreted differently betweenF.rotate
,F.affine
.angle (float or int): rotation angle in degrees between -180 and 180, clockwise direction.
angle (float or int): In degrees degrees counter clockwise order.
Idea is to harmonize the API:
interpolation
andresample
fill
andfillcolor
angle
?Maybe, there are other arguments to add to this list.
The text was updated successfully, but these errors were encountered: