资源算法face-detection-ssd-mobilenet

face-detection-ssd-mobilenet

2020-02-27 | |  29 |   0 |   0

Face-Detection-SSD-MobileNet

Prerequisites

Install TensorFlow Object Detection API

https://github.com/tensorflow/models/tree/master/research/object_detection

Remember to export the library in PYTHONPATH in your environment.

Preprocess the dataset

Please run the following scripts:

python 1_download_data.py

python3 2_data_to_pascal_xml.py

python 3_xml_to_csv.py

python 4_generate_tfrecord.py --images_path=data/tf_wider_train/images --csv_input=data/tf_wider_train/train.csv  --output_path=data/train.record

python 4_generate_tfrecord.py --images_path=data/tf_wider_val/images --csv_input=data/tf_wider_val/val.csv  --output_path=data/val.record

Modify the config file

Read the comments and modify the config information in ssd_mobilenet_v1_face.config

Train

Just run:

python models/research/object_detection/train.py --logtostderr --pipeline_config_path=ssd_mobilenet_v1_face.config  --train_dir=checkpoints_dir

Export Model

You can export the trained models using this:

python models/research/object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path ssd_mobilenet_v1_face.config --trained_checkpoint_prefix checkpoints_dir/model.ckpt-200 --output_directory output_model/

Please modify the name of trained_checkpoint_prefix, like checkpoints_dir/model.ckpt-number, where number is the num_step in config file

Eval

You can evaluate the performance of your models using:

python models/research/object_detection/eval.py --logtostderr --pipeline_config_path=ssd_mobilenet_v1_face.config  --checkpoint_dir=checkpoints_dir --eval_dir=eval

Run

Just run:

python detect_face.py


上一篇: MobileNetSSD_Demo_AndroidNCNN

下一篇:MobileNet-in-FPGA

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...