Comparing device captured image with image in Google Cloud Bucket

送分小仙女□ 提交于 2019-12-11 15:17:34

问题


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:


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

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



来源:https://stackoverflow.com/questions/55862249/comparing-device-captured-image-with-image-in-google-cloud-bucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!