Image Recognition For Non-Experts

YOW! Data
19 Sept 2017

Gareth Jones - @nomiddlename

What I'm going to talk about

  • Serving Ads
  • POC (Cloud Vision API)
  • POC (Tensorflow)
  • Summary
  • Dance Number

Serving Ads

image/svg+xml Farmer Jane Farmer Jane iliketractors.com iliketractors.com Ad Network Ad Network Personalised Personalised Targeted Targeted Untargeted Untargeted

Ad Breaches

  • Untargeted ads
  • Algorithmic selection
  • Third-party Ad Networks
  • Human error

Now

  1. Complaint
  2. Panic
  3. Fixed

What we want

  1. Detection
  2. Fixed

Why Google Cloud Vision?

  • Image Recognition is just not our bag, man.
  • Managed service
  • OCR, Logo detection
  • Objects, faces, landmarks
  • Inappropriate content

Example

Face Detection

Labels

Logos

Web

Text

Inappropriate Content

Proof Of Concept

image/svg+xml Browser Browser Screenshot Screenshot Queue Queue Cloud Vision API Cloud Vision API Email Email

Keywords

  • Error-prone
  • Manual

Solution

Make our own image classifier!

How hard can it be?

Too Hard

It'll take weeks and millions of images

Give Up!

Steal* Someone Else's Work!

*Make use of work freely given for the advancement of humanity

(transfer learning)

Tensorflow

  • Machine learning toolkit
  • Open-source
  • Has pre-trained models

Inception V3

How to do it

https://www.tensorflow.org/tutorials/image_retraining

  1. Download TF source
  2. Compile
  3. Put images into folders named by category
  4. Run the tutorial code
  5. That's it.

Simpler Diagram

image/svg+xml

Images

  • Sports - 170
  • Not Sports - 230

Sports

Not Sports

Do the thing

  • Took about 10 minutes
  • Accuracy = 76.1%

Results

sports = 0.96

not-sports = 0.03

sports = 0.93

not-sports = 0.07

sports = 0.45

not-sports = 0.55

sports = 0.03

not-sports = 0.97

Is it over yet?

  • Cloud Vision API
    • Easy
    • Managed
    • Always improving
  • Rolling your own image classifier
    • Easy
    • Quick
    • Customisable

Who was that masked man?

Gareth Jones
@nomiddlename