0

I am very new to coding and I am having trouble importing images into google colab. It is saying I have an atribute error. Can you help me! My goal is to spot the difference between two images. I used this persons codes (https://www.youtube.com/watch?v=fUfvBnREBFc) and tried to modify it so it can be used in google colab Thanks!

from google.colab import files
from PIL import Image, ImageChops
path = '/content/gdrive/My Drive/Photo/Test 1/'
path_img1 = Image.files('/content/gdrive/My Drive/Photo/Test1/source1.png/')
path_img2 = Image.files('/content/gdrive/My Drive/Photo/Test1/target1.png/')
diff = ImageChops.difference(path_img1, path_img2)
if diff.getbbox():
   diff.show()

line 4 : AttributeError: module 'PIL.Image' has no attribute 'files'

0 Answers0