Mobilenet trained with DIGITS

Hey everyone.

I’ve been working with the movidius intel stick and one of the things ive been having difficulties with is training my own network that will run on it. I’m getting lots of errors.

What I’m looking to do is train the Kitti vehicle example found here DIGITS/examples/object-detection at master · NVIDIA/DIGITS · GitHub , but instead of training it for use on detectnet. I would like to train it for use with Mobilenet. I’ve found two mobilenet prototxt files, one for MobilenetV1 and the other for MobilenetV2. Can someone help me understand what I need to do to train the new network for Mobilenet?

MobilenetV1
MobileNet caffe implementation for NVIDIA DIGITS · GitHub

MobilenetV2
MobileNet V2 caffe implementation for NVIDIA DIGITS · GitHub

It really doesn’t matter to me at this point which, as I just need to get one of them.

I set everything up the same way I do for the detectnet model. Except, 1) I’ve reduced the image size by 25% and 2) I’m inserting the Mobilenet model description instead of the detectnet model description.

The first error I’m getting is

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/digits/scheduler.py", line 512, in run_task
    task.run(resources)
  File "/usr/local/lib/python2.7/dist-packages/digits/task.py", line 189, in run
    self.before_run()
  File "/usr/local/lib/python2.7/dist-packages/digits/model/tasks/caffe_train.py", line 220, in before_run
    self.save_files_generic()
  File "/usr/local/lib/python2.7/dist-packages/digits/model/tasks/caffe_train.py", line 632, in save_files_generic
    network = cleanedUpGenericNetwork(self.network)
  File "/usr/local/lib/python2.7/dist-packages/digits/model/tasks/caffe_train.py", line 1710, in cleanedUpGenericNetwork
    "Don't leave inner_product_param.num_output unset for generic networks (layer %s)" % layer.name
AssertionError: Don't leave inner_product_param.num_output unset for generic networks (layer fc8

So I found the inner_product_param{} in the model description. I assumed I should set the num_output to 1 as this is only using 1 class, vehicle. Then the next error I get, when I set num_output to 1 is

Memory required for data: 19267712
Creating layer train-data
Creating Layer train-data
Top blob 'data' produced by multiple sources.
Opened lmdb /jobs/20180723-171705-254f/train_db/labels

And honestly, I have no idea where to go from here.

Any help would be much appreciated.

Michael

Did you prepare the dataset as a classification dataset? Since your data contains 1 class, vehicle, I believe some of the images contain another class, No vehicle. You need to put images without vehicle in ‘NoVehicle’ folder and images with vehicle in ‘Vehicle’ folder. From there, you can create your classification dataset. DIGITS will pick the number of classes as 2, and will set fc8 num_ouput correctly.