Saha
Saha

Reputation: 43

dlib labeling for object detection - detect only 60%

I have question on object detection using dlib. I'm want to detect beard on face. so I'm labeling like below

[image[1]

typedef scan_fhog_pyramid<pyramid_down<6> > image_scanner_type; 
image_scanner_type scanner;
scanner.set_detection_window_size(80, 80); 
structural_object_detection_trainer<image_scanner_type> trainer(scanner);

I have trained 400 images. but detection % is 60. It is detecting even there is no beard, I think this is because I have labeled no_beard so it is detecting (may be). It seems my labeling is wrong, I just want to detect only beard face. So in that case, do i need to label only face that have beard? or my i should label beard and no_beard? what is going wrong? for reference i'm using enter link description here

Upvotes: 3

Views: 759

Answers (1)

Sumsuddin Shojib
Sumsuddin Shojib

Reputation: 3743

If you don't change anything the default way of training is like this xml file. Where it trains only objects as rectangular boxes (all box having nearly same width and height ratio).

It does not train any label, so I would suggest that you train only the beard images as an object. If you have enough images, It should learn the beard object.

Another idea is, detect the face by dlib's MMOD Face detection and then train the beard images.

Make sure keep non-beard images without annotation, on the training so that it learns.

Upvotes: 3

Related Questions