Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

IBM/coffee-donut-instructions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Deploy an image classifier on IBM Cloud

This hands-on lab builds a neural network to predict an input image as that of coffee, donut or a mug.

The workshop provides you with all the data and assets you need to create the classifier on IBM Cloud. To get started, you can clone this github repo or simply download the sample file under assets/coffee-donut.zip. You do not need to unzip the file, but simply upload it to Watson Studio as explained in the steps below. The zip file contains the following assets

assets
├── data_asset
│   ├── Coffee\ Bag\ 2.jpg
│   ├── Coffee.jpg
│   ├── Donut.jpg
│   ├── Mug.jpg
│   └── coffee-donuts-segregated.zip
└── notebook
    └── notebook:Train_a_simple_classifier_dam9_4_n1.ipynb
  • data_asset/coffee-donuts-segregated.zip - this is your training data
  • data_asset/*.jpg - test images used to predict with the model
  • Train_a_simple_classifier_dam9_4_n1.ipynb - this is the sample notebook that is used to train your image classifier.

Prerequisites

  1. This workshop assumes you have an IBM Cloud account. Please ask the workshop facilitator for the URL to sign up. If you don't have a unique URL, you can register here - https://ibm.biz/Bdq2TN
  2. Download assets/coffee-donut.zip file that will be used as a template in this workshop.

Technologies Used

  1. IBM Watson Studio - helps data scientists and analysts prepare data and build models at scale
  2. IBM Cloud Object Storage - stores large volumes of unstructured data while still ensuring scalability, security, availability, reliability, manageability, and flexibility.
  3. Jupyter Notebooks - provides a collaborative environment and runtimes that enables Python, Scala, and R notebooks

Steps

  1. Search for Watson Studio service on IBM Cloud in the Catalog or using the search bar as shown here

    Create Watson Studio

  2. Create a Watson Studio instance

    Watson Studio new instance

  3. Click on Launch in IBM Cloud Pak for Data to launch Watson Studio

    Launch Watson Studio

  4. Create a Project inside Watson Studio

    Start new Project

  5. Create a project from a sample or file

    Create Project from Sample

  6. Create a new storage service

    New Cloud Object Storage instance

  7. You can leave the defaults and click on Create

    COS create

  8. Upload the sample file to create the new project. You can find the sample zip file under assets/coffee-donut.zip

    Upload project zip

  9. Finish uploading file and create a new project

    Finish Creating Project

    Load project

  10. Once the project has been created, view project to see details

    View Project

  11. Open Assets tab. This is where you will find the data and notebooks

    Assets tab

  12. Scroll down to Notebooks and open the Train a sample classifier notebook

    Open Notebook

  13. If your notebook is in read-only mode, use the pencil button to edit the notebook

    Edit notebook

  14. This will instantiate a new runtime for you to run the notebook

    Start kernel

  15. You can now run the cells to create the neural network! Click on the first cell to focus on it and then hit the run button on the top bar. Click on the run button again to go to the next cell and keep going till the end to finish the workshop. You can click on the cell itself to edit the content. The two steps below ask you to add your cloud object storage credentials to download the training data file.

    Run Notebook

Additional clarifications for the notebook

  1. In order to use the data from the cloud object store in the notebook, use the 0100 data tab on the right side as show in the image below. You can use insert credentials link from the coffee-donuts-segregated.zip asset. This will insert some code in the notebook that provide you access to the credentials as a dictionary.

    Insert COS credentials

  2. The credentials generated in the cell above will be stored in a variable with a name like credentials_<number>. The number gets incremented every time you run this cell. Assign it to credentials variable in the next cell. This credentials variable will be used in the rest of the notebook.

    Insert credentials

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •