Building and Deploying Models with Visual Recognition and Natural Language Classifier

Pooja Mistry
Developer Advocate - IBM
@Poojamakes

 

IBM Developer

Join IBM Cloud: https://ibm.biz/BdqqiN
Workshop:ibm.biz/visrecworkshop && ibm.biz/nlcworkshop
Slides: https://slides.com/poojamistry/custommodels

Welcome!

  • Name + Title/Company/Program

  • Where You’re From/Joining From

  • Something You Love

  • Quirk: Something that’s uniquely weird or different about you

Watson Studio

IBM Watson Studio is an interactive, collaborative, cloud-based environment where data scientists can use multiple tools to activate their insights.
Data scientists can work with a growing set of data science tools such as
  • R Studio
  • Jupyter
  • Python
  • Scala
  • Spark
  • IBM Watson Machine Learning
  • Watson Visual Recognition
  • Natural Language Classifier
  • Auto AI
  • and more....

IBM Developer

@poojamakes

IBM Developer

@poojamakes

Today we will learn how to use Watson Studio to Build Custom Models using :

  • Watson Visual Recognition
  •  Natural Language Classifier

Goals :

  • Create Watson Studio Project
  • Train Visual Data & Textual Data
  • Test Visual Model & Textual Data
  • Implement and Deploy Visual and Textual Model using CURL and Node.js SDK

What is Watson Visual Recognition

@poojamakes

IBM Developer

Pre Trained Model :

  • General model: Default classification from thousands of classes.
  • Explicit model: Whether an image is inappropriate for general use.
  • Food model: Specifically for images of food items.
  • Text model (Private beta): Text extraction from natural scene images.
     

Requires training:

  • Custom model: Train a custom classifier by providing positive and negative images.

@poojamakes

IBM Developer

General Model

•Animals (including birds, reptiles, amphibians, etc.)

•Person and people-oriented information and activities

•Food (including cooked food and beverages)

•Plants (including trees, shrubs, aquatic plants, vegetables)

•Sports

•Nature (including many types of natural formations, geological structures)

•Transportation (land, water, air)

•And many more, including furnishings, fruits, musical instruments, tools, colors, gadgets, devices, instruments, weapons, buildings, structures and man-made objects, clothing and garments, and flowers, among others.

@poojamakes

IBM Developer

General Model Example

@poojamakes

IBM Developer

General Model Example 2

@poojamakes

IBM Developer

Custom Model

 

@poojamakes

IBM Developer

Custom Model Example 2 

 

@poojamakes

IBM Developer

So where do we train these custom models ?

@poojamakes

IBM Developer

Let's Talk a little bit about...

@poojamakes

IBM Developer

@poojamakes

IBM Developer

Email Phishing App

@poojamakes

IBM Developer

Lets Get Started

Visual Recognition Model Workshop:

  • ibm.biz/visrecworkshop

NLC Model Workshop:

  • ibm.biz/nlcworkshop

@poojamakes

IBM Developer

IBM Developer

@poojamakes

Prerequisites

1. Create IBM Cloud Account using THIS URL

https://ibm.biz/BdqqiN

2. Check your email and activate your account. Once activated, log back into your IBM Cloud account using the link above.

3. If you already have an account, use the above URL to sign into your IBM Cloud account.

 

IBM Developer

Tips for Creating Models

  • Provide training examples that are similar to what you plan to analyze.
    • For example : Training a with a tiger in the zoo might give different results when classifying a tiger in the wild. Thee background, light, surroundings, angle,  distance and size of subject matters.
  • Time vs Accuracy - More images the more data you provide .. the better your model . However ... benefits of more for visual models plateaus around 5000 images
  • Recommendation for Visual Recognition model is 150 - 200 per .zip file. Image size of 320 x 320 pixels . Does not need to be high resolution
  • Limit the length of input text to fewer than 60 words.
  • Make sure that each class is matched with at least 5 - 10 records when each text record has only one class. This number provides enough training on that class.
  • Include standard hyphenated terms when they are part of the training data (back-to-back or part-time job).

Resources

  • Visual Recognition Docs: https://developer.ibm.com/clouddataservices/docs/ibm-data-science-experience/visual-recognition/
  • Natural Language Classifier Docs : https://cloud.ibm.com/docs/services/natural-language-classifier?topic=natural-language-classifier-natural-language-classifier&_ga=2.111773248.518511053.1588862300-204715253.1588862300
  • Survey flooded neighborhoods to identify survivors on rooftops and detect rescue boats : https://developer.ibm.com/tutorials/use-drones-after-floods-to-help-survivors-watson-visual-recognition/

  • Create a mobile app with visual recognition capabilities:https://developer.ibm.com/patterns/visual-recognition-for-ios/

  • Natural Language Classifier Sample Application :https://github.com/watson-developer-cloud/natural-language-classifier-nodejs

  • Classify health data : https://developer.ibm.com/patterns/classify-icd-10-data-with-watson/

@poojamakes

IBM Developer

Code Patterns

https://www.meetup.com/ibmcodenyc/

@poojamakes

IBM Developer

Thank You!

Please Visit : developer.ibm.com

Follow Me!

Twitter: @poojamakes

LinkedIn: Pooja Mistry

dev.to: https://dev.to/poojamakes

@poojamakes

IBM Developer

IBM Developer

@poojamakes

Step1 : Sign up & Login

IBM Developer

@poojamakes

Step 2 : Find Watson Studio

IBM Developer

@poojamakes

Step 3 :

IBM Developer

@poojamakes

Step 4 :

IBM Developer

@poojamakes

Step 5 :

 Create a Project

IBM Developer

@poojamakes

Step 6 :

Add Object storage service 
Choose lite service and rename service  
Refresh and Create  

IBM Developer

@poojamakes

Step 7 :

Select Visual Recognition Service 
Click Add to project
Create Service 
Select Lite and Create 

AI/ML Series -> Part 1 : Custom Models

By Pooja Mistry

AI/ML Series -> Part 1 : Custom Models

  • 1,104