I'm trying to create an XML file by exploiting the imglab tool provided by dlib. I have a dataset of 21 images each with a single face. I must affix on each 68 landmarks at my leisure.
The file created with my landmarks is different from the XML file provided by dlib : namely each record is defined as a single box and should be considered as a part of the main box with containing the face.
Help me!
Looks like you are trying to draw boxes manually around every face feature instead of using "part selection" mode
imglab -h will show you this:
--parts The display will allow image parts to be labeled. The set of allowable parts is defined by which should be a space separated list of parts.
Try this:
Create xml file for some images directory
imglab -c xml_file_name.xml /path/to/images/folder
run imglab with --parts argument:
imglab --parts "1 2 3 4 5 6 7 8" xml_file_name.xml
This will make imglab know about 8 features possible to annotate in box area
Also consider reading help/about in imglab for using instructions
After saving xml file you will get something like this:
<image file='1\a1.jpg'>
<box top='26' left='33' width='78' height='73'>
<part name='1' x='67' y='68'/>
</box>
</image>
Evgeniy's answer is useful but when running imglab with --parts argument, numerical labels should be like:
imglab --parts "01 02 03 04 05 06 07 08 09 10 11 12" xml_file_name.xml
Otherwise, since dlib sorts the parts by name in xml, labels will be confusing while predicting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With