How to use NVIDIA DIGITS for image classification

Dominic Monn
Jul 25, 2017 · 3 min read

The NVIDIA DIGITS system is an interactive Deep Learning training system which allows you to manage datasets, neural networks and their training on a simple web frontend.

“DIGITS simplifies common deep learning tasks such as managing data, designing and training neural networks on multi-GPU systems, monitoring performance in real time with advanced visualizations, and selecting the best performing model from the results browser for deployment.

In this short tutorial, I want to go through a very basic image classification task: Classifying the MNIST dataset using Yann LeCuns ‘LeNet’ architecture.

Installing DIGITS

This README on the DIGITS repository on GitHub walks you through the installation steps for Ubuntu. You need to install CUDA on your machine first (given that you have a NVIDIA GPU). After that, you can install DIGITS, which will per default run on port :80. You might want to change that.

DIGITS is up and running

Importing a dataset

First, you need to import a dataset. In our case, this would be MNIST. The DIGITS ecosystem already offers an easy way to download the MNIST dataset as such:

python -m digits.download_data mnist ~/mnist # if python2
python2 -m digits.download_data mnist ~/mnist # if python3

After that, you can click on the tab “Datasets” and create a new one for “Classification”. You can now configure your dataset and then let it process.

Dataset configuration

At the end of processing, DIGITS gives you a nice overview of your dataset. Next up, we want to create our classification network and then train it on our MNIST dataset.

Creating the classification architecture

To do this, we switch to the tab “Models” and create a new model for “Classification” as well. This should display all options for the classification networks, such as the choice of the dataset and the learning rate.

Choice of standard networks

To make it easy for ourselves, we choose the default “LeNet” architecture here. However, one could easily customize these architectures or even upload their own networks for a very easy way to train them. DIGITS also offers a way to visualize network architectures, which can come in handy.

Training the network

All that is left to do is to kick off the training process, observe it and wait. DIGITS automatically plots the current loss and accuracy of the model, which makes it very easy to quickly see any signs of over- or underfitting.

At the end of training, DIGITS offers the option to download the pre-trained network or save it in DIGITS itself for future testing. You can also upload single or multiple images to classify them. In our case, the network had an accuracy of 98.8%.

Success!

If you have followed the steps to create a dataset and use it for image classification, you have now successfully classified handwritten digits using the MNIST dataset and the LeNet network.

DIGITS is, in my opinion, a very good way to showcase new architectures and to play around with Deep Learning models. It’s very easy and straightforward to set up and use. So now that you know how DIGITS work, create your own networks or perform some segmentation or object detection tasks. Have fun!

Dominic Monn

Written by

Deep Learning Engineer & Maker.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade