深度学习Kaggle大赛房价预测赛指导(数据科学)
img = Image.open(expand_path(file))
img_hash = phash(img) # 为图片计算其hash值
picture_2_hash[file] = img_hash # Find all images associated with a given phash value.
hash_2_picture = {} # hash值到图片的映射
for picture, hash in picture_2_hash.items(): # 相同的hash值下面可能有多