How to Prepare LMDB for Training DetectNet of Jetson-Inference?

I do not have powerful host or cannot use AWS DIGITS…

So I think I have to train object detection model on Jetson TX2.

According to my previous question and answers (,

I may need to do

$ ./examples/kitti/

which is

build/tools/caffe train \
    -solver examples/kitti/detectnet_solver.prototxt \
    -weights models/bvlc_googlenet/bvlc_googlenet.caffemodel \

I also downloaded bvlc_googlenet.caffemodel.

But it did not work maybe because of training data.

The file examples/kitti/detectnet_solver.prototxt seems to require
examples/kitti/kitti_train_images.lmdb and
but they do not exist.

I do not know how they look like.

So would you please provide some sample data or let me know how can I prepare those data?

I looked at, however, I have no idea how to prepare training data for object detection model (something like bounding boxes…).

Here is the DIGITS documentation on how to get the KITTI data set:

If you already have the files, but with different names, you can update the solver file to point at the correct location.

Here are some other links on how to create LMDB data sets for training caffe networks:

Isn’t KITTI format for DIGITS, not NvCaffe?

I need to train from command line not from DIGITS…

What is the second link?

DIGITS is just a nice GUI on top of NvCaffe. When it trains or classifies, it calls the NvCaffe command line tools.

KITTI is a data set, not a format. The format of the data here is LMBD.

Other formats area also possible to input into NvCaffe; I recommend reading all the documentation and tutorials on Caffe, and then NvCaffe, and then playing around in DIGITS to learn how these systems work. It’s worth the few dollars to rent a GPU instance on the spot market for a few hours to get this understanding. A thousand times cheaper than any college tuition :-)

I do not know why but I cannot launch p2.xlarge instance on AWS…
(I am outside US.)

I always get this message; ‘You have requested more instances (1) than your current instance limit of 0 allows for the specified instance type.’

It has been days, however, they have not been responding to my limit increase request.

I have been following instructions about Caffe and NvCaffe.

I understood (a bit) about data layers on the bottom for input.

I have followed data preparation instructions for ImageNet.

But when it comes to DetectNet… it feels like totally different.

According to DetectNet description (, there are 4 data layers…
(Maybe DIGITS automatically creates 4 LMDBs?)

No instructions are about DetectNet data preparation…

I am string reading but even though I am reading all the documents about Caffer and NvCaffe,
if I do not know how to create 4 LMDBs in exactly the same way I may not be able to train DetectNet?

Ah… I do not know what to do next…

Yeah, that took almost a week for me when I set that up.

Yes, because the labeling is totally different! DIGITS contains a few helper scripts to go between text-mode files with rects/classes, and the actual data loaded by the model.
I found this blog post to be helpful:
It’s also helpful to study the log output from running the DIGITS training and classification passes, because it contains some words/filenames you can then look for.
After reading that, poke through in the actual DIGITS scripts/implementation and you’ll hopefully find what you need.


You need to send out a request to AWS for GPU usage first.

For the database, please check script.
Different from the classification database, detection database writes bounding box information to LMDB at the same time.

Please check the script or this page for more details.