Efficient Image Search and Identification: The Making of WINE-O.AI

Similar documents
GrillCam: A Real-time Eating Action Recognition System

Using the Forest to see the Trees: A computational model relating features, objects and scenes

Food Image Recognition by Deep Learning

A CASE STUDY: HOW CONSUMER INSIGHTS DROVE THE SUCCESSFUL LAUNCH OF A NEW RED WINE

Modeling Wine Quality Using Classification and Regression. Mario Wijaya MGT 8803 November 28, 2017

Predicting Wine Quality

1. Continuing the development and validation of mobile sensors. 3. Identifying and establishing variable rate management field trials

Development and evaluation of a mobile application as an e-learning tool for technical wine assessment

A Recipe Recommendation System Based on Regional Flavor Similarity Lin-rong GUO, Shi-zhong YUAN *, Xue-hui MAO and Yi-ning GU

STA Module 6 The Normal Distribution

STA Module 6 The Normal Distribution. Learning Objectives. Examples of Normal Curves

Find the wine you are looking for at the best prices.

with MesoOptics Training Manual This information is for Ledalite sales representatives only. Not for public use.

Digital Image Analysis Based Automated Kiwifruit Counting Technique

Detecting Melamine Adulteration in Milk Powder

Word Embeddings for NLP in Python. Marco Bonzanini PyCon Italia 2017

IT 403 Project Beer Advocate Analysis

Compare Measures and Bake Cookies

Tastes and Textures Estimation of Foods Based on the Analysis of Its Ingredients List and Image

Visual Yield Estimation in Vineyards: Experiments with Different Varietals and Calibration Procedures

A culinary and drinks experience for every team!

What makes a good muffin? Ivan Ivanov. CS229 Final Project

Computerized Models for Shelf Life Prediction of Post-Harvest Coffee Sterilized Milk Drink

DATA MINING CAPSTONE FINAL REPORT

Cactus Moth Detection & Monitoring Network

Building Reliable Activity Models Using Hierarchical Shrinkage and Mined Ontology

Idaho Meats Evaluation and Technology Handbook

Abstract. Keywords: Gray Pine, Species Classification, Lidar, Hyperspectral, Elevation, Slope.

Predicting Wine Varietals from Professional Reviews

Yelp Chanllenge. Tianshu Fan Xinhang Shao University of Washington. June 7, 2013

AIS Detectors & AIS Trackers

How LWIN helped to transform operations at LCB Vinothèque

Fruit Detection using Improved Multiple Features based Algorithm

What Makes a Cuisine Unique?

A New Information Hiding Method for Image Watermarking Based on Mojette Transform

MULTISPECTRAL IMAGING A NEW SEED ANALYSIS TECHNOLOGY?

1.3 Box & Whisker Plots

Learning the Language of Wine CS 229 Term Project - Final Report

Nearest Neighbor For Histogram-based Feature Extraction

Identification of Adulteration or origins of whisky and alcohol with the Electronic Nose

Comparison of Multivariate Data Representations: Three Eyes are Better than One

COURT OF MASTER SOMMELIERS OCEANIA

Encyclopedia Of Coffee And Espresso From Beans To Brew - Complete Guide For The Home Preparation Of Filter Drip Coffee... By Krups North America

FORTY-SIXTH ANNUAL CITRUS PACKINGHOUSE DAY

Dining Your Way into Reading

GCSE 4091/01 DESIGN AND TECHNOLOGY UNIT 1 FOCUS AREA: Food Technology

Managing Multiple Ontologies in Protégé

User Studies for 3-Sweep

Get Schools Cooking Application

Eukaryotic Comparative Genomics

CS 322: (Social and Information) Network Analysis Jure Leskovec Stanford University

Perceptual Mapping and Opportunity Identification. Dr. Chris Findlay Compusense Inc.

QUICK SERVE RESTAURANT MANAGEMENT SERIES EVENT PARTICIPANT INSTRUCTIONS

Most Affordable Professional Grade 2D & 3D CAD Software

confidence for front line staff Key Skills for the WSET Level 1 Certificate Key Skills in Wines and Spirits ISSUE FIVE JULY 2005

The Financing and Growth of Firms in China and India: Evidence from Capital Markets

Why PAM Works. An In-Depth Look at Scoring Matrices and Algorithms. Michael Darling Nazareth College. The Origin: Sequence Alignment

Alcohol Meter for Wine. Alcolyzer Wine

Elemental Analysis of Yixing Tea Pots by Laser Excited Atomic. Fluorescence of Desorbed Plumes (PLEAF) Bruno Y. Cai * and N.H. Cheung Dec.

