深度學(xué)習(xí)Kaggle大賽房價(jià)預(yù)測賽指導(dǎo)(數(shù)據(jù)科學(xué))
? ? ?img = Image.open(expand_path(file))
? ? ? ? ? ? ? ? ? ?img_hash = phash(img) ?# 為圖片計(jì)算其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值下面可能有多
標(biāo)簽: