Wine Search

February 22, 2024
local_offer Web PWA
Overview

A web application for searching wine reviews. The web application is only available in Japanese.

Try App open_in_new Table of Contents

Tech Stack

Frontend: JavaScript, React, webpack
Backend: Ruby, Rails, Python, PyTorch, OpenCV
Database: MariaDB, Elasticsearch, Memcached
Web Server: NGINX
DevOps: Chef, Capistrano

(In Evaluation Phase)
Database: Faiss, Sonic

Backstory

Chardonnay, Sauvignon Blanc? Isn't it a type of brand?
I had drunk wine but I was not into it at all. I had known red, white, and barely rose. (I used to think the rose was mixed with red and white...) If I can enjoy the taste, what does it matter? Well..., for some people whom I have met, it does seem to matter.

I felt a bit embarrassed that I had no idea about wine, and I wanted to know it. After researching wine online and reading a couple of books about wine, it was quite interesting. Then, I had a problem with which one I should buy at a supermarket. There are so many wines available, and the prices often give me pause before making a purchase. In addition, I am unable to consume wine limitlessly. I needed to choose it carefully.

I have used apps and they have been helpful. The problem was it took some time for me to scan the wines one by one.

Most Challenging Part

Finding the same wine from different websites was quite challenging. Wine has grades. Names are almost exactly the same but only grades can be different. For the same products, names could be different on different websites. The years of production are important for wine.

Although I made the specification as simple as possible, it remained complicated to match wines. I gave up on matching products in shops with the same productions in reviews by the years of production. 

First, I went for the easiest way which tried to match the names of products. Soon I discovered that the names in shops were quite different from those in reviews. I had checked the names on the sites before programming, and while they were not always perfectly matched, they usually referred to the same product. After collecting data from thousands of wines, I found lots of mismatched cases.

I changed my strategy to use image search. I tried OpenCV AKAZE, SIFT, and ORB to detect features of images, and then compared the features. As other people tried this way, the result was not good enough. I used a histogram comparison, but it did not work as well. 

I kept searching for the solution. I found the article "Building a Reverse Image Search Engine". I was so excited to try it. I achieved significantly improved results compared to the methods I had used previously. Unfortunately, the accuracy of correct matching rates was still not satisfactory. I almost gave up on this project.

After looking at so many labels with my broken heart, I came to realize the characters on the labels were unique. I experimented with an AI model to extract characters from images. In this approach, I got the best result. The accuracy of correct matching rates became approximately 50%.

In the end, I developed an assistant tool to check and correct the matching result manually. With the tool, I could find matching products much more quickly than ever. However, updating thousands of data entries still consumed too much time. Sadly, I made the decision not to update it.

Latest Posts
AI-powered Furby
February 23, 2024
Dictionary & Wordbook
February 21, 2024
Content Management System
February 17, 2024