-
Notifications
You must be signed in to change notification settings - Fork 975
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
base: develop
Are you sure you want to change the base?
fix image cls process #2731
Conversation
Thanks for your contribution! |
1dd13fa
to
00a9ae1
Compare
paddlex/inference/models_new/image_classification/processors.py
Outdated
Show resolved
Hide resolved
0f2d514
to
1fa4b96
Compare
1fa4b96
to
cb82b84
Compare
if backend.lower() == "cv2": | ||
resize_function = _cv2_resize | ||
elif backend.lower() == "pil": | ||
resize_function = _pil_resize | ||
else: | ||
resize_function = _cv2_resize |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
报错信息不对
No description provided.