When installed through pip the line pil_image = Image.open(image).convert('RGBA') in depixelate.py is incorrect. In the repo there's the correct one which is pil_image = Image.fromarray(image).convert('RGBA')