DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

Detectnet for several classes

Open csadom opened this issue 7 years ago • 14 comments

I saw how to train detectnet for 1 and 2 classes and i managed to train them (https://github.com/NVIDIA/DIGITS/issues/1359). Can I train 3, 4 etc multiclass detectnet classifier? And if yes how? Thanks

csadom avatar May 03 '17 14:05 csadom

I think it is possible by modifying the .prototxt file

lesterlo avatar May 08 '17 14:05 lesterlo

Do you have any tips on how to train detectnet for 2 classes?

shinaushin avatar May 30 '17 17:05 shinaushin

Hi.I tried the network for 2 classes for Kitty dataset.It is only learning the first class of car.How can i solve it.Please help me to solve.

sulth avatar Sep 12 '17 10:09 sulth

@csadom @shinaushin @sulth I wrote two blog posts about multiclass custom object detection. Here you go:

https://labs.coria.com/blog/computer-vision/PreparingDataForCustomObjectDetectionUsingNvidiaDigits?sc_camp=33AFA8630062426190B5760C8FDF17CF https://labs.coria.com/en/blog/computer-vision/TrainingACustomMulticlassObjectDetectionModel?sc_camp=33AFA8630062426190B5760C8FDF17CF

I hope it helps. Let me know if you have any questions.

elaith9 avatar Mar 25 '18 01:03 elaith9

Hi @elaith9 I was reading your posts, and a lot of posts. Please if someone already solved this problem please help me. There are very interesting. But I'm having a big problem. In fact is the same problem that you were covering in posts. I'm trying to have a two detectnet detection. However my training process shows only one of my classes with a map different from Zero the other class remains in Zero after 60 epochs of training as you can see in the image below.

screenshot from 2018-04-30 09-21-48

And the configuration on the model is this:

image

my_detectnet.txt

kala855 avatar Apr 30 '18 14:04 kala855

Hi @kala855, did you solve the problem? I'm facing the same problem as you, should we use different network define? Here is my problem, mAP of class 1 = 0 git_1

my_net.txt

dqthebt24 avatar Jun 14 '18 06:06 dqthebt24

@dqthebt24 make your current model pretrained and train again for 300-600 epochs. Success will also depend on quality of your training data and labels.

elaith9 avatar Jun 14 '18 14:06 elaith9

@kala855 60 epochs is not enough to train your model. Consider training it for at least 600 epochs.

elaith9 avatar Jun 14 '18 14:06 elaith9

@elaith9 Thank you, I did with KITTI dataset for 300 epoches. mAP of class 1 always equals to 0 through all epoches, (mAP of class 0 is #0)

dqthebt24 avatar Jun 14 '18 14:06 dqthebt24

@dqthebt24 please read my blog posts. It took me 600 epochs with first model which I later made pretrained and used it's weights to train for another 300 epochs.

elaith9 avatar Jun 14 '18 14:06 elaith9

@elaith9 thanks for your answer. @dqthebt24 I was trying with detectnet but I suppose that in fact I didn't use enough epochs. Im going to test again.

kala855 avatar Jun 14 '18 19:06 kala855

@elaith9 , @kala855 There are lines in the .prototxt file:

data_param { backend: LMDB source: "examples/kitti/kitti_train_images.lmdb" batch_size: 10 } I checked my pc, it had no path "examples/kitti/kitti_train_images.lmdb". Do we need above lines in .prototxt file? or if yes, how to generate the path of ".lmdb"?

dqthebt24 avatar Jun 14 '18 23:06 dqthebt24

I wrote a small article on how to crate a dataset and train a two class DetectNet on Digits. You can read my post here

https://www.deeplearning-blog.com/2020/01/31/how-to-train-a-two-class-detectnet-neural-network-on-digits/

Hope it helps Cheers Marco

MarcoGonnelli74 avatar Feb 06 '20 14:02 MarcoGonnelli74

@dqthebt24 please read my blog posts. It took me 600 epochs with first model which I later made pretrained and used it's weights to train for another 300 epochs.

@elaith9 could you please tell me what was the learning rate for the next 300 epochs after making a pretrained model?

ashtonaureleo avatar Feb 25 '20 08:02 ashtonaureleo