mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-22 07:31:26 +08:00
Merge pull request #1993 from dcanelhas:master
waldboost_detector train: avoid failed asserts while training by exiting early * Avoids a failed assert which crashes training * xobjdetect: improve waldboost messages
This commit is contained in:

committed by
Alexander Alekhin

parent
766bf7723a
commit
46110c3d9e
@@ -333,7 +333,14 @@ void WaldBoost::fit(Mat& data_pos, Mat& data_neg)
|
||||
|
||||
|
||||
if (loss < 1e-50 || min_err > 0.5) {
|
||||
std::cerr << "Stopping early" << std::endl;
|
||||
std::cerr << "Stopping early. loss=" << loss << " min_err=" << min_err << std::endl;
|
||||
weak_count_ = i + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
// Avoid crashing on next Mat creation
|
||||
if (pos <= 1) {
|
||||
std::cerr << "Stopping early. pos=" << pos << std::endl;
|
||||
weak_count_ = i + 1;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user