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

IBM/Recognize-handwritten-digits-using-Neural-Networks-in-R

Repository files navigation

Recognize handwritten digits using Neural Networks in R

Interpreting images has been one of the most sought-after use cases in the field of artificial intelligence. Identification of handwritten digits using neural networks is commonly used in a lot of mobile applications.

In this tutorial, we will learn how to create a Web Application to recognize handwritten digits using Neural Networks on R in Watson Studio. For this tutorial, we will be utilizing MNIST database which is the large database of handwritten digits commonly used in Machine Learning.

Prerequisites

Estimated Runtime

It should take you approximately 45 minutes to complete this tutorial.

Steps

1. Create your IBM Cloud account and access IBM Cloud Pak for Data as a Service
2. Create a new project
3. Launch RStudio Environment IDE
4. Add the files to your project

Create IBM Cloud account and access IBM Cloud Pak for Data as a Service

  1. Sign in to IBM Cloud.
  2. Search for IBM Watson® Studio.
  3. Create the service by selecting the region and pricing plan, then click Create.

Create a new project

  1. Start the Watson Studio service.
  2. Click Create a project and Create an empty project. Make sure that you name your project and add a storage service, then click Create.

Launch RStudio Environment IDE

  1. Go to Assets and click on Launch IDE and Select RStudio.

  2. Select Default RStudio XS (2 vCPU and 8 GB RAM) runtime and click on Launch.

Add the files to your project

  1. Click on New Folder icon on under Files on the Right-hand side bottom.
  2. Open the newly created folder and upload the zip folder of the GitHub Repository from the following URL.
    https://github.com/mridulrb/Recognize-handwritten-digits-using-Neural-Networks-in-R
  3. Click on More and select Set As Working Directory.
  4. Double-click and open neuralNetwork.R file from the uploaded files by double-clicking on it. Click on Run and execute each line individually, wait for the arrow head to appear before clicking on Run to execute the next line.
  5. After training the Neural Network, we can now run the Web Application to recognize Handwritten Digits. Before that we need to install some packages. Enter the following commands in Console.
    Installing shiny package
install.packages(“shiny”) 

Installing nnet package

install.packages(“nnet”) 

Installing EBImage package

install.packages(“BiocManager”) 
BiocManager::install(“EBImage”) 

Open the DigitRecognizer.R file from the uploaded files by double-clicking on it. Click on Run App to Run the Web Application. You can upload the sample images from the Sample-Images folder in the GitHub Repository downloaded earlier on your computer to test the Application.

Conclusion

In this tutorial, we learned how to create and visualize a neural network that takes in a dataset and trains a model to predict outcomes.

About

Create a web application to recognize handwritten digits using neural networks on R in Watson Studio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages