how to train Multiple Object Detection task?

Hi,

 I want to know how to train a Multiple object detection task? And how to create this kind of lmdb date?

 May I know how to create multiple object lmdb dataset without digits? I think the script is in DIGITS but I don't know how to create a lmdb dataset, can you show me how?

Thanks.

Hi,

Could you share why you don’t want to train your model with DIGITs?

Here are two tutorial for your reference:
1. [url]https://github.com/dusty-nv/jetson-inference#locating-object-coordinates-using-detectnet[/url]
2. [url]DIGITS/examples/regression at digits-5.0 · NVIDIA/DIGITS · GitHub

Thanks.

Hi

I had already checked these two references before, but could not get what I wanted. For multi-object detection I could just change that “custom class” to create the database?

It’s because in our training environment there doesn’t have a gui. So I have to create a database manually. And then use nvcaffe to train a model in that environment. So I really appreciate if you could tell me how to do it.

Thanks.

Hi,

Thanks for your feedback. Here are some suggestions:

1. Check this function for writing an LMDB database:
https://github.com/NVIDIA/DIGITS/blob/master/examples/text-classification/create_dataset.py#L31

2. DIGITs support multiple-objects use case.
Please follow the labeling rule of KITTI format:
https://github.com/NVIDIA/DIGITS/blob/master/digits/extensions/data/objectDetection/README.md

Class name (string in label file) 	Class ID (number in database)
dontcare  	  	  	  	0
car 	  	  	  	  	1
van 	  	  	  	  	2
truck 	  	  	  	  	3
bus 	  	  	  	  	4
......

Thanks.

Hi

  Really thanks for your reply.

  In KITTI format, each kind of class have a unique folder and there are train data and validation data in that unique folder. If I want to make a multi-object detection task, can I put all kinds of data in only one folder, but with train folder and validation folder in that one folder?
  
  Or do you have an example for me?

Thanks.

Hi,

Object type is described in the label file:

For example:

<b>dog</b> 0 0 0 528.63 315.22 569.09 354.18 0 0 0 0 0 0 0
<b>sheep</b> 0 0 0 235.28 300.59 270.52 346.55 0 0 0 0 0 0 0

Thanks.

Hi

Thanks for reply.
So it have nothing to do with the folder.

Ok, Thanks again.

1

2

Hi

From [url]https://github.com/NVIDIA/DIGITS/blob/master/examples/text-classification/create_dataset.py#L31[/url],[url]https://github.com/NVIDIA/DIGITS/tree/digits-5.0/examples/regression#alternative-method-manually-creating-lmdb-files[/url] I know how to create lmdb file for images. But I can’t find any example for creating label lmdb file, especially for multi-object (multi-class) detection task.

I think the difference between image dataset and label dataset is the data section in datum, but I can’t find a right formate for label-datum.

Can you provide an example for me?

Thanks.

Hi

When creating image lmdb and label lmdb for multi-object detection task. Do I need to put the label in image lmdb file? or just need to create a label lmdb file and put all bbox and class number in it?

And of course I need to know the label format. So can you provide such label format for nvcaffe to read?

Thanks.

Hi,

Sorry for the late reply.
There is little difference between single-object detection and multi-object detection problem.

For single object-detection, the label value is 0 or 1.
For multiple object detection, the label value is 0, 1, …, N.

But the database preparation, training process, inference testing are shared.
So if you have updated your label file to KITTI format, just run the default script.

Thanks and Happy New Year : )

Hi.

Happy new year.

Actually I only want to know the multiple object detection label formate in python. Because I want to write my own lmdb file for training.

Can you share that with me ?

Thanks

Hi,

There are two kinds of database writer in DIGITs:

1. Image writer:
[url]https://github.com/NVIDIA/DIGITS/blob/master/digits/tools/create_db.py[/url]

2. Generic writer:
[url]https://github.com/NVIDIA/DIGITS/blob/master/digits/tools/create_generic_db.py[/url]

Please check the source to get more information about data format.
Thanks.

Hello SharpYoung,

I wrote a few lines article about creating a dateset and training a two class Detectnet on Digits.
You can find article here if it might help.

Cheers
Marco

1 Like

Nice! Thanks for the sharing!