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 (https://devtalk.nvidia.com/default/topic/1022718/jetson-tx2/create-object-detection-model-without-digits-/),

I may need to do

$ ./examples/kitti/detectnet_train.sh

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
examples/kitti/kitti_train_labels.lmdb
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 http://caffe.berkeleyvision.org/tutorial/layers.html#data-layers, 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 ([url]https://raw.githubusercontent.com/NVIDIA/caffe/caffe-0.15/examples/kitti/detectnet_network.prototxt[/url]), 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: Deep Learning for Object Detection with DIGITS | NVIDIA Technical Blog
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.

Hi,

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

For the database, please check create_db.py 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.
[url]DIGITS/README.md at d8ec85a7d67fb1fd348b8976e37a7960a26780f3 · NVIDIA/DIGITS · GitHub

Thanks.