widerface-to-tfrecord
widerface-to-tfrecord copied to clipboard
Convert WIDER Face Dataset to Tensorflow's TFRecord format.
Wider Face Dataset to TF Record
Convert the WIDER Face to TFRecord format.
Important: this project runs under Python3.
Why doing this?
The TFRecord format will allow you to use the Tensorflow Object Detection API in order to train a new model based on Transfer Learning from many available pretrained models.
How to run
- Clone the repo
- [Optional] Create a virtual environment to keep dependencies isolated.
- Run
pip install -r requirements.txt
- Configure
config.py
file with your appropiate paths.- You should have downloaded from here the dataset and the annotations' folder
- If you don't want a set to be converted then leave the field in
None
. For example, if test is not going to be converted you should leaveTEST_WIDER_PATH
inNone
.
- Run
python wider_to_tfrecord.py
- When done,
tfrecord
files should be in the output folder you specified inconfig.py
.
About testing images set
Testing images do not contain ground truth bounding boxes. In case you want to convert the testing set as well, the test.tfrecord
file will contain images only without bounding boxes.