Deep Learning Example using NVIDIA DIGITS 3 on EC2

By | February 21, 2016

In my previous post I provided step by step instructions on how to install NVIDIA DIGITS 3 on Amazon EC2. In this post, we are going to use an Amazon Machine Image (AMI) that I have configured for readers of this blog. This AMI comes preloaded with DIGITS 3 and the 17 flowers dataset from Oxford Visual Geometry Group. We will use this AMI to launch an instance on Amazon EC2 quickly and try a couple of Deep Learning experiments.

In the video below we show how to launch an instance on Amazon EC2 using the AMI I have shared. We explore basic usage of DIGITS 3 starting with data preparation, database exploration, training a neural network, improving performance, and testing the learned neural network on a new image.

Amazon Machine Image ( AMI ) for NVIDIA DIGITS 3

The AMI I have shared ( id : ami-5bac4e3b, region : US West ( Oregon ) ) has NVIDIA DIGITS 3 preinstalled. I have also included the 17 Flowers dataset from Oxford’s Visual Geometry Group in the AMI at /home/ubuntu/data/17flowers. In addition AlexNet weights are included for pretraining at /home/ubuntu/models

Image classification results on 17 Flowers dataset using AlexNet

To demo DIGITS 3 we trained AlexNet with default training parameters on the 17 flowers dataset. After about 4 minutes of training, AlexNet produced an accuracy of 67%.

17 flowers image classification using AlexNet

As a quick demo 67% is not bad but can we do better ? Of course!

Image classification results on 17 Flowers dataset using AlexNet with pre-training

By simply using pre-trained AlexNet weights and making some minor modifications, we see a huge improvement in accuracy ( > 90 % ).

17 Flowers image classification using AlexNet with Pre-trained weights


If you liked this article, please subscribe to our newsletter and receive a free
Computer Vision Resource guide. In our newsletter we share Computer Vision and Machine Learning tutorials and examples written in C++/Python.

Subscribe Now

  • Samir Zen Master Al-Stouhi

    Thank you again for this tutorial. Crisp clear and super helpful.

  • Abhinav Garg

    Hi Satya,

    Just went through the tutorial and got the same results as you.

    I was able to follow the earlier tutorial also to get started with AWS. I tried it before but it was too complicated. Thanks for simplifying it.

    I got different training times than you. Any clue on that?

    Also, I tried downloading the trained neural net with pretrained alex net weights but I was not expecting it to be more than some KBs. Its 165 MB downloaded so far and I am thinking of stopping downloading it.

    Do you know how big trained CNN are?

    Can I do an offline training on my CPU i7-3740QM @ 2.70GHz 2.70GHz 16 GB RAM?
    How long will that take to train a CNN to detect say just 1 class?


  • Hi, I understand that the original 17flowers dataset consist of over a thousand images of flowers but separating them manually is tedious and time-consuming. How did you categorize the 17flowers images and prepare them for NVIDIA DIGITS?

  • Glauco Todesco

    Hi Satya,

    I have a related question about NVIDIA.
    I am looking to more information about hardware performance with NVIDA Cards for Computing Vision.
    For example: GTX vs Quadro vs Tesla, or GTX SLI vs GTX. How to use?
    There are many information and reviews about game applications, no to OpenCV/Computing Vision.
    Can I assume that if it is good for game it is good for OpenCV/Computing Vision?

    Glauco Todesco