I developed a shinyapp for image-claffification using a keras vgg16 pre-trained model and text2vec distance calculation.
The idea is: you see a nice product outside the store and you wanna know if that particular product is available in the store. So you take a photo, upload it to the app and the app shows you the most similar products the store has to offer.
Much like in the i-love-ikea-app (see here). I tried to rebuild it with my own products. As the author most likely will not respond to my issue after 3 years, i brougth the topic here, hope its fine.
For my project i began with 10 product images. So first of all i extracted the features of these 10 images, whichs results in a 10 by 25088 matrix, using the vgg16 pre-trained keras model without top layers.
Whenever a new image is uploaded to the app, the same keras model is used.
Afterwards the distances between the new image (1 by 25088 matrix) and the 10 images (10 by 25088 matrix) are calculated.
So far so good. The curious thing, which brought me here is that when i upload an image of product X to the app, while the app is trained on that particular image of product X, the app says the similarity is only ~75%. It should be 100%. Should it not?
Why is this? is this due to some code issues, or due to some more fundamental mathimatical/deep learning background, which i did not considered cause iam a machine learning beginner?
The code is basicly the same as the one from Longhows App (see above). The same problem occurs in his App too. So i presume, the issues are due to some things i dont understand yet.
However, i appreciate every hint