ssd_keras icon indicating copy to clipboard operation
ssd_keras copied to clipboard

Problem about Multi class training

Open Iflier opened this issue 8 years ago • 3 comments

Hello, everyone, When I use this network to train only one category, en, everything goes well. And I am very happy, Haha...,. However, When I try to train more than one categories, the performance of the network is not very good: Although LOSS has been very low, but VAL_LOSS does not decline. When I look at the network again, I think something bad happened: keys = sorted(gt.keys()) .For example, I want to train 2 categories: apple and dog. But because the function: SORTED , pictures about dog will be in the last place. And after num_train = int(round(0.8 * len(keys))); and train_keys = keys[:num_train]; maybe, all of the pictures about apple will be used to train, and only part of pictures about dog be used to train. And in the validation sets, there maybe no any pictures about apple to validate, only pictures about dog will be used to validate. It'd be great to hear your thoughts and thanks a lot for any feedback! default

Iflier avatar May 07 '17 13:05 Iflier

@Iflier surely, you need to select validation data according to your problem. I've never claimed that the example is the only correct way to do it, in my problem it is ok to select validation data this way because data is random, image names doesn't influence on images, moreover, it is quite convenient for me to split data as in the example. You might need to preform some other splitting. I don't see any issue here.

rykov8 avatar May 07 '17 13:05 rykov8

Many thanks, I see what you mean. I am very sorry, the problem is caused by my own operation, in my practice, the name of each image begins with the name of the object it contains, therefore, I will encounter such a problem. Thank you very much for your reply.

Iflier avatar May 08 '17 01:05 Iflier

@rykov8 Thanks for your clarification. May I ask what was the intuition for sorting key in the first place? and not just randomly selecting 20% for validation?

Walid-Ahmed avatar Aug 29 '17 17:08 Walid-Ahmed