使用神经网络查找最相似的图像 [英] Find most similar images by using neural networks

查看:213
本文介绍了使用神经网络查找最相似的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Python,scikit-learn和keras.我有300,000张正面手表的图像,如下所示: 监视_1 Watch_3 .

I am working with Python, scikit-learn and keras. I have 3000 thousands images of front-faced watches like the following ones: Watch_1, Watch_2, Watch_3.

我喜欢编写程序来接收真实手表的照片作为输入,该照片的拍摄条件可能不如上面的照片(理想的背景颜色,更暗的闪电等)在不太理想的条件下拍摄,并且找到了3000枚中最相似的手表.它.类似地,我的意思是,如果我输入一张带有薄花边的棕色圆形手表的照片作为输入,那么我期望将其制成为圆形,深色和薄花边的棕色手表的照片.

I like to write program which receives as an input a photo of a real watch which maybe taken under less ideal conditions than the photos above (different background colour, darker lightning etc) and find the most similar watches among the 3000 ones to it. By similarity I mean that if I give as an input a photo of a round, brown watch with thin lace then I expect as an output watches of round shape, of dark colour and with thin lace.

最有效的机器学习算法是什么?

What is the most efficient machine learning algorithm to do this?

例如,通过遵循

For example, by following this link I have two different solutions in my mind:

1)使用CNN作为特征提取器,并参考输入图像比较每对图像的这些特征之间的距离.

1) Using a CNN as a feature extractor and compare the distances between the these features for every pair of images with reference to the input image.

2)在暹罗神经网络中使用两个CNN来比较图像.

2) Using two CNNs in a Siamese Neural Network to compare the images.

这两个选项是执行此任务的最佳选择吗?还是您会提出其他建议?

Are these two options the best ones for this task or would you suggest something else?

您知道用于此任务的任何预训练神经网络(具有预定超参数)吗?

Do you know any pre-trained neural network (with pre-determined hyperparameters) for this task?

我在StackOverflow上发现了一些有趣的帖子,但是它们已经很老了: Post_2 Post_3 .

I have found some interesting posts on StackOverflow about this but they are pretty old: Post_1, Post_2, Post_3.

推荐答案

要很难定义与照片相似的含义.由于它们都是手表,因此您必须决定与您最相似的功能(形状,颜色,数字/空白面等)

It's going to be difficult to define what exactly you mean by similar with your photos. Since they are all watches you'll have to decide which features being most similar matter to you (shape, color, numbers/blank face etc.)

这是将tensorflow库与最近的邻居库混合使用的示例代码: http://douglasduhaime.com/posts/identifying-similar-images-with-tensorflow.html

Here is an approach using the tensorflow library mixed with a nearest neighbor library with example code: http://douglasduhaime.com/posts/identifying-similar-images-with-tensorflow.html

它至少可以帮助您入门.

It can at least get you started.

这篇关于使用神经网络查找最相似的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