Conclusion : The best that I could get using the lzw compressor from PIL was 61.5%. This is worse than the other one at 40, which is likely because it is using multiple channels instead of just one.
%% Cell type:code id: tags:
``` python
deffile_extractor(dirname="images"):
files=os.listdir(dirname)
scenes=[]
forfileinfiles:
iffile=='.DS_Store':
continue
else:
scenes.append(os.path.join(dirname,file))
returnscenes
defimage_extractor(scenes):
image_folder=[]
forsceneinscenes:
files=os.listdir(scene)
forfileinfiles:
iffile[-5:]!=".tiff"orfile[-7:]=="_6.tiff":
continue
else:
image_folder.append(os.path.join(scene,file))
returnimage_folder#returns a list of file paths to .tiff files in the specified directory given in file_extractor