Ask Your Question

Revision history [back]

although cv::HOGDescriptor is going to be a legacy, i like to play with train_HOG.cpp.

i downloaded OwnCollection.rar from http://www.gti.ssr.upm.es/data/Vehicle_database.html (i suppose it is part of the dataset you have).

i used images from OwnCollection\vehicles\Far as positives ( 975 images )

for negative images i used images from INRIAPerson dataset ( 1218 images )

example_cpp_train_HOG -d -pd=E:/OwnCollection/vehicles/Far -nd=E:/INRIAPerson/Train/neg

program output:

Positive images are being loaded......[done]
Negative images are being loaded...libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
.
.(warnings related to the png images)
. 
...[done]
Histogram of Gradients are being calculated for positive images......[done] ( positive count : 975 )
Histogram of Gradients are being calculated for negative images......[done] ( negative count : 1218 )
Training SVM......[done]
Testing trained detector on negative images. This may take a few minutes......[done]
Histogram of Gradients are being calculated for positive images......[done] ( positive count : 975 )
Histogram of Gradients are being calculated for negative images......[done] ( negative count : 8306 )
Training SVM again......[done]

you can test the output detector like example_cpp_train_HOG -t -tv=test_video.mp4 image description