COUNTRY PLAN 2017: UGANDA

Shaping the Future: Production and Market Challenges

Getting the Most from Beer Brewing Software. Brad Smith, PhD

Principles of Preparing, Cooking and Finishing Basic Pastry Products

Brewculator Final Report

Panel A: Treated firm matched to one control firm. t + 1 t + 2 t + 3 Total CFO Compensation 5.03% 0.84% 10.27% [0.384] [0.892] [0.

As Hatten Wines is at the forefront of building

From Code to Confectionary

FARE College Food Allergy Program Survey

Cupcake Competition. FCS Lesson BAKING AND PASTRY ARTS

Pantry Hero. Chiyuki Kitagawa SFUXD36

SCAE CDS:! Introduction to coffee! The start of your journey into the SCAE Coffee Diploma System, for anyone with an interest in coffee!

Better Punctuation Prediction with Hierarchical Phrase-Based Translation

Intracultural study of European* Consumer Acceptability of Hibiscus sabdariffa L. Drinks.

This qualification has been reviewed. The last date to meet the requirements is 31 December 2015.

Lesson 4: Potatoes on MyPlate

MyPlate Style Guide and Conditions of Use for the Icon

Eukaryotic Comparative Genomics

Multispectral image analysis in the germination laboratory

GLOSSARY OF TERMS. ACTIVE Representatives maintain active status by having at least 40 QV each month. GLOBAL BV (BUSINESS VOLUME)

WE GRANTED YOUR FIRST WISH: THE BEST QUALITY IN A TOUCH

Wine Rating Prediction

13 COLONIES TRIVIA AND ANSWERS 13 COLONIES TRIVIA AND PDF 13 COLONIES TRIVIA AND ANSWERS PDF THIRTEEN COLONIES QUIZ - BRAINPOP

N e w Yo r k C i t y / N YS T L C ata lo g for FAMIS purchases

Practice of Chinese Food II Hotel Restaurant and Culinary Science

Deluxe Baking Activity Kits & Treasure Tin Kits

Opportunities. SEARCH INSIGHTS: Spotting Category Trends and. thinkinsights THE RUNDOWN

IMSI Annual Business Meeting Amherst, Massachusetts October 26, 2008

Improving Capacity for Crime Repor3ng: Data Quality and Imputa3on Methods Using State Incident- Based Repor3ng System Data

Update on Wheat vs. Gluten-Free Bread Properties

Plant Parts - Roots. Fall Lesson 5 Grade 3. Lesson Description. Learning Objectives. Attitude and Behavior Goals. Materials and Preparation

Modeling and Calibrating Visual Yield Estimates in Vineyards

MyPlate. National FCS Standard: Apply various dietary guidelines in planning to meet nutrition and wellness needs.

Giuseppe Pellizzi Prize 2018

Association Rule Mining

Olea Tumor Basic VPMC-13988A

Overview Location Event Activities Exhibitor information

The China Wine Barometer (CWB): a look into the future

COMPARISON OF THREE METHODOLOGIES TO IDENTIFY DRIVERS OF LIKING OF MILK DESSERTS

Manager s Corner: Mise en Place

Taste Sensing System and Coffee Application

Transcription:

Efficient Image Search and Identification: The Making of WINE-O.AI Michelle L. Gill, Ph.D. Senior Data Scientist, Metis @modernscientist SciPy 2017 link.mlgill.co/scipy2017

Metis Data Science Training Data Science Bootcamp 12 Week, In-Person New York, San Francisco, Chicago, Seattle Corporate Training Python for Data Science Machine Learning Natural Language Processing Spark Evening Professional Development Courses Explore Data Science Online Training thisismetis.com

Motivation for WINE-O.AI Facilitate discovery and exploration of new wine Open source, computer vision project to share with the community

Ingredients of WINE-O.AI Wine Label Identification Content Based Image Retrieval Recommendation System Web Application

Content Based Image Retrieval Image Database Query Image Extracted Features Extracted Features Image Comparison Candidate Images Database Match

Image Comparison Challenges Query Image Database Image Must be robust to differences in size, rotation, occlusion, and illumination And search must remain fast!

Content Based Image Retrieval in WINE-O.AI 1 2 3 Scraped ~50,000 Wine Labels Identification of Image Features with SIFT Creation of Bag of Visual Words 4 Image Selection with RANSAC Web Application

SIFT Feature Detection Gaussian Width (σ) Scale Invariant Feature Transformation (SIFT) Blur images using a Gaussian function of increasing width (σ) Lowe, D., IJCV, 2004

SIFT Feature Detection Gaussian Blurred Images Difference of Gaussians Gaussian kernel size (σ) y x Align images in 3D scale-space (x, y, σ) Subtract adjacent images Local extrema evaluated as potential features

SIFT Feature Detection Gaussian Blurred Images Difference of Gaussians Gaussian kernel size (σ) y x Align images in 3D scale-space (x, y, σ) Subtract adjacent images Local extrema evaluated as potential features

SIFT Feature Descriptor Descriptor calculated in 16 regions around key point Changes in intensity calculated and binned Produces 128 dimension descriptor for each key point

SIFT Feature Descriptor Descriptor calculated in 16 regions around key point Changes in intensity calculated and binned Produces 128 dimension descriptor for each key point

SIFT Feature Descriptor Descriptor calculated in 16 regions around key point Changes in intensity calculated and binned Produces 128 dimension descriptor for each key point

SIFT in Practice # image = array of grayscale, resized image pixels Load and Process Image # Detect features detector = cv2.featuredetector_create('sift') keypoints = detector.detect(image) Feature Detection # Get feature descriptors descriptor = cv2.descriptorextractor_create('sift') keypoints, features = descriptor.compute(image, keypoints) # RootSIFT uses L1 norm (absolute value) descriptors /= np.sqrt(descriptors.sum()) Get Feature Descriptors Convert to RootSIFT Arandjelovic, R. and Zisserman, A., IEEE CCVPR, 2012 PyImageSearch RootSIFT Discussion OpenCV2 code has been streamlined for presentation

Detection of Wine Label Features Image sizes: 100 x 100 to 1000 x 1200 Features from high resolution images did not encode well

Wine Label Recognition: Bag of Visual Words 1 2 3 Scraped ~50,000 Wine Labels Detection of Image Features with SIFT Creation of Bag of Visual Words 4 Image Selection with RANSAC Web Application

Bag of Visual Words Wine Label Cluster Histogram K-means clustering on combined features from data set Map features for each label to nearest cluster Creates a histogram "fingerprint" for each label 0 1 2 3 4

Bag of Visual Words Wine Label Cluster Histogram Cluster ID Wine Labels 0 Inverted Index 1 2 0 1 2 3 4 3

Bag of Visual Words Wine Label Cluster Histogram Cluster ID Wine Labels 0 Inverted Index 1 2 0 1 2 3 4 3

Wine Label Selection 1 2 3 Scraped ~50,000 Wine Labels Identification of Image Features with SIFT Creation of Bag of Visual Words 4 Image Selection with RANSAC Web Application

Image Retrieval with RANSAC Random sample consensus (RANSAC) used to choose best candidate image Random subsets of data fit to model Robust to outliers but very slow

Image Retrieval with RANSAC Random sample consensus (RANSAC) used to choose best candidate image Random subsets of data fit to model Robust to outliers but very slow

Running RANSAC # keypointsa, featuresa from query image # keypointsb, featuresb from candidate image Features from Comparison Images # Pair similar features from each image d_matcher = cv2.descriptormatcher_create('bruteforce') matches = d_matcher.knnmatch(featuresb, featuresa, 2) # Select matched keypoints match_kpsa = keypointsa[matches[0]] match_kpsb = keypointsb[matches[1]] Brute Force Feature Matching # Run RANSAC to calculate transformation matrix matrix, status = cv2.findhomography(match_kpsa, match_kpsb, cv2.ransac, 4.0) Find Projection OpenCV2 code has been streamlined for presentation

Putting It All Together # Run SIFT & calculate histogram on query image keypointsa, featuresa = run_sift(image) histograma = map_features_to_clusters(featuresa) # Get candidate images with similar histograms candidate_images = get_similar_images(histograma) Calculate Histogram from SIFT Features Identify Candidate Images for cimage in candidate_images: # Load keypointsb, featuresb for cimage # Run RANSAC on candidate image score = get_ransac_matches(keypointsa, featuresa, keypointsb, featuresb) Use RANSAC to Choose Image Match # Matched image has best score OpenCV2 code has been streamlined for presentation

WINE-O.AI Demonstration Candidate Image Database Image

WINE-O.AI Demonstration

Future of WINE-O.AI Open source wine application Educational use GitHub repo: mlgill/wine-o.ai Website: wine-o.ai WINE-O.AI: Imbibe Intelligently

Thank You! michelle@thisismetis.com " @modernscientist # themodernscientist $ mlgill