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.
- An IBM Cloud account.
- IBM Cloud Pak for Data
- A working knowledge of R Programming Language
It should take you approximately 45 minutes to complete this tutorial.
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
- Sign in to IBM Cloud.
- Search for IBM Watson® Studio.

- Create the service by selecting the region and pricing plan, then click Create.

- Start the Watson Studio service.

- Click Create a project and Create an empty project. Make sure that you name your project and add a storage service, then click Create.

- Click on New Folder icon on under Files on the Right-hand side bottom.

- 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

- Click on More and select Set As Working Directory.

- 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.

- 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.

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.



