Skip to content
Go to file
Gunicorn complicates packaging (especially with Systemd)

We're not getting any of the advantages that usually come with gunicorn
because our server is single-process and single-thread

We can handle the auto-restart with the init system service
4 contributors

Users who have contributed to this file

@lukeyeager @gheinrich @dongjoon-hyun @dadap
97 lines (69 sloc) 4.04 KB

Getting Started

Now that you have successfully installed DIGITS, this guide will teach you the basics of how to use it. By the end, you will have trained a Caffe model to recognize hand-written digits. We will be using the MNIST handwritten digit database as our dataset and LeNet-5 for our network. Both are generously made available by Yann LeCun on his website.

Download the data

Use the following command to download the MNIST dataset onto your server:

$ python -m digits.download_data mnist ~/mnist
Downloading url= ...
Downloading url= ...
Downloading url= ...
Downloading url= ...
Uncompressing file=train-images-idx3-ubyte.gz ...
Uncompressing file=train-labels-idx1-ubyte.gz ...
Uncompressing file=t10k-images-idx3-ubyte.gz ...
Uncompressing file=t10k-labels-idx1-ubyte.gz ...
Reading labels from /home/username/mnist/train-labels.bin ...
Reading images from /home/username/mnist/train-images.bin ...
Reading labels from /home/username/mnist/test-labels.bin ...
Reading images from /home/username/mnist/test-images.bin ...
Dataset directory is created successfully at '/home/username/mnist'
Done after 16.722807169 seconds.

See Standard Datasets for details about this script.

Using the Webapp

Open up a web browser and navigate to the home screen of DIGITS. The server should be at either http://localhost/ (if installed from Deb packages), or http://localhost:5000/ (if using digits-devserver).

Home page

Logging in

Click on Datasets > New Dataset > Images > Classification. This will lead you to the login page:

NOTE: there is no authentication - you don't even need a password. This is a utility feature, not a security feature.


Creating a Dataset

After logging in, you will be brought to the "New Image Classification Dataset" page.

  • Type in the path to the MNIST training images
    • You can also add the folder of MNIST test images as a "Separate validation images folder", if you like. Don't use the "test images" fields - test images are not used for anything in DIGITS yet.
  • Change the Image Type to Grayscale
  • Change the Image size to 28 x 28
  • Give the dataset a name
  • Click on the Create button

New dataset

While the job is running, you should see the expected completion time on the right side:

Creating dataset

When the job is finished, go back to the home page by clicking DIGITS in the top left hand part of the page. You should now see your dataset listed under the "Datasets" tab.

Home page with dataset

Training a Model

Click on Models > New Model > Images > Classification. This will lead you to the "New Image Classification Model" page.

For this example, do the following:

  • Choose the "MNIST" dataset in the Select Dataset field
  • Choose the LeNet network in the Standard Networks tab
  • Give the model a name
  • Click on the Create button

New model

While training the model, you should see the expected completion time on the right side:

Training model

To test the model, scroll to the bottom of the page.

  • Click on the Upload image button and choose a file
    • There are plenty to choose from in /home/username/mnist/test/
  • Or, find an image on the web and paste the URL into the Image URL field
  • Check the Show visualizations and statistics box
  • Click on Classify One

At the top of the page, DIGITS displays the top five classifications and corresponding confidence values. DIGITS also provides visualizations and statistics about the weights and activations of each layer in your network.

Classified one image

You can’t perform that action at this time.