1.1k likes | 1.28k Views
Spatial Business Detection and Recognition from Images. Alexander Darino. Outline. Project Overview. Previous Work Project Objective Anticipated End Result Project Pipeline. Project Overview. Previous Work: Where Am I?. Image. Where Am I?. Latitude, Longitude. Project Objective.
E N D
Spatial Business Detection and Recognition from Images Alexander Darino
Outline • Project Overview
Previous Work Project Objective Anticipated End Result Project Pipeline Project Overview
Previous Work: Where Am I? Image Where Am I? Latitude, Longitude
Project Objective • Given: • Image • Geolocation • Yield: • Spatial Identification of Businesses in Image • Addresses of Businesses in Image • Information about Businesses in Image • Ex. Reviews, Categories, Phone Number, etc.
Project Objective • Given: • Image • Geolocation • Yield: • Spatial Identification of Businesses in Image • Addresses of Businesses in Image • Information about Businesses in Image • Ex. Reviews, Categories, Phone Number, etc.
Project Pipeline Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image Text Extraction Detected Text
Obtaining a List of Candidate Businesses in Image via Business Searching
Business Searching Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image Text Extraction Detected Text
Business Searching • Business Search Services • Google • Yelp • CityGrid (Supplier for Yellow Pages, Super Pages) • REST-based API • Results in JSON or XML format • Aggregate Results into Facade
{'businesses': [{'address1': '466 Haight St', 'address2': '', 'address3': '', 'avg_rating': 4.0, 'categories': [{'category_filter': 'danceclubs', 'name': 'Dance Clubs', 'search_url': 'http://yelp.com/search?find_loc=466+Haight+St%2C+San+Francisco%2C+CA&cflt=danceclubs'}, {'category_filter': 'lounges', 'name': 'Lounges', 'search_url': 'http://yelp.com/search?find_loc=466+Haight+St%2C+San+Francisco%2C+CA&cflt=lounges'}, {'category_filter': 'tradamerican', 'name': 'American (Traditional)', 'search_url': 'http://yelp.com/search?find_loc=466+Haight+St%2C+San+Francisco%2C+CA&cflt=tradamerican'}], 'city': 'San Francisco', 'distance': 1.8780401945114136, 'id': 'yyqwqfgn1ZmbQYNbl7s5sQ', 'is_closed': False, 'latitude': 37.772201000000003, 'longitude': -122.42992599999999, 'mobile_url': 'http://mobile.yelp.com/biz/yyqwqfgn1ZmbQYNbl7s5sQ', 'name': 'Nickies', 'nearby_url': 'http://yelp.com/search?find_loc=466+Haight+St%2C+San+Francisco%2C+CA', 'neighborhoods': [{'name': 'Hayes Valley', 'url': 'http://yelp.com/search?find_loc=Hayes+Valley%
Business Searching: Results 40.441127247181797 -80.002821624487595 Denham & Company Salon Ullrich's Shoe Repairing Nicholas Coffee Co Bella Sera On the Square A & J Ribs Starbucks Coffee Jenny Lee Bakery Galardi's 30 Minute Cleaners Jimmy John's Gourmet Sandwiches Charley's Grilled Subs Fresh Corner Lagondola Pizzeria & Restaurant Camera Repair Service Inc Pittsburgh Cigar Bar Original Oyster House MixStirs 1902 Tavern Costanzo's Pittsburgh Silver Llc Graeme St Galardi's 30 Minute Cleaners Denham & Co Salon Bruegger's Bagel Bakery Nicholas Coffee Co Market Square Fat Tommy's Pizzeria Mixstirs Cafe Giggles Rycon Construction Inc Garbera, Dennis C, Dds - Emmert Dental Assoc Bella Sera on the Square Mancini's Bread Co Las Velas Ciao Baby Washington Reprographics Inc Highmark Life Insurance Co Fischer, Donald R, Md - Highmark Life Insurance Co Jimmy John's Lynx Energy Partners Inc Emmert Dental Assoc
Business Searching: Evaluation • Strengths • Aggregated results almost always found Business of interest • Weaknesses • Each API limits query result set size - this is why we aggregate • Only businesses listed • Not all businesses listed • Limitations • Dependent on well-populated, accurate Business Directories • Have only tested for 15 Pittsburgh images - unknown result quality for rural areas.
Obtaining names of Businesses in Image by Extracting Identifying Text
Extracting Identifying Text Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image Text Extraction Detected Text
Extracting Identifying Text: OCR • Used Two OCR APIs: • GNU OCR (Ocrad) • GOCR • OCR APIs highly sensitive to: • Font (only works well with roman font) • Perspective • Scale • Binarization Threshold • Dark on Light vs. Light on Dark (inversion)
Extracting Identifying Text: OCR • OCR API evaluations • Ocrad - could not yield any meaningful data across over 200 scale/threshold/inversion combinations • GOCR - produced good results across 10 scales with and without inversion using threshold automatically determined by Otsu's method • 98% of Results are garbage! • Examples of GOCR output (next slides)
Extracting Identifying Text: OCR n.c.......o.a...u..............oU..D.oa..e......_RuEGGE..KERy..J...w...........L........M.II.....c.. ...i.......l..J.t...llt...lSHA.P.It..tllt.........._.l...Jy._.c_...._tt.._....t.._.r.........t.t_t.._.._.l..J.r.r.I.
Extracting Identifying Text: OCR u..........._nq......eoR.E.l.e...í....e...n... .n....n.e.R.E...e....o. _....E.R.E.IKE........I.ltlO.. .......rE..o......E.....I.K.E.o..... J.n....c...E.R.E.I.E...... .M..E.R.E...E...a J...Gu.ge..geE.F .._.....E..gE.D... fUlI..lll.lll.IIi.l..Xl..
Extracting Identifying Text: OCR ..e_..w.._......D.........uJ.....J.................n......n..........n_..r.l_d..J.ec.m._..n.......J.n.._...tn..ct..._.................D.u.v...e.n....u.. Y.._w.n.n....Jn.......G..o..r..._........J...ml.t..l.tt.l.._w....................._....l....t........j..ilI.i..
Extracting Identifying Text: OCR __.ncu_.l..._..._J...ne......._n._..v.....ra......d_..._.............i..n..UllREsT.unAN...r.c.....r...Tt.rJll......m...c.....n....... ...Jn.I..c...r.rESTAU.ANT.r.O....c.cc. Note: Even though "Tambellini" is a roman font, it is too stretched to be picked up by GOCR
OCR Evaluation • Strengths • Applicable to expected input of orthogonal images • Weaknesses • Only works well(-ish) for strictly roman font • Limitations • Will perform poorly for artistic fonts and business signs • Conclusion • By itself, OCR is not the best approach towards Business identification • Reasons: poor recognition, franchises, perspective, etc
Matching Identifying Text to Candidate Business Names via Business name Matching
Business Name Matching Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image Text Extraction Detected Text
Business Name Matching • Given: Unreliable fragments of ‘detected text’ • Yield: Matching Business Names • Process: • Filter input: trimming, uselessness (< 2 letters) • Fuzzy String Matching • Voting Scheme: confidence of business appearing in image
Business Name Matching • Developed Confidence Attribution Algorithm • Confidence of OCR Token being Name Token • Example: Confidence of “ESTUANT” representing “RESTAURANT” • Point-based system • Confidence of Name appearing in Image • Sum of points of matching OCR Text • Use logarithmically-normalized points to determine business inclusion threshold
Business Name Matching Note: This originally did not appear because it did not exceed the confidence threshold. It now appears because it contributes to the Business Name Identification
Isolating Identified Images in Image via Spatial Business Identification
Business Spatial Identification Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image OCR Detected Text
Business Spatial Identification Aiken George S Co Category: Food, Grocery Address: 218 Forbes Ave Pittsburgh, PA 15222 Phone: (412) 391-6358 Rating: 4.5/5 (2 Reviews)
Business Spatial Identification Bruegger's Bagels Category: Bagels Address:Market Sq Pittsburgh, PA 15222 Phone: (412) 281-2515 Rating: Not Rated
Current Approach Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image OCR Detected Text
Weaknesses to Current Approach Business Name Matching Business Spatial Detection Latitude Longitude Geocoding Reverse Geocoding Nearby Businesses BusinessIdentification Image OCR Detected Text
Weaknesses to Current Approach Lots of Garbage