Compare image similarity in Python
You can use ImageHash

The difference between the hashed images will give you a similarity score 

from PIL import Image
import imagehash

hash = imagehash.average_hash(Image.open('test.png'))
otherhash = imagehash.average_hash(Image.open('other.bmp'))

print(hash - otherhash)


https://pypi.org/project/ImageHash/