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
When giving to fit_transform() a path as a string, it is not able to take the images due to a try-except control in import_data.
This is due to the fact that, if the image has already the same shape of the variable dim, the cv2.resize raise an error...
By changing the function imresize it works!
def imresize(img, dim=(128, 128)):
"""Resize image."""
if dim is not None and img.shape != dim:
img = cv2.resize(img, dim, interpolation=cv2.INTER_AREA)
return img
The text was updated successfully, but these errors were encountered:
Thank you for pointing this out and providing the solution!
I added your solution in the code and created a new release.
Update to the latest release with: pip install -U clustimage
When giving to fit_transform() a path as a string, it is not able to take the images due to a try-except control in import_data.
This is due to the fact that, if the image has already the same shape of the variable dim, the cv2.resize raise an error...
By changing the function imresize it works!
def imresize(img, dim=(128, 128)):
"""Resize image."""
if dim is not None and img.shape != dim:
img = cv2.resize(img, dim, interpolation=cv2.INTER_AREA)
return img
The text was updated successfully, but these errors were encountered: