Comparing device captured image with image in Goog

2019-08-17 10:09发布

I would like to store a set of images on my Google Cloud Services Bucket and compare an image against that set using the Vision API.

Is this possible?

The closest thing I could find in my research is creating a searchable image set https://cloud.google.com/solutions/image-search-app-with-cloud-vision but I can't see how I can leverage this to do what I want.

Ideal Scenario

I take an image on my device, I then send that image in a json object to the vision endpoint, that image is then compared against the image set in my Bucket and a similarity score is returned for each image in my Bucket.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-08-17 10:40

Cloud Vision gives you a match percentage against a "label", not the specific image.

There is no universal measure of similarity between two images. Every another algorithm of similarity calculation uses the formula they thought would work best for their personal needs.

When I used the Could Vision to find the most similar image from the set probably the formula I used at the end was

enter image description here https://drive.google.com/file/d/0B3BLwu7Vb2U-SVhKYWVMR2JvOFk/view?usp=sharing

But when I need to match rather by visual similarity than by labels I use my gem for the IDHash perceptual hashing algorithm https://github.com/Nakilon/dhash-vips

查看更多
登录 后发表回答