Comments (8)
It was running and output to console only options information and a line "Fitting trees" without no other new file. So I didn't know whether it was working or not.
from dlib-minified-models.
Hi @DoriHp ,
the training process is a bit heavy, you need at least 16GB of RAM and a CPU with 4/8 threads.
For example, training the full model (68 landmarks) on the iBug 300W dataset takes about 1 hour on an i7 CPU using 4 threads and 13 GB of RAM.
- Initially the training process loads the data, so only the "Fitting trees" message will appear.
- After that, other messages will appear: the training parameters, and the estimated remaining training time.
- Once completed, you will notice a message like "model saved" or "training completed" (I don't remember exactly, but you'll get the sense).
Notice that the training can only be done on CPU, the same is for inference.
from dlib-minified-models.
@Luca96 Thanks for your fast response. My workstation's CPU is Intel® Xeon® Processor 2.20 GHz. RAM usage isn't a problem because it has 16gb . But with a weak CPU like that, I guess it will take a long time to complete training process. I will retry and look for the result.
from dlib-minified-models.
Another question, I only want to improve the accuracy of the 5 points landmark detector that Dlib provide as default. Can I continue training that model or must train it from scratch? This is my parameters for the new model:
`options.tree_depth = 4
options.nu = 0.1
options.cascade_depth = 15
options.feature_pool_size = 800
options.num_test_splits = 350
options.oversampling_amount = 10
options.oversampling_translation_jitter = 0
options.be_verbose = True # tells what is happening during the training
options.num_threads = 2 `
Will it create a robust model? At least, I hope it will be more accurate than the default.
from dlib-minified-models.
Well, with these parameters you should get a good model but I don't know how good compared to the default 5-landmark shape predictor.
To measure the accuracy of your model just use this function:
def measure_model_error(model, xml_annotations):
'''requires: the model and xml path.
It measures the error of the model on the given
xml file of annotations.'''
error = dlib.test_shape_predictor(xml_annotations, model)
print("Error of the model: {} is {}".format(model, error))
So that you can compare your results with the default model.
If you need more precision, you can try:
feature_pool_size = 1000
oversampling_amount = 20
(note: training time will increase)tree_depth = 5
from dlib-minified-models.
Here my result when using measure error function: ~3.1 and 8.0. Is this a high accurate? I also want to compare with the default 5 points model, but I'm not sure about the index of all points it predicts according to this image. They are the 33, 36, 39, 42 and 45 point, aren't they?
from dlib-minified-models.
I'll try your parameters later. The only thing I want to get is a robust model <3
from dlib-minified-models.
Your results are pretty good.
However, it seems that your model overfits a bit: you can try to regularize it by setting the parameter nu
to 0.15
or 0.20
, and see if the gap between the two errors reduces.
If I remember well, the 5-landmark model detects the points: 37, 40 (left eye corners), 43, 46 (right eye corners), and 34 (nose tip).
from dlib-minified-models.
Related Issues (6)
- In nose_mouth_30.dat.bz2 numbers representing nose and mouth are not correct. HOT 6
- work support HOT 7
- profile face training HOT 10
- test shape predictor HOT 3
- Stability HOT 9
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-minified-models.