-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fc40dc
commit 5aca7ec
Showing
15 changed files
with
1,442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# YOLOFace | ||
|
||
# Deep learning based Face detection using the YOLOv3 algorithm | ||
|
||
|
||
## Getting started | ||
|
||
The YOLOv3 (You Only Look Once) is a state-of-the-art, real-time object detection algorithm. The published model recognizes 80 different objects in images and videos. For more details, you can refer to this [paper](https://pjreddie.com/media/files/papers/YOLOv3.pdf). | ||
|
||
## YOLOv3's architecture | ||
|
||
![Imgur](assets/yolo-architecture.png) | ||
|
||
|
||
## OpenCV Deep Neural Networks (dnn module) | ||
|
||
OpenCV `dnn` module supports running inference on pre-trained deep learning models from popular frameworks such as TensorFlow, Torch, Darknet and Caffe. | ||
|
||
## Prerequisites | ||
|
||
* Tensorflow | ||
* opencv-python | ||
* opencv-contrib-python | ||
* Numpy | ||
* Keras | ||
* Matplotlib | ||
* Pillow | ||
|
||
Development for this project will be isolated in Python virtual environment. This allows us to experiment with different versions of dependencies. | ||
|
||
There are many ways to install `virtual environment (virtualenv)`, see the [Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/) guide for different platforms, but here are a couple: | ||
|
||
|
||
Create a Python 3.6 virtual environment for this project and activate the virtualenv: | ||
```bash | ||
$ virtualenv -p python3.6 yoloface | ||
$ source ./yoloface/bin/activate | ||
``` | ||
|
||
Next, install the dependencies for the this project: | ||
```bash | ||
$ pip install -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
|
||
* Clone this repository | ||
|
||
* For face detection, you should download the pre-trained YOLOv3 weights file which trained on the [WIDER FACE: A Face Detection Benchmark](http://mmlab.ie.cuhk.edu.hk/projects/WIDERFace/index.html) dataset from this [link](https://drive.google.com/file/d/1xYasjU52whXMLT5MtF7RCPQkV66993oR/view?usp=sharing) and place it in the `model-weights/` directory. | ||
|
||
* Run the following command: | ||
|
||
>**image input** | ||
```bash | ||
$ python yoloface.py --image samples/outside_000001.jpg --output-dir outputs/ | ||
``` | ||
|
||
|
||
|
||
## Sample outputs | ||
|
||
![Imgur](assets/outside_000001_yoloface.jpg) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
face |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
face |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 |
Oops, something went wrong.