我正在尝试将一个狗图像与一桶装满狗图像的桶进行比较,并获得它们的相似性,有人有这样做的线索吗?
答案 0 :(得分:1)
您可以尝试Vision API的ProductSearch:https://cloud.google.com/vision/product-search/docs/
您构建产品的ProductSet。您将参考图像添加到每个产品。稍后,您发送一个查询图像,它将在ProductSet中返回视觉上最相似的结果。
答案 1 :(得分:0)
您可以使用我的Ruby gem来实现两个感知图像哈希,以计算图像相似度。
require "dhash-vips"
hash0 = DHashVips::IDHash.fingerprint "dog.jpg"
hash1 = DHashVips::IDHash.fingerprint "dog1.jpg"
hash2 = DHashVips::IDHash.fingerprint "dog2.jpg"
puts "dog1 is this much different: #{DHashVips::IDHash.distance hash0, hash1}"
puts "dog2 is this much different: #{DHashVips::IDHash.distance hash0, hash2}"