Comments (4)
Yes this is the reason. The two sets of boxes come from dlib's two face detectors. Training on both of them causes the resulting model to work well for both face detectors, since as you noted, the landmarking model's predictions are seeded from the position of the bounding box. So boxes that are placed systematically different from how they appear in training data would result in worse performance. Since the two face detectors use slightly different box annotation schemes this would be a problem if the landmarking model wasn't trained to be aware of this.
from dlib-models.
from dlib-models.
After thinking about it just now, I think the two boxes might be for making the landmark predictor more robust. I ran the script below to find any boxes that had different landmark coordinates, but I found nothing. By using different boxes, the shape predictor can train itself to identify landmarks more generally. The landmark predictor takes in the bounding box as input, and by training it on different bounding boxes, we can expand the training set I believe.
import xml.etree.ElementTree as ET
root = ET.parse('train_cleaned.xml').getroot()`
for image in root.find('images').findall('image'):
boxes = image.findall('box') # find all boxes in this image
if(len(boxes) < 1):
print('no boxes? ', image.attrib)
if(len(boxes) > 1): # some images only have one box
parts0 = [part.attrib for part in boxes[0].findall('part')]
parts1 = [part.attrib for part in boxes[1].findall('part')]
if(parts0 != parts1):
print('unequal points ', image.attrib)
from dlib-models.
Thank you for responding, it makes sense.
Another question: why is there a black border on many of the pictures? And why are their dimensions square? I flipped through the first 50 and noticed many of them are 711x711 or 411x411 and a few other dimensions.
How will the black pixels affect the training, and the resulting model?
The training is done in the shape_predictor_trainer.h file, but I don't understand it well enough to answer my own question.
from dlib-models.
Related Issues (20)
- How to reduce size of the model? HOT 1
- Would you be interested in a pretrainted ResNet50? HOT 3
- Trained HOG detector, but variation(jitter and shake) in bounding box output result.
- Computer specs required when training HOT 2
- Need more tuning of mmod_face_detector.dat's parameters
- How to train gender model? HOT 7
- Any trained model for ID card shape detector? HOT 2
- Details regarding mmod_human_face_detector HOT 3
- body pose model? HOT 4
- How to use dnn_gender_classifier_v1.dat in Python? HOT 4
- GPU Accerlation For Age Estimation HOT 2
- dlib_face_recognition_resnet_model_v1.dat dataset HOT 1
- Verification rate of face recognition model HOT 1
- 98 face landmarks
- How to config shape_predictor_68_face_landmarks.dat to use GPU HOT 1
- Details about training dnn_age_predictor_v1.dat.bz2 HOT 5
- how to get dlib_face_live_detector_v1.dat
- Is it possible to convert shape_predictor_68_face_landmarks dlib model to an onnx model? HOT 1
- Decrease in recognition rate HOT 2
- I would like to introduce the facial recognition model I trained, which includes a large number of Asian faces. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlib-models.