JDA icon indicating copy to clipboard operation
JDA copied to clipboard

Cann't complete training process

Open ardeal opened this issue 9 years ago • 3 comments
trafficstars

The training algorithms keeps on printing: [05/10/16 - 17:18:51] Reset current_idx and restart, reset times = 148 [05/10/16 - 17:18:51] Current augment parameters, should flip = 1, rotation angle = 0 [05/10/16 - 17:18:54] Run out of background images [05/10/16 - 17:18:54] Reset current_idx and restart, reset times = 149 [05/10/16 - 17:18:54] Current augment parameters, should flip = 1, rotation angle = 90

the code goes into this function, but cannot go out of it: nega_n += hardNegaMining(joincascador, img, imgs, scores, shapes);

in hardNegaMining function, bool is_face = joincascador.Validate(img(o), img_h(h), img_q(q), score, shape, n); if (is_face) { #pragma omp critical { imgs.push_back(img(o).clone()); scores.push_back(score); shapes.push_back(shape); } }

it tries to find a face in negative samples. it seems impossible.

ardeal avatar May 11 '16 00:05 ardeal

Hard negative mining is to find the false positive samples in background images. You are short of background images too badly. The reset times shouldn't be too large, usually, reset will happen if you use up the whole background images and it will reuse the images with some transforms. You should gather more background images to feed the algorithm.

luoyetx avatar May 11 '16 01:05 luoyetx

According to my knowledge, even if we have much less training samples, the algorithms can be trained correctly. The only problem should be that the classification or regression accuracy is not good. so, if I input much less samples for training, the training algorithms should be able to ended up correctly.

ardeal avatar May 11 '16 01:05 ardeal

The problem here is that hard negative mining process can not generate enough negative patches from background images. This means your model trained at this time is good enough to reject negative patches, which also means the model is trained well and the algorithm can be ended. Maybe we need to stop the training and return the model as the final model, if several reset happens.

BTW, I think a small training data should feed to a small model. If you really not have many face images and background images, you should set the parameters with a small model :)

luoyetx avatar May 11 '16 01:05 luoyetx