Using Siamese Neural Networks to Generate Image-Based Travel Recommendations
DOI:
https://doi.org/10.58445/rars.99Keywords:
artificial intelligence, machine learning, computer vision, neural network, travelAbstract
Planning a trip is hard and time-consuming, but thanks to recommenders, it doesn’t have to be. Today, recommenders are used in practically every industry, making the user experience simple and stress-free. However, most recommenders have access to large volumes of data, something that is not always available when it comes to recommending travel destinations, leading to what is known as the cold start problem. For example, when recommending hotels or restaurants, recommenders can make matches based on user reviews. Recommending a destination presents a different kind of problem. There are little to no user reviews for an overall city, beach, or destination. This is why a different approach must be taken: using images to recommend travel destinations. Similar images of various types of destinations can be analyzed by a neural network in order to determine their similarity. But even then, a large amount of images would be needed in order to train an effective neural network capable of predicting accurate recommendations. So in order to minimize the amount of images needed, a Siamese Neural Network will be implemented. The model will be implemented using the TensorFlow framework with a Triplet Loss function. The dataset being used to train the network is a small custom-built dataset of city and beach images gathered from Wikipedia and Wikimedia Commons. The demonstrated Siamese model was able to accurately identify similar images of similar places.
References
A. Faroughi and P. Moradi, ”MOOCs Recommender System with Siamese Neural Network,” 2022 9th International and the 15th National Conference on E-Learning and E-Teaching (ICeLeT), 2022, pp. 1-6, doi: 10.1109/ICeLeT55619.2022.9765439.
J, Sean Benhur. “A Friendly Introduction to Siamese Networks.” Medium, Towards Data Science, 2 Sept. 2020, https://towardsdatascience.com/a-friendly-introduction-to-siamese-networks-85ab17522942.
Dutt, Aditya. “Siamese Networks Introduction and Implementation.” Medium, Towards Data Science, 11 Mar. 2021, https://towardsdatascience.com/siamese-networks-introduction-and-implementation-2140e3443dee.
Vassallo, Thomas. “Calculating Audio Song Similarity Using Siamese Neural Networks.” Medium, Towards Data Science, 28 Aug. 2020, https://towardsdatascience.com/calculating-audio-song-similarity-using-siamese-neural-networks-62730e8f3e3d.
Trotter, Cameron. “How to Train Your Siamese Neural Network.” Medium, Towards Data Science, 19 Feb. 2021, https://towardsdatascience.com/how-to-train-your-siamese-neural-network-4c6da3259463.
Salakhutdinov, Ruslan, et al. “Siamese Neural Networks for One-Shot Image Recognition.” Carnegie Mellon University School of Computer Science, 2015, https://www.cs.cmu.edu/rsalakhu/papers/oneshot1.pdf.
Moindrot, Olivier. “Triplet Loss and Online Triplet Mining in Tensorflow.” Olivier Moindrot Blog, 19 Mar. 2018, https://omoindrot.github.io/triplet-loss.
Guha, Sunny. “Custom Loss Function in Tensorflow 2.0.” Medium, Towards Data Science, 6 Jan. 2020, https://towardsdatascience.com/custom-loss-function-in-tensorflow-2-0-d8fa35405e4e.
Rosebrock, Adrian. “Building Image Pairs for Siamese Networks with Python.” PyImageSearch, 23 Nov. 2020, https://pyimagesearch.com/2020/11/23/building-image-pairs-for-siamese-networks-with-python/.
Rosebrock, Adrian. “Siamese Networks with Keras, Tensorflow, and Deep Learning.” PyImageSearch, 30 Nov. 2020, https://pyimagesearch.com/2020/11/30/siamese-networks-with-keras-tensorflow-and-deep-learning/.
Rosebrock, Adrian. “Comparing Images for Similarity Using Siamese Networks, Keras, and Tensorflow.” PyImageSearch, 7 Dec. 2020, https://pyimagesearch.com/2020/12/07/comparing-images-for-similarity-using-siamese-networks-keras-and-tensorflow/.
Khandelwal, Renu. “One-Shot Learning with Siamese Network.” Medium, The Startup, 28 Jan. 2021, https://medium.com/swlh/one-shot-learning-with-siamese-network-1c7404c35fda.
Great Learning Team. “Similarity Learning with Siamese Networks.” Great Learning, 17 Dec. 2020, https://www.mygreatlearning.com/blog/siamese-networks/.
Prasad, Krishna. “Siamese Networks - Line by Line Explanation for Beginners.” Medium, Towards Data Science, 21 June 2020, https://towardsdatascience.com/siamese-networks-line-by-line-explanation-for-beginners-55b8be1d2fc6.
Ramachandran, Abhi. “Using Triplet Loss and Siamese Neural Networks to Train Catalog Item Embeddings.” DoorDash Engineering Blog, 8 Sept. 2021, https://doordash.engineering/2021/09/08/using-twin-neural-networks-to-train-catalog-item-embeddings/.
Das, Shibsankar. “Image Similarity Using Triplet Loss.” Medium, Towards Data Science, 16 July 2019, https://towardsdatascience.com/image-similarity-using-triplet-loss-3744c0f67973.
Shrestha, Enosh. “Triplet Loss and Siamese Neural Networks.” Medium, 24 Oct. 2019, https://medium.com/@enoshshr/triplet-loss-and-siamese-neural-networks-5d363fdeba9b.
Essam, Hazem, and Santiago L. Valdarrama. “Image Similarity Estimation Using a Siamese Network with a Triplet Loss.” Keras, 25 Mar. 2021, https://keras.io/examples/vision/siamese_network/.
Downloads
Posted
Categories
License
Copyright (c) 2022 Samantha Vaca
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.