First convFirst convert it to image object by Image.fromarray
then use convert
ert it to image First
AttributeError: ‘numpy.ndarray‘ object has no attribute ‘convert'
Convert it to an image object by Image.fromarray
then use convert
from PIL import Image
grad2__ = Image.fromarray(grad2_)
-----------------------------------------
hash0 = imagehash.average_hash(grad2__)
or
image = grad2__.convert("RGB")