davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++

Home Page:http://dlib.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to prepare correct dataset of imglab for train_object_detector.cpp help

fatalfeel opened this issue · comments

I want to do cat or dog train_object_detector

  1. https://stackoverflow.com/questions/30326560/object-detection-with-dlib-library
    the object occupy 90% of image to train
    seems fail

  2. https://its401.com/article/wyd1520/81585293
    using image include many object and crop object to train
    seems work ok

////////////////////
https://www.kaggle.com/competitions/dogs-vs-cats/data?select=train.zip
If I get this dataset that the object occupy 90% of image, does it mean failed detect like method 1. Do I need use method 2

After trace into dlib source

virtual void separation_oracle
{
//goto void detect_from_fhog_pyramid
//Do det(rect) predict , then score sorting, the first is biggest socre
scanner.detect(current_solution, dets, thresh-loss_per_false_alarm)

//find match det(rect)
const std::pair<double,unsigned int> truth = find_best_match(truth_object_detections[idx], dets[i].second);
final_dets.push_back(dets[i].second);
...
...
...
else if (!overlaps_ignore_box(idx,dets[i].second)) //no hit then add loss
{
    // didn't hit anything
    final_dets.push_back(dets[i].second);

#ifdef ENABLE_ASSERTS
total_score += dets[i].first;
#endif
loss += loss_per_false_alarm;
}
}

this loss function looks like Hinge loss, Rects using fhog predict.
so I guess the object occupy can not bigger than 50% of image to train
Am I right?

Warning: this issue has been inactive for 35 days and will be automatically closed on 2022-06-10 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

Warning: this issue has been inactive for 42 days and will be automatically closed on 2022-06-10 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.