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

fix image cls process #2731

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

zhangyubo0722
Copy link
Collaborator

No description provided.

Copy link

paddle-bot bot commented Dec 25, 2024

Thanks for your contribution!

@zhangyubo0722 zhangyubo0722 force-pushed the fix_cls_crop branch 2 times, most recently from 0f2d514 to 1fa4b96 Compare January 2, 2025 12:32
Comment on lines +34 to +39
if backend.lower() == "cv2":
resize_function = _cv2_resize
elif backend.lower() == "pil":
resize_function = _pil_resize
else:
resize_function = _cv2_resize
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    if backend.lower() == "pil":
        resize_function = _pil_resize
    else:
        resize_function = _cv2_resize

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else:
    warning

return cv2.resize(src, size, interpolation=resample)


def _pil_resize(src, size, resample, return_numpy=True):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return_numpy 删掉

except KeyError:
raise ValueError(
"`interp` should be one of {}.".format(self._INTERP_DICT.keys())
"`interp` should be one of {} or {} for backend '{}'. Please check the supported interpolation methods.".format(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

报错信息不对

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants