This subdir includes face detection related codes. Some descriptions has been presented in repo README.md.
2019.10.14
The model v2 can be tried to train nightly.2019.10.16
The model v2 can be trained normally.
- v1 - refer to the paper for details
- v2 - the detection scale is 10-320 (vs 10-560 in v1), the number of layers is 20,
the backbone is modified for faster inference. Refer to
./net_farm/naivenet_structures.xlsx
for details.
on the way
on the way
Now only for traning v2 nightly.
First, we introduce the functionality of each sub directory.
- net_farm. This folder contains net definitions for all model versions.
- metric_farm. This folder contains the metrics for training monitoring.
- data_provider_farm. This folder contains the code of raw data processing/formatting/packing&unpacking.
- data_iterator_farm. This folder contains the code of multi-threaded data prefetching. This is the most important part, since it describe the essence of LFFD!!!
- config_farm. This folder contains the configurations of all model versions. The training is started by running the corresponding config python script.
Second, we present a common procedure for running the code for training (taking v2 as an example).
- prepare net model
net_farm/naivenet.py
- prepare the training data by using the code in
data_provider_farm
. We provide a packed training data of WIDERFACE trainset. Please download from Data Download. - adjust the code around the line 241 in
data_iterator_farm/multithread_dataiter_for_cross_entropy_v2
. - set the variables in configuration py script in
config_farm
. - run
python configuration_10_320_20L_5scales_v2.py
inconfig_farm
directory.
We have packed the training data of WIDERFACE train set. In the data, the faces less than 8 pixels are ignored, and some pure negative images cropped from the training images are also added. We provide three ways to download the packed data:
- Baidu Yunpan (pwd:e7bv)
- MS OneDrive
- Google Drive
After you download the data, you can put it anywhere. Remember to set param_trainset_pickle_file_path
variable in the configuration file. (we
usually put the data into the folder: ./data_provider_farm/data_folder/
)