Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update resize() to be on par with torchvision speed #144

Closed
wants to merge 17 commits into from
Closed
3 changes: 2 additions & 1 deletion augly/image/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,7 @@ def resize(
metadata: Optional[List[Dict[str, Any]]] = None,
bboxes: Optional[List[Tuple]] = None,
bbox_format: Optional[str] = None,
interpolation: int = Image.BILINEAR
membriux marked this conversation as resolved.
Show resolved Hide resolved
) -> Image.Image:
"""
Resizes an image
Expand Down Expand Up @@ -2027,7 +2028,7 @@ def resize(
src_mode = image.mode

im_w, im_h = image.size
aug_image = image.resize((width or im_w, height or im_h))
aug_image = image.resize((width or im_w, height or im_h), interpolation)

imutils.get_metadata(
metadata=metadata,
Expand Down