dlib 19.7 multi classifier training data using HOG+SVM

Created on 13 Nov 2017  路  3Comments  路  Source: davisking/dlib

I'm working on object detection using dlib 19.7 c++, till now i was using single classification like below
image

聽These labels are generated using imglab from dlib. For this I'm using fhog_object_detector_ex.cpp. It works well and able to detect @object.

Now I have defined multi classifier like below.
image

  1. clock 2. pot

so how can i use/modify fhog_object_detector_ex.cpp to train data. I have knowledge on how to test image,
_std::vector > my_detectors;
my_detectors.push_back(detector1); // clock.svm
my_detectors.push_back(detector2); // pot.svm
my_detectors.push_back(detector3); // any other.svm_

_std::vector dets2 = evaluate_detectors(my_detectors, image);_

but i'm not sure how can i train data. do i need to label 2 times separately for each image and run object trainer 2 times? or it is possible to train 2 classifiers same time?

@davisking

Most helpful comment

Right, HOG+MMOD is not multiclass. See also http://dlib.net/faq.html#WhydoesnttheobjectdetectorItrainedwork

All 3 comments

I am guessing you need to train the classifiers separately as aspect ratios are widely different and also. That is, label only one class in each xml file and run the classifier number of unique class times. Later you can merge the classifiers you have shown.

I also have a question @davisking . FHOG+MMOD object detection is not multiclass right ? like the DNN+MMOD, multiclass is possible.

Right, HOG+MMOD is not multiclass. See also http://dlib.net/faq.html#WhydoesnttheobjectdetectorItrainedwork

@yourmailhacked is it accurate enough? I have also the same problem, as I could not afford to get much images for each label, so CNNs are much bad than SVM

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lvella picture lvella  路  4Comments

abhisheksoni27 picture abhisheksoni27  路  4Comments

kalravibhor picture kalravibhor  路  5Comments

joeking11829 picture joeking11829  路  5Comments

alison-carrera-pegasus picture alison-carrera-pegasus  路  3Comments