diff --git a/.DS_Store b/.DS_Store
index 15b141e..b94b956 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..191381e
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+.git
\ No newline at end of file
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..2f5e2c0
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,105 @@
+#! groovy
+
+pipeline {
+
+ agent { label 'MeG' }
+
+ environment {
+ DOCKER_PULL_REPO='repo.eresearch.unimelb.edu.au:8000'
+ DOCKER_PUSH_REPO='repo.eresearch.unimelb.edu.au:8001'
+ DOCKER_IMAGE_NAME="happypet/webapp"
+ GPU_DOCKER_IMAGE_NAME="happypet/webapp-gpu"
+ BASE_IMAGE_NAME="happypet/tensorflow"
+ BASE_IMAGE_TAG="1.15.2-py3"
+ GPU_BASE_IMAGE_TAG="1.15.2-gpu-py3"
+ }
+
+ stages {
+ stage('Pull base image'){
+ steps {
+ ansiColor('xterm') {
+ script {
+ docker.withRegistry("https://${env.DOCKER_PULL_REPO}",'repo-credentials') {
+ script {
+ docker.image("${env.BASE_IMAGE_NAME}:${env.BASE_IMAGE_TAG}").pull()
+ docker.image("${env.BASE_IMAGE_NAME}:${env.GPU_BASE_IMAGE_TAG}").pull()
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage('Build only'){
+ when {
+ not {
+ anyOf {
+ branch 'master'
+ branch 'develop'
+ branch 'release'
+ }
+ }
+ }
+ steps {
+ ansiColor('xterm') {
+ script {
+ def version = sh(returnStdout: true, script:'git describe --tags --always').trim()
+ docker.withRegistry("https://${env.DOCKER_PUSH_REPO}",'repo-credentials') {
+ script {
+ docker.build("${env.DOCKER_IMAGE_NAME}:${version}",'-f docker/release/Dockerfile .')
+ docker.build("${env.GPU_DOCKER_IMAGE_NAME}:${version}",'-f docker/release_gpu/Dockerfile .')
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage('Build and Push'){
+ when {
+ anyOf {
+ branch 'master'
+ branch 'develop'
+ branch 'release'
+ }
+ }
+ steps {
+ ansiColor('xterm') {
+ script {
+ def version = sh(returnStdout: true, script:'git describe --tags --always').trim()
+ docker.withRegistry("https://${env.DOCKER_PUSH_REPO}",'repo-credentials') {
+ script {
+ docker.build("${env.DOCKER_IMAGE_NAME}:${version}",'-f docker/release/Dockerfile .')
+ .push()
+ docker.build("${env.DOCKER_IMAGE_NAME}:latest",'-f docker/release/Dockerfile .')
+ .push()
+ docker.build("${env.GPU_DOCKER_IMAGE_NAME}:${version}",'-f docker/release_gpu/Dockerfile .')
+ .push()
+ docker.build("${env.GPU_DOCKER_IMAGE_NAME}:latest",'-f docker/release_gpu/Dockerfile .')
+ .push()
+ }
+ }
+ }
+ }
+ }
+ }
+
+ stage('Deploy'){
+ when {
+ anyOf {
+ branch 'master'
+ branch 'develop'
+ }
+ }
+ steps {
+ ansiColor('xterm') {
+ script {
+ sshagent (credentials: ['960a6936-d2d3-4d24-b9bb-c19e33f467ed']) {
+ sh "ssh -o StrictHostKeyChecking=no happypet-real-dev.eresearch.unimelb.edu.au"
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/README.md b/README.md
index 4d825e3..126d2dc 100644
--- a/README.md
+++ b/README.md
@@ -1,216 +1,92 @@
-# deepface
+# WebSite
-[](https://pepy.tech/project/deepface)
-[](https://github.com/serengil/deepface/blob/master/LICENSE)
+## About
-

+Under the FlaksServer directory, there are 9 folders. The Breed_Cat, Breed_Dog, Cat_vs_Dog, Emotion_Cat and Emotion_Dog folder contain the corresponding models and helper functions. The scripts directory contaisn the files which using the above models to predict. The static folder contains the images resources and the css and js libraries. The templates directory contains the html files. The testImages file used for temporarily store the image for prediction. The app.py file contains the server functions. Get trained models from [models](https://drive.google.com/drive/folders/19c2oPX0XAdVnRjaE3_o9EvLeQ4EyRzII?usp=sharing)
-**deepface** is a lightweight [face recognition](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and facial attribute analysis ([age](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [gender](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [emotion](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) and [race](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/)) framework for python. It is a hybrid face recognition framework wrapping **state-of-the-art** models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/), [`Google FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`Facebook DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/) and [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/). The library is mainly based on Keras and TensorFlow.
+### Features
-## Installation
+ Python Flask,
+ TensorFlow
-The easiest way to install deepface is to download it from [`PyPI`](https://pypi.org/project/deepface/).
+### Dependencies
-```python
-pip install deepface
-```
+ Python 3.7.7,
+ TensorFlow 1.15.0
-## Face Recognition
+### Env variables
-A modern [**face recognition pipeline**](https://sefiks.com/2020/05/01/a-gentle-introduction-to-face-recognition-in-deep-learning/) consists of 4 common stages: [detect](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [align](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [represent](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and [verify](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/). **deepface** handles all these common stages in the background.
+ HAP_DB_NAME=hap
+ HAP_DB_HOST=localhost
+ HAP_DB_PORT=27017
+ HAP_DB_USERNAME
+ HAP_DB_PASSWORD
-**Face Verification** - [`Demo`](https://youtu.be/KRCvkNCOphE)
-Verification function under the deepface interface offers to verify face pairs as same person or different persons. You should pass face pairs as array instead of calling verify function in a for loop for the best practice. This will speed the function up dramatically and reduce the allocated memory.
+## Deployment
-```python
-from deepface import DeepFace
-result = DeepFace.verify("img1.jpg", "img2.jpg")
-#results = DeepFace.verify([['img1.jpg', 'img2.jpg'], ['img1.jpg', 'img3.jpg']])
-print("Is verified: ", result["verified"])
-```
+### Run on local
-
+1. git clone the repo
+2. Enable the python env 3.7.7
+3. All dependencies are in requirements.txt. Run `pip install -r requirements.txt` to install all project dependencies (If any error comes from cmake dlib then run pip3 install cmake).
+4. To run the app: `python src/app.py`
+5. Hit the endpoint `http://localhost:5000/`
-**Large scale face recognition** - [`Demo`](https://youtu.be/Hrjp-EStM_s)
+### Run with Flask
-Face recognition requires to apply face verification several times. Herein, deepface offers an out-of-the-box find function to handle this action. You can apply face recognition on a [large scale](https://sefiks.com/2020/05/25/large-scale-face-recognition-for-deep-learning/) data set as well.
+For running the back-end server with Flask:
-```python
-from deepface import DeepFace
-import pandas as pd
-df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db")
-#dfs = DeepFace.find(img_path = ["img1.jpg", "img2.jpg"], db_path = "C:/workspace/my_db")
-```
+`pip install -r requirements.txt`
-
+`export FLASK_APP=app.py`
-**Face recognition models** - [`Demo`](https://youtu.be/i_MOwvhbLdI)
+`flask run --host=0.0.0.0`
-Deepface is a **hybrid** face recognition package. It currently wraps the **state-of-the-art** face recognition models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) , [`Google FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`Facebook DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/) and [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/). The default configuration verifies faces with **VGG-Face** model. You can set the base model while verification as illustared below.
+Then you can visit the website on your localhost and the port is 5000. But run on this way, only one user can access the website simultaneously.
-```python
-models = ["VGG-Face", "Facenet", "OpenFace", "DeepFace", "DeepID", "Dlib"]
-for model in models:
- result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = model)
-```
+### Run with Gunicorn
-FaceNet, VGG-Face and Dlib [overperforms](https://youtu.be/i_MOwvhbLdI) than OpenFace, DeepFace and DeepID based on experiments.
+Using Gunicorn to run the server:
-**Similarity**
+`pip install -r requirements.txt`
-Face recognition models are regular [convolutional neural networks](https://sefiks.com/2018/03/23/convolutional-autoencoder-clustering-images-with-neural-networks/) and they are responsible to represent faces as vectors. Decision of verification is based on the distance between vectors. We can classify pairs if its distance is less than a [threshold](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/).
+`gunicorn -b 0.0.0.0:5000 -t 60 app:app`
-Distance could be found by different metrics such as [Cosine Similarity](https://sefiks.com/2018/08/13/cosine-similarity-in-machine-learning/), Euclidean Distance and L2 form. The default configuration finds the **cosine similarity**. You can alternatively set the similarity metric while verification as demostratred below.
+Then you can visit the website on your localhost and the port is 5000. On this way, the website can be visited by multiple users simultaneously.
-```python
-metrics = ["cosine", "euclidean", "euclidean_l2"]
-for metric in metrics:
- result = DeepFace.verify("img1.jpg", "img2.jpg", distance_metric = metric)
-```
+### Run with Docker
-Euclidean L2 form [seems](https://youtu.be/i_MOwvhbLdI) to be more stable than cosine and regular Euclidean distance based on experiments.
+#### Build the base image
-**Facial Attribute Analysis** - [`Demo`](https://youtu.be/GT2UeN85BdA)
+Use the following command to build the base image (Docker version 19.03 or above):
-Deepface also offers facial attribute analysis including [`age`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`gender`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`facial expression`](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) (including angry, fear, neutral, sad, disgust, happy and surprise) and [`race`](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/) (including asian, white, middle eastern, indian, latino and black) predictions. Analysis function under the DeepFace interface is used to find demography of a face.
+Without GPU support:
-```python
-from deepface import DeepFace
-obj = DeepFace.analyze("img4.jpg", actions = ['age', 'gender', 'race', 'emotion'])
-#objs = DeepFace.analyze(["img1.jpg", "img2.jpg", "img3.jpg"]) #analyzing multiple faces same time
-print(obj["age"]," years old ",obj["dominant_race"]," ",obj["dominant_emotion"]," ", obj["gender"])
-```
+`DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-py3 -f docker/base_image/Dockerfile .`
-
+With GPU support:
-**Face Detectors** - [`Demo`](https://youtu.be/GZ2p2hj2H5k)
+`DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-gpu-py3 -f docker/base_image/Dockerfile .`
-Face detection and alignment are early stages of a modern face recognition pipeline. [OpenCV haar cascade](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [SSD](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [Dlib](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/) and [MTCNN](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/) methods are wrapped in deepface as a detector. You can optionally pass a custom detector to functions in deepface interface. OpenCV is the default detector if you won't pass a detector.
+#### Build the release image
-```python
-backends = ['opencv', 'ssd', 'dlib', 'mtcnn']
-for backend in backends:
- #face detection and alignment
- detected_face = DeepFace.detectFace("img.jpg", detector_backend = backend)
-
- #face verification
- obj = DeepFace.verify("img1.jpg", "img2.jpg", detector_backend = backend)
-
- #face recognition
- df = DeepFace.find(img_path = "img.jpg", db_path = "my_db", detector_backend = backend)
-
- #facial analysis
- demography = DeepFace.analyze("img4.jpg", detector_backend = backend)
-```
+Use the following command to build the release image:
-[MTCNN](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/) seems to overperform in detection and alignment stages but it is slower than [SSD](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/).
+Without GPU support:
-**Streaming and Real Time Analysis** - [`Demo`](https://youtu.be/-c9sSJcx6wI)
+`docker build -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:latest -f docker/release/Dockerfile .`
-You can run deepface for real time videos as well.
+With GPU support:
-Calling stream function under the DeepFace interface will access your webcam and apply both face recognition and facial attribute analysis. Stream function expects a database folder including face images. VGG-Face is the default face recognition model and cosine similarity is the default distance metric similar to verify function. The function starts to analyze if it can focus a face sequantially 5 frames. Then, it shows results 5 seconds.
+`docker build -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:latest -f docker/release/Dockerfile .`
-```python
-from deepface import DeepFace
-DeepFace.stream("C:/User/Sefik/Desktop/database")
-```
+#### Run Docker container
-
+Without GPU support:
-Even though face recognition is based on one-shot learning, you can use multiple face pictures of a person as well. You should rearrange your directory structure as illustrated below.
+`docker run -p 5000:5000 repo.eresearch.unimelb.edu.au:8000/happypet/webapp:latest`
-```bash
-user
-├── database
-│ ├── Alice
-│ │ ├── Alice1.jpg
-│ │ ├── Alice2.jpg
-│ ├── Bob
-│ │ ├── Bob.jpg
-```
+With GPU support:
-**Ensemble learning for face recognition** - [`Demo`](https://youtu.be/EIBJJJ0ECXU)
-
-A face recognition task can be handled by several models and similarity metrics. Herein, deepface offers a [special boosting and combination solution](https://sefiks.com/2020/06/03/mastering-face-recognition-with-ensemble-learning/) to improve the accuracy of a face recognition task. This provides a huge improvement on accuracy metrics. Human beings could have 97.53% score for face recognition tasks whereas this ensemble method passes the human level accuracy and gets 98.57% accuracy. On the other hand, this runs much slower than single models.
-
-
-
-```python
-resp_obj = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "Ensemble")
-df = DeepFace.find(img_path = "img1.jpg", db_path = "my_db", model_name = "Ensemble")
-```
-
-**API** - [`Demo`](https://youtu.be/HeKCQ6U9XmI)
-
-Deepface serves an API as well. You can clone [`/api/api.py`](https://github.com/serengil/deepface/tree/master/api/api.py) and pass it to python command as an argument. This will get a rest service up. In this way, you can call deepface from an external system such as mobile app or web.
-
-```
-python api.py
-```
-
-
-
-The both face recognition and facial attribute analysis are covered in the API. You are expected to call these functions as http post methods. Service endpoints will be `http://127.0.0.1:5000/verify` for face recognition and `http://127.0.0.1:5000/analyze` for facial attribute analysis. You should pass input images as base64 encoded string in this case. [Here](https://github.com/serengil/deepface/tree/master/api), you can find a postman project.
-
-**Passing pre-built face recognition models**
-
-You can build models once and pass to deepface functions as well. This speeds you up if you are going to call deepface several times.
-
-```python
-#face recognition
-from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace, DeepID
-model = VGGFace.loadModel() #all face recognition models have loadModel() function in their interfaces
-DeepFace.verify("img1.jpg", "img2.jpg", model_name = "VGG-Face", model = model)
-
-#facial analysis
-import json
-from deepface.extendedmodels import Age, Gender, Race, Emotion
-models = {}
-models["emotion"] = Emotion.loadModel()
-models["age"] = Age.loadModel()
-models["gender"] = Gender.loadModel()
-models["race"] = Race.loadModel()
-DeepFace.analyze("img1.jpg", models=models)
-```
-
-## E-Learning
-
-Deepface package for python is mentioned in this [playlist](https://www.youtube.com/watch?v=KRCvkNCOphE&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E) as video lectures. **Subscribe** the channel to stay up-to-date and be informed when a new lecture is added.
-
-## Translations
-
-You can also read a translated version of deepface tutorials in [Chinese (深臉)](https://zhuanlan.zhihu.com/p/151403935) or [Turkish](https://bilisim.io/2020/03/26/deepface-python-icin-yuz-tanima-ve-demografi-analizi-iskeleti/).
-
-## Disclaimer
-
-Reference face recognition models have different type of licenses. This framework is just a wrapper for those models. That's why, licence types are inherited as well. You should check the licenses for the face recognition models before use.
-
-Herein, [OpenFace](https://github.com/cmusatyalab/openface/blob/master/LICENSE) is licensed under Apache License 2.0. [FB DeepFace](https://github.com/swghosh/DeepFace) and [Facenet](https://github.com/davidsandberg/facenet/blob/master/LICENSE.md) is licensed under MIT License. [Dlib](https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt) is licensed under Boost Software License. They all allow you to use for personal and commercial purpose free.
-
-On the other hand, [VGG-Face](http://www.robots.ox.ac.uk/~vgg/software/vgg_face/) is licensed under Creative Commons Attribution License. That's why, it is restricted to adopt VGG-Face for commercial use.
-
-## Support
-
-There are many ways to support a project - starring⭐️ the GitHub repos is just one.
-
-## Citation
-
-Please cite deepface in your publications if it helps your research. Here is an example BibTeX entry:
-
-```
-@inproceedings{serengil2020lightface,
- title={LightFace: A Hybrid Deep Face Recognition Framework},
- author={Serengil, Sefik Ilkin and Ozpinar, Alper},
- booktitle={2020 Innovations in Intelligent Systems and Applications Conference (ASYU)},
- year={2020},
- organization={IEEE}
-}
-```
-
-## Licence
-
-Deepface is licensed under the MIT License - see [`LICENSE`](https://github.com/serengil/deepface/blob/master/LICENSE) for more details.
-
-[Logo](https://thenounproject.com/term/face-recognition/2965879/) is created by [Adrien Coquet](https://thenounproject.com/coquet_adrien/). Licensed under [Creative Commons: By Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/).
+`docker run -p 5000:5000 repo.eresearch.unimelb.edu.au:8000/happypet/webapp-gpu:latest`
diff --git a/build-base-images.sh b/build-base-images.sh
new file mode 100755
index 0000000..13d71cb
--- /dev/null
+++ b/build-base-images.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/tensorflow:1.15.2-py3 \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-py3 \
+ -f docker/base_image/Dockerfile .
+
+DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/tensorflow:1.15.2-gpu-py3 \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-gpu-py3 \
+ -f docker/base_image_gpu/Dockerfile .
diff --git a/build-images.sh b/build-images.sh
new file mode 100755
index 0000000..c0b437a
--- /dev/null
+++ b/build-images.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+GIT_VERSION=$(git describe --tags --always --long)
+
+docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp:$GIT_VERSION \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:$GIT_VERSION \
+ -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp:latest \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:latest \
+ -f docker/release/Dockerfile .
+
+docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp-gpu:$GIT_VERSION \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp-gpu:$GIT_VERSION \
+ -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp-gpu:latest \
+ -t repo.eresearch.unimelb.edu.au:8000/happypet/webapp-gpu:latest \
+ -f docker/release_gpu/Dockerfile .
diff --git a/docker/base_image/Dockerfile b/docker/base_image/Dockerfile
new file mode 100644
index 0000000..f0e017a
--- /dev/null
+++ b/docker/base_image/Dockerfile
@@ -0,0 +1,12 @@
+FROM tensorflow/tensorflow:1.15.2-py3
+
+RUN apt-get update; \
+ apt-get install -qy libsm6 libxext6 libxrender-dev; \
+ pip install --upgrade pip; \
+ pip install --no-cache-dir cmake; \
+ pip install --no-cache-dir opencv-python; \
+ pip install --no-cache-dir dlib==19.19.0; \
+ pip install --no-cache-dir pandas==1.0.0; \
+ rm -rf /var/lib/apt/lists/*
+
+ENV TZ=Australia/Melbourne
diff --git a/docker/base_image/Dockerfile.dockerignore b/docker/base_image/Dockerfile.dockerignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/docker/base_image/Dockerfile.dockerignore
@@ -0,0 +1 @@
+*
diff --git a/docker/base_image_gpu/Dockerfile b/docker/base_image_gpu/Dockerfile
new file mode 100644
index 0000000..b5784c4
--- /dev/null
+++ b/docker/base_image_gpu/Dockerfile
@@ -0,0 +1,12 @@
+FROM tensorflow/tensorflow:1.15.2-gpu-py3
+
+RUN apt-get update; \
+ apt-get install -qy libsm6 libxext6 libxrender-dev; \
+ pip install --upgrade pip; \
+ pip install --no-cache-dir cmake; \
+ pip install --no-cache-dir opencv-python; \
+ pip install --no-cache-dir dlib==19.19.0; \
+ pip install --no-cache-dir pandas==1.0.0; \
+ rm -rf /var/lib/apt/lists/*
+
+ENV TZ=Australia/Melbourne
diff --git a/docker/base_image_gpu/Dockerfile.dockerignore b/docker/base_image_gpu/Dockerfile.dockerignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/docker/base_image_gpu/Dockerfile.dockerignore
@@ -0,0 +1 @@
+*
diff --git a/docker/release/Dockerfile b/docker/release/Dockerfile
new file mode 100644
index 0000000..2c68e52
--- /dev/null
+++ b/docker/release/Dockerfile
@@ -0,0 +1,11 @@
+FROM repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-py3
+
+WORKDIR /app
+
+COPY ["./src", "requirements.txt", "./"]
+
+RUN pip install --no-cache-dir -r requirements.txt
+
+EXPOSE 5000
+
+CMD ["python", "app.py"]
\ No newline at end of file
diff --git a/docker/release_gpu/Dockerfile b/docker/release_gpu/Dockerfile
new file mode 100644
index 0000000..dfda6f7
--- /dev/null
+++ b/docker/release_gpu/Dockerfile
@@ -0,0 +1,11 @@
+FROM repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-gpu-py3
+
+WORKDIR /app
+
+COPY ["./src", "requirements.txt", "./"]
+
+RUN pip install --no-cache-dir -r requirements.txt
+
+EXPOSE 5000
+
+CMD ["python", "app.py"]
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 02f965e..b429f24 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,10 +1,68 @@
-numpy>=1.14.0
-pandas>=0.23.4
-gdown>=3.10.1
-tqdm>=4.30.0
-Pillow>=5.2.0
-opencv-python>=3.4.4
-tensorflow>=1.9.0
-keras>=2.2.0
-Flask>=1.1.2
-mtcnn>=0.1.0
\ No newline at end of file
+absl-py==0.9.0
+astor==0.8.1
+astunparse==1.6.3
+cachetools==4.1.0
+certifi==2020.4.5.1
+chardet==3.0.4
+Click==7.0
+cycler==0.10.0
+decorator==4.4.1
+dlib==19.19.0
+dnspython==2.0.0
+face-recognition==1.2.3
+face-recognition-models==0.3.0
+Flask==1.1.1
+flask-mongoengine==0.9.5
+flask-restplus==0.13.0
+gast==0.2.2
+google-auth==1.14.1
+google-auth-oauthlib==0.4.1
+google-pasta==0.1.8
+grpcio==1.26.0
+gunicorn==20.0.4
+h5py==2.10.0
+idna==2.9
+imageio==2.6.1
+imutils==0.5.3
+itsdangerous==1.1.0
+Jinja2==2.11.1
+joblib==0.14.1
+Keras==2.1.5
+Keras-Applications==1.0.8
+Keras-Preprocessing==1.1.0
+kiwisolver==1.1.0
+Markdown==3.1.1
+MarkupSafe==1.1.1
+matplotlib==3.1.2
+networkx==2.4
+numpy==1.18.1
+oauthlib==3.1.0
+opencv-python==4.1.2.30
+opt-einsum==3.1.0
+pandas==1.0.0
+Pillow==7.0.0
+protobuf==3.11.2
+pyasn1==0.4.8
+pyasn1-modules==0.2.8
+pyparsing==2.4.6
+python-dateutil==2.8.1
+pytz==2019.3
+PyWavelets==1.1.1
+PyYAML==5.3
+requests==2.23.0
+requests-oauthlib==1.3.0
+rsa==4.0
+scikit-image==0.16.2
+scikit-learn==0.22.1
+scipy==1.4.1
+six==1.14.0
+sklearn==0.0
+tensorboard==1.15.0
+tensorboard-plugin-wit==1.6.0.post3
+tensorflow==1.15.0
+tensorflow-estimator==1.15.1
+termcolor==1.1.0
+urllib3==1.25.9
+Werkzeug==0.16.1
+wrapt==1.11.2
+wikipedia==1.4.0
diff --git a/LICENSE b/src/LICENSE
similarity index 100%
rename from LICENSE
rename to src/LICENSE
diff --git a/src/README.md b/src/README.md
new file mode 100644
index 0000000..4d825e3
--- /dev/null
+++ b/src/README.md
@@ -0,0 +1,216 @@
+# deepface
+
+[](https://pepy.tech/project/deepface)
+[](https://github.com/serengil/deepface/blob/master/LICENSE)
+
+
+
+**deepface** is a lightweight [face recognition](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and facial attribute analysis ([age](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [gender](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [emotion](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) and [race](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/)) framework for python. It is a hybrid face recognition framework wrapping **state-of-the-art** models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/), [`Google FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`Facebook DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/) and [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/). The library is mainly based on Keras and TensorFlow.
+
+## Installation
+
+The easiest way to install deepface is to download it from [`PyPI`](https://pypi.org/project/deepface/).
+
+```python
+pip install deepface
+```
+
+## Face Recognition
+
+A modern [**face recognition pipeline**](https://sefiks.com/2020/05/01/a-gentle-introduction-to-face-recognition-in-deep-learning/) consists of 4 common stages: [detect](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [align](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [represent](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and [verify](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/). **deepface** handles all these common stages in the background.
+
+**Face Verification** - [`Demo`](https://youtu.be/KRCvkNCOphE)
+
+Verification function under the deepface interface offers to verify face pairs as same person or different persons. You should pass face pairs as array instead of calling verify function in a for loop for the best practice. This will speed the function up dramatically and reduce the allocated memory.
+
+```python
+from deepface import DeepFace
+result = DeepFace.verify("img1.jpg", "img2.jpg")
+#results = DeepFace.verify([['img1.jpg', 'img2.jpg'], ['img1.jpg', 'img3.jpg']])
+print("Is verified: ", result["verified"])
+```
+
+
+
+**Large scale face recognition** - [`Demo`](https://youtu.be/Hrjp-EStM_s)
+
+Face recognition requires to apply face verification several times. Herein, deepface offers an out-of-the-box find function to handle this action. You can apply face recognition on a [large scale](https://sefiks.com/2020/05/25/large-scale-face-recognition-for-deep-learning/) data set as well.
+
+```python
+from deepface import DeepFace
+import pandas as pd
+df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db")
+#dfs = DeepFace.find(img_path = ["img1.jpg", "img2.jpg"], db_path = "C:/workspace/my_db")
+```
+
+
+
+**Face recognition models** - [`Demo`](https://youtu.be/i_MOwvhbLdI)
+
+Deepface is a **hybrid** face recognition package. It currently wraps the **state-of-the-art** face recognition models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) , [`Google FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`Facebook DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/) and [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/). The default configuration verifies faces with **VGG-Face** model. You can set the base model while verification as illustared below.
+
+```python
+models = ["VGG-Face", "Facenet", "OpenFace", "DeepFace", "DeepID", "Dlib"]
+for model in models:
+ result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = model)
+```
+
+FaceNet, VGG-Face and Dlib [overperforms](https://youtu.be/i_MOwvhbLdI) than OpenFace, DeepFace and DeepID based on experiments.
+
+**Similarity**
+
+Face recognition models are regular [convolutional neural networks](https://sefiks.com/2018/03/23/convolutional-autoencoder-clustering-images-with-neural-networks/) and they are responsible to represent faces as vectors. Decision of verification is based on the distance between vectors. We can classify pairs if its distance is less than a [threshold](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/).
+
+Distance could be found by different metrics such as [Cosine Similarity](https://sefiks.com/2018/08/13/cosine-similarity-in-machine-learning/), Euclidean Distance and L2 form. The default configuration finds the **cosine similarity**. You can alternatively set the similarity metric while verification as demostratred below.
+
+```python
+metrics = ["cosine", "euclidean", "euclidean_l2"]
+for metric in metrics:
+ result = DeepFace.verify("img1.jpg", "img2.jpg", distance_metric = metric)
+```
+
+Euclidean L2 form [seems](https://youtu.be/i_MOwvhbLdI) to be more stable than cosine and regular Euclidean distance based on experiments.
+
+**Facial Attribute Analysis** - [`Demo`](https://youtu.be/GT2UeN85BdA)
+
+Deepface also offers facial attribute analysis including [`age`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`gender`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`facial expression`](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) (including angry, fear, neutral, sad, disgust, happy and surprise) and [`race`](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/) (including asian, white, middle eastern, indian, latino and black) predictions. Analysis function under the DeepFace interface is used to find demography of a face.
+
+```python
+from deepface import DeepFace
+obj = DeepFace.analyze("img4.jpg", actions = ['age', 'gender', 'race', 'emotion'])
+#objs = DeepFace.analyze(["img1.jpg", "img2.jpg", "img3.jpg"]) #analyzing multiple faces same time
+print(obj["age"]," years old ",obj["dominant_race"]," ",obj["dominant_emotion"]," ", obj["gender"])
+```
+
+
+
+**Face Detectors** - [`Demo`](https://youtu.be/GZ2p2hj2H5k)
+
+Face detection and alignment are early stages of a modern face recognition pipeline. [OpenCV haar cascade](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [SSD](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [Dlib](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/) and [MTCNN](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/) methods are wrapped in deepface as a detector. You can optionally pass a custom detector to functions in deepface interface. OpenCV is the default detector if you won't pass a detector.
+
+```python
+backends = ['opencv', 'ssd', 'dlib', 'mtcnn']
+for backend in backends:
+ #face detection and alignment
+ detected_face = DeepFace.detectFace("img.jpg", detector_backend = backend)
+
+ #face verification
+ obj = DeepFace.verify("img1.jpg", "img2.jpg", detector_backend = backend)
+
+ #face recognition
+ df = DeepFace.find(img_path = "img.jpg", db_path = "my_db", detector_backend = backend)
+
+ #facial analysis
+ demography = DeepFace.analyze("img4.jpg", detector_backend = backend)
+```
+
+[MTCNN](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/) seems to overperform in detection and alignment stages but it is slower than [SSD](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/).
+
+**Streaming and Real Time Analysis** - [`Demo`](https://youtu.be/-c9sSJcx6wI)
+
+You can run deepface for real time videos as well.
+
+Calling stream function under the DeepFace interface will access your webcam and apply both face recognition and facial attribute analysis. Stream function expects a database folder including face images. VGG-Face is the default face recognition model and cosine similarity is the default distance metric similar to verify function. The function starts to analyze if it can focus a face sequantially 5 frames. Then, it shows results 5 seconds.
+
+```python
+from deepface import DeepFace
+DeepFace.stream("C:/User/Sefik/Desktop/database")
+```
+
+
+
+Even though face recognition is based on one-shot learning, you can use multiple face pictures of a person as well. You should rearrange your directory structure as illustrated below.
+
+```bash
+user
+├── database
+│ ├── Alice
+│ │ ├── Alice1.jpg
+│ │ ├── Alice2.jpg
+│ ├── Bob
+│ │ ├── Bob.jpg
+```
+
+**Ensemble learning for face recognition** - [`Demo`](https://youtu.be/EIBJJJ0ECXU)
+
+A face recognition task can be handled by several models and similarity metrics. Herein, deepface offers a [special boosting and combination solution](https://sefiks.com/2020/06/03/mastering-face-recognition-with-ensemble-learning/) to improve the accuracy of a face recognition task. This provides a huge improvement on accuracy metrics. Human beings could have 97.53% score for face recognition tasks whereas this ensemble method passes the human level accuracy and gets 98.57% accuracy. On the other hand, this runs much slower than single models.
+
+
+
+```python
+resp_obj = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "Ensemble")
+df = DeepFace.find(img_path = "img1.jpg", db_path = "my_db", model_name = "Ensemble")
+```
+
+**API** - [`Demo`](https://youtu.be/HeKCQ6U9XmI)
+
+Deepface serves an API as well. You can clone [`/api/api.py`](https://github.com/serengil/deepface/tree/master/api/api.py) and pass it to python command as an argument. This will get a rest service up. In this way, you can call deepface from an external system such as mobile app or web.
+
+```
+python api.py
+```
+
+
+
+The both face recognition and facial attribute analysis are covered in the API. You are expected to call these functions as http post methods. Service endpoints will be `http://127.0.0.1:5000/verify` for face recognition and `http://127.0.0.1:5000/analyze` for facial attribute analysis. You should pass input images as base64 encoded string in this case. [Here](https://github.com/serengil/deepface/tree/master/api), you can find a postman project.
+
+**Passing pre-built face recognition models**
+
+You can build models once and pass to deepface functions as well. This speeds you up if you are going to call deepface several times.
+
+```python
+#face recognition
+from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace, DeepID
+model = VGGFace.loadModel() #all face recognition models have loadModel() function in their interfaces
+DeepFace.verify("img1.jpg", "img2.jpg", model_name = "VGG-Face", model = model)
+
+#facial analysis
+import json
+from deepface.extendedmodels import Age, Gender, Race, Emotion
+models = {}
+models["emotion"] = Emotion.loadModel()
+models["age"] = Age.loadModel()
+models["gender"] = Gender.loadModel()
+models["race"] = Race.loadModel()
+DeepFace.analyze("img1.jpg", models=models)
+```
+
+## E-Learning
+
+Deepface package for python is mentioned in this [playlist](https://www.youtube.com/watch?v=KRCvkNCOphE&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E) as video lectures. **Subscribe** the channel to stay up-to-date and be informed when a new lecture is added.
+
+## Translations
+
+You can also read a translated version of deepface tutorials in [Chinese (深臉)](https://zhuanlan.zhihu.com/p/151403935) or [Turkish](https://bilisim.io/2020/03/26/deepface-python-icin-yuz-tanima-ve-demografi-analizi-iskeleti/).
+
+## Disclaimer
+
+Reference face recognition models have different type of licenses. This framework is just a wrapper for those models. That's why, licence types are inherited as well. You should check the licenses for the face recognition models before use.
+
+Herein, [OpenFace](https://github.com/cmusatyalab/openface/blob/master/LICENSE) is licensed under Apache License 2.0. [FB DeepFace](https://github.com/swghosh/DeepFace) and [Facenet](https://github.com/davidsandberg/facenet/blob/master/LICENSE.md) is licensed under MIT License. [Dlib](https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt) is licensed under Boost Software License. They all allow you to use for personal and commercial purpose free.
+
+On the other hand, [VGG-Face](http://www.robots.ox.ac.uk/~vgg/software/vgg_face/) is licensed under Creative Commons Attribution License. That's why, it is restricted to adopt VGG-Face for commercial use.
+
+## Support
+
+There are many ways to support a project - starring⭐️ the GitHub repos is just one.
+
+## Citation
+
+Please cite deepface in your publications if it helps your research. Here is an example BibTeX entry:
+
+```
+@inproceedings{serengil2020lightface,
+ title={LightFace: A Hybrid Deep Face Recognition Framework},
+ author={Serengil, Sefik Ilkin and Ozpinar, Alper},
+ booktitle={2020 Innovations in Intelligent Systems and Applications Conference (ASYU)},
+ year={2020},
+ organization={IEEE}
+}
+```
+
+## Licence
+
+Deepface is licensed under the MIT License - see [`LICENSE`](https://github.com/serengil/deepface/blob/master/LICENSE) for more details.
+
+[Logo](https://thenounproject.com/term/face-recognition/2965879/) is created by [Adrien Coquet](https://thenounproject.com/coquet_adrien/). Licensed under [Creative Commons: By Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/).
diff --git a/api/api.py b/src/api/api.py
similarity index 100%
rename from api/api.py
rename to src/api/api.py
diff --git a/api/deepface.postman_collection.json b/src/api/deepface.postman_collection.json
similarity index 100%
rename from api/deepface.postman_collection.json
rename to src/api/deepface.postman_collection.json
diff --git a/app.py b/src/app.py
similarity index 100%
rename from app.py
rename to src/app.py
diff --git a/config.py b/src/config.py
similarity index 100%
rename from config.py
rename to src/config.py
diff --git a/controller/__init__.py b/src/controller/__init__.py
similarity index 100%
rename from controller/__init__.py
rename to src/controller/__init__.py
diff --git a/controller/feedback_controller.py b/src/controller/feedback_controller.py
similarity index 100%
rename from controller/feedback_controller.py
rename to src/controller/feedback_controller.py
diff --git a/controller/general_controller.py b/src/controller/general_controller.py
similarity index 100%
rename from controller/general_controller.py
rename to src/controller/general_controller.py
diff --git a/controller/prediction_controller.py b/src/controller/prediction_controller.py
similarity index 100%
rename from controller/prediction_controller.py
rename to src/controller/prediction_controller.py
diff --git a/deepface/DeepFace.py b/src/deepface/DeepFace.py
similarity index 100%
rename from deepface/DeepFace.py
rename to src/deepface/DeepFace.py
diff --git a/deepface/DeepFaceLite.py b/src/deepface/DeepFaceLite.py
similarity index 100%
rename from deepface/DeepFaceLite.py
rename to src/deepface/DeepFaceLite.py
diff --git a/deepface/__init__.py b/src/deepface/__init__.py
similarity index 100%
rename from deepface/__init__.py
rename to src/deepface/__init__.py
diff --git a/src/deepface/__pycache__/DeepFace.cpython-38.pyc b/src/deepface/__pycache__/DeepFace.cpython-38.pyc
new file mode 100644
index 0000000..6c7c5f6
Binary files /dev/null and b/src/deepface/__pycache__/DeepFace.cpython-38.pyc differ
diff --git a/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc b/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc
new file mode 100644
index 0000000..f7468ec
Binary files /dev/null and b/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc differ
diff --git a/src/deepface/__pycache__/__init__.cpython-38.pyc b/src/deepface/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..890b78e
Binary files /dev/null and b/src/deepface/__pycache__/__init__.cpython-38.pyc differ
diff --git a/deepface/basemodels/DeepID.py b/src/deepface/basemodels/DeepID.py
similarity index 100%
rename from deepface/basemodels/DeepID.py
rename to src/deepface/basemodels/DeepID.py
diff --git a/deepface/basemodels/DlibResNet.py b/src/deepface/basemodels/DlibResNet.py
similarity index 100%
rename from deepface/basemodels/DlibResNet.py
rename to src/deepface/basemodels/DlibResNet.py
diff --git a/deepface/basemodels/Facenet.py b/src/deepface/basemodels/Facenet.py
similarity index 100%
rename from deepface/basemodels/Facenet.py
rename to src/deepface/basemodels/Facenet.py
diff --git a/deepface/basemodels/FbDeepFace.py b/src/deepface/basemodels/FbDeepFace.py
similarity index 100%
rename from deepface/basemodels/FbDeepFace.py
rename to src/deepface/basemodels/FbDeepFace.py
diff --git a/deepface/basemodels/OpenFace.py b/src/deepface/basemodels/OpenFace.py
similarity index 100%
rename from deepface/basemodels/OpenFace.py
rename to src/deepface/basemodels/OpenFace.py
diff --git a/deepface/basemodels/VGGFace.py b/src/deepface/basemodels/VGGFace.py
similarity index 100%
rename from deepface/basemodels/VGGFace.py
rename to src/deepface/basemodels/VGGFace.py
diff --git a/deepface/basemodels/__init__.py b/src/deepface/basemodels/__init__.py
similarity index 100%
rename from deepface/basemodels/__init__.py
rename to src/deepface/basemodels/__init__.py
diff --git a/src/deepface/basemodels/__pycache__/DeepID.cpython-38.pyc b/src/deepface/basemodels/__pycache__/DeepID.cpython-38.pyc
new file mode 100644
index 0000000..6187a06
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/DeepID.cpython-38.pyc differ
diff --git a/src/deepface/basemodels/__pycache__/Facenet.cpython-38.pyc b/src/deepface/basemodels/__pycache__/Facenet.cpython-38.pyc
new file mode 100644
index 0000000..3ee752b
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/Facenet.cpython-38.pyc differ
diff --git a/src/deepface/basemodels/__pycache__/FbDeepFace.cpython-38.pyc b/src/deepface/basemodels/__pycache__/FbDeepFace.cpython-38.pyc
new file mode 100644
index 0000000..03503dc
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/FbDeepFace.cpython-38.pyc differ
diff --git a/src/deepface/basemodels/__pycache__/OpenFace.cpython-38.pyc b/src/deepface/basemodels/__pycache__/OpenFace.cpython-38.pyc
new file mode 100644
index 0000000..f30e437
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/OpenFace.cpython-38.pyc differ
diff --git a/src/deepface/basemodels/__pycache__/VGGFace.cpython-38.pyc b/src/deepface/basemodels/__pycache__/VGGFace.cpython-38.pyc
new file mode 100644
index 0000000..5507c5f
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/VGGFace.cpython-38.pyc differ
diff --git a/src/deepface/basemodels/__pycache__/__init__.cpython-38.pyc b/src/deepface/basemodels/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..ec47ebb
Binary files /dev/null and b/src/deepface/basemodels/__pycache__/__init__.cpython-38.pyc differ
diff --git a/deepface/commons/__init__.py b/src/deepface/commons/__init__.py
similarity index 100%
rename from deepface/commons/__init__.py
rename to src/deepface/commons/__init__.py
diff --git a/src/deepface/commons/__pycache__/__init__.cpython-38.pyc b/src/deepface/commons/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..364972c
Binary files /dev/null and b/src/deepface/commons/__pycache__/__init__.cpython-38.pyc differ
diff --git a/src/deepface/commons/__pycache__/distance.cpython-38.pyc b/src/deepface/commons/__pycache__/distance.cpython-38.pyc
new file mode 100644
index 0000000..eb9ab79
Binary files /dev/null and b/src/deepface/commons/__pycache__/distance.cpython-38.pyc differ
diff --git a/src/deepface/commons/__pycache__/functions.cpython-38.pyc b/src/deepface/commons/__pycache__/functions.cpython-38.pyc
new file mode 100644
index 0000000..a529f05
Binary files /dev/null and b/src/deepface/commons/__pycache__/functions.cpython-38.pyc differ
diff --git a/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc b/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc
new file mode 100644
index 0000000..3190a25
Binary files /dev/null and b/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc differ
diff --git a/src/deepface/commons/__pycache__/realtime.cpython-38.pyc b/src/deepface/commons/__pycache__/realtime.cpython-38.pyc
new file mode 100644
index 0000000..f6addce
Binary files /dev/null and b/src/deepface/commons/__pycache__/realtime.cpython-38.pyc differ
diff --git a/deepface/commons/distance.py b/src/deepface/commons/distance.py
similarity index 100%
rename from deepface/commons/distance.py
rename to src/deepface/commons/distance.py
diff --git a/deepface/commons/functions.py b/src/deepface/commons/functions.py
similarity index 100%
rename from deepface/commons/functions.py
rename to src/deepface/commons/functions.py
diff --git a/deepface/commons/functionsLite.py b/src/deepface/commons/functionsLite.py
similarity index 100%
rename from deepface/commons/functionsLite.py
rename to src/deepface/commons/functionsLite.py
diff --git a/deepface/commons/realtime.py b/src/deepface/commons/realtime.py
similarity index 100%
rename from deepface/commons/realtime.py
rename to src/deepface/commons/realtime.py
diff --git a/deepface/extendedmodels/Age.py b/src/deepface/extendedmodels/Age.py
similarity index 100%
rename from deepface/extendedmodels/Age.py
rename to src/deepface/extendedmodels/Age.py
diff --git a/deepface/extendedmodels/Emotion.py b/src/deepface/extendedmodels/Emotion.py
similarity index 100%
rename from deepface/extendedmodels/Emotion.py
rename to src/deepface/extendedmodels/Emotion.py
diff --git a/deepface/extendedmodels/Gender.py b/src/deepface/extendedmodels/Gender.py
similarity index 100%
rename from deepface/extendedmodels/Gender.py
rename to src/deepface/extendedmodels/Gender.py
diff --git a/deepface/extendedmodels/Race.py b/src/deepface/extendedmodels/Race.py
similarity index 100%
rename from deepface/extendedmodels/Race.py
rename to src/deepface/extendedmodels/Race.py
diff --git a/deepface/extendedmodels/__init__.py b/src/deepface/extendedmodels/__init__.py
similarity index 100%
rename from deepface/extendedmodels/__init__.py
rename to src/deepface/extendedmodels/__init__.py
diff --git a/src/deepface/extendedmodels/__pycache__/Age.cpython-38.pyc b/src/deepface/extendedmodels/__pycache__/Age.cpython-38.pyc
new file mode 100644
index 0000000..dbf294b
Binary files /dev/null and b/src/deepface/extendedmodels/__pycache__/Age.cpython-38.pyc differ
diff --git a/src/deepface/extendedmodels/__pycache__/Emotion.cpython-38.pyc b/src/deepface/extendedmodels/__pycache__/Emotion.cpython-38.pyc
new file mode 100644
index 0000000..588bd43
Binary files /dev/null and b/src/deepface/extendedmodels/__pycache__/Emotion.cpython-38.pyc differ
diff --git a/src/deepface/extendedmodels/__pycache__/Gender.cpython-38.pyc b/src/deepface/extendedmodels/__pycache__/Gender.cpython-38.pyc
new file mode 100644
index 0000000..02d5265
Binary files /dev/null and b/src/deepface/extendedmodels/__pycache__/Gender.cpython-38.pyc differ
diff --git a/src/deepface/extendedmodels/__pycache__/Race.cpython-38.pyc b/src/deepface/extendedmodels/__pycache__/Race.cpython-38.pyc
new file mode 100644
index 0000000..bdc438c
Binary files /dev/null and b/src/deepface/extendedmodels/__pycache__/Race.cpython-38.pyc differ
diff --git a/src/deepface/extendedmodels/__pycache__/__init__.cpython-38.pyc b/src/deepface/extendedmodels/__pycache__/__init__.cpython-38.pyc
new file mode 100644
index 0000000..8e83e61
Binary files /dev/null and b/src/deepface/extendedmodels/__pycache__/__init__.cpython-38.pyc differ
diff --git a/deepface/models/__init__.py b/src/deepface/models/__init__.py
similarity index 100%
rename from deepface/models/__init__.py
rename to src/deepface/models/__init__.py
diff --git a/deepface/models/face-recognition-ensemble-model.txt b/src/deepface/models/face-recognition-ensemble-model.txt
similarity index 100%
rename from deepface/models/face-recognition-ensemble-model.txt
rename to src/deepface/models/face-recognition-ensemble-model.txt
diff --git a/deepface_lite.ipynb b/src/deepface_lite.ipynb
similarity index 100%
rename from deepface_lite.ipynb
rename to src/deepface_lite.ipynb
diff --git a/extension/constants.py b/src/extension/constants.py
similarity index 100%
rename from extension/constants.py
rename to src/extension/constants.py
diff --git a/extension/utilServices.py b/src/extension/utilServices.py
similarity index 100%
rename from extension/utilServices.py
rename to src/extension/utilServices.py
diff --git a/font/FiraMono-Medium.otf b/src/font/FiraMono-Medium.otf
similarity index 100%
rename from font/FiraMono-Medium.otf
rename to src/font/FiraMono-Medium.otf
diff --git a/font/SIL Open Font License.txt b/src/font/SIL Open Font License.txt
similarity index 100%
rename from font/SIL Open Font License.txt
rename to src/font/SIL Open Font License.txt
diff --git a/icon/deepface-api.jpg b/src/icon/deepface-api.jpg
similarity index 100%
rename from icon/deepface-api.jpg
rename to src/icon/deepface-api.jpg
diff --git a/icon/deepface-icon-labeled.png b/src/icon/deepface-icon-labeled.png
similarity index 100%
rename from icon/deepface-icon-labeled.png
rename to src/icon/deepface-icon-labeled.png
diff --git a/icon/deepface-icon.png b/src/icon/deepface-icon.png
similarity index 100%
rename from icon/deepface-icon.png
rename to src/icon/deepface-icon.png
diff --git a/icon/stock-1.jpg b/src/icon/stock-1.jpg
similarity index 100%
rename from icon/stock-1.jpg
rename to src/icon/stock-1.jpg
diff --git a/icon/stock-2.jpg b/src/icon/stock-2.jpg
similarity index 100%
rename from icon/stock-2.jpg
rename to src/icon/stock-2.jpg
diff --git a/icon/stock-3.jpg b/src/icon/stock-3.jpg
similarity index 100%
rename from icon/stock-3.jpg
rename to src/icon/stock-3.jpg
diff --git a/icon/stock-4.jpg b/src/icon/stock-4.jpg
similarity index 100%
rename from icon/stock-4.jpg
rename to src/icon/stock-4.jpg
diff --git a/icon/stock-6-v2.jpg b/src/icon/stock-6-v2.jpg
similarity index 100%
rename from icon/stock-6-v2.jpg
rename to src/icon/stock-6-v2.jpg
diff --git a/models/__init__.py b/src/models/__init__.py
similarity index 100%
rename from models/__init__.py
rename to src/models/__init__.py
diff --git a/models/feedback.py b/src/models/feedback.py
similarity index 100%
rename from models/feedback.py
rename to src/models/feedback.py
diff --git a/models/prediction.py b/src/models/prediction.py
similarity index 100%
rename from models/prediction.py
rename to src/models/prediction.py
diff --git a/my_deepface.ipynb b/src/my_deepface.ipynb
similarity index 100%
rename from my_deepface.ipynb
rename to src/my_deepface.ipynb
diff --git a/src/requirements.txt b/src/requirements.txt
new file mode 100644
index 0000000..02f965e
--- /dev/null
+++ b/src/requirements.txt
@@ -0,0 +1,10 @@
+numpy>=1.14.0
+pandas>=0.23.4
+gdown>=3.10.1
+tqdm>=4.30.0
+Pillow>=5.2.0
+opencv-python>=3.4.4
+tensorflow>=1.9.0
+keras>=2.2.0
+Flask>=1.1.2
+mtcnn>=0.1.0
\ No newline at end of file
diff --git a/setup.py b/src/setup.py
similarity index 100%
rename from setup.py
rename to src/setup.py
diff --git a/static/css/bootstrap.css b/src/static/css/bootstrap.css
similarity index 100%
rename from static/css/bootstrap.css
rename to src/static/css/bootstrap.css
diff --git a/static/css/bootstrap.css.map b/src/static/css/bootstrap.css.map
similarity index 100%
rename from static/css/bootstrap.css.map
rename to src/static/css/bootstrap.css.map
diff --git a/static/css/bootstrap.min.css b/src/static/css/bootstrap.min.css
similarity index 100%
rename from static/css/bootstrap.min.css
rename to src/static/css/bootstrap.min.css
diff --git a/static/css/bootstrap.min.css.map b/src/static/css/bootstrap.min.css.map
similarity index 100%
rename from static/css/bootstrap.min.css.map
rename to src/static/css/bootstrap.min.css.map
diff --git a/static/css/fileinput.css b/src/static/css/fileinput.css
similarity index 100%
rename from static/css/fileinput.css
rename to src/static/css/fileinput.css
diff --git a/static/css/fileinput.min.css b/src/static/css/fileinput.min.css
similarity index 100%
rename from static/css/fileinput.min.css
rename to src/static/css/fileinput.min.css
diff --git a/static/css/homePage.css b/src/static/css/homePage.css
similarity index 100%
rename from static/css/homePage.css
rename to src/static/css/homePage.css
diff --git a/static/img/cat_smile.jpg b/src/static/img/cat_smile.jpg
similarity index 100%
rename from static/img/cat_smile.jpg
rename to src/static/img/cat_smile.jpg
diff --git a/static/img/dog_smile.jpg b/src/static/img/dog_smile.jpg
similarity index 100%
rename from static/img/dog_smile.jpg
rename to src/static/img/dog_smile.jpg
diff --git a/static/img/loading-sm.gif b/src/static/img/loading-sm.gif
similarity index 100%
rename from static/img/loading-sm.gif
rename to src/static/img/loading-sm.gif
diff --git a/static/img/loading.gif b/src/static/img/loading.gif
similarity index 100%
rename from static/img/loading.gif
rename to src/static/img/loading.gif
diff --git a/static/js/bootstrap.js b/src/static/js/bootstrap.js
similarity index 100%
rename from static/js/bootstrap.js
rename to src/static/js/bootstrap.js
diff --git a/static/js/bootstrap.min.js b/src/static/js/bootstrap.min.js
similarity index 100%
rename from static/js/bootstrap.min.js
rename to src/static/js/bootstrap.min.js
diff --git a/static/js/fileinput.js b/src/static/js/fileinput.js
similarity index 100%
rename from static/js/fileinput.js
rename to src/static/js/fileinput.js
diff --git a/static/js/fileinput.min.js b/src/static/js/fileinput.min.js
similarity index 100%
rename from static/js/fileinput.min.js
rename to src/static/js/fileinput.min.js
diff --git a/static/js/jQuery.min.js b/src/static/js/jQuery.min.js
similarity index 100%
rename from static/js/jQuery.min.js
rename to src/static/js/jQuery.min.js
diff --git a/templates/base.html b/src/templates/base.html
similarity index 100%
rename from templates/base.html
rename to src/templates/base.html
diff --git a/templates/breedPage.html b/src/templates/breedPage.html
similarity index 100%
rename from templates/breedPage.html
rename to src/templates/breedPage.html
diff --git a/templates/homePage.html b/src/templates/homePage.html
similarity index 100%
rename from templates/homePage.html
rename to src/templates/homePage.html
diff --git a/templates/statisticalPage.html b/src/templates/statisticalPage.html
similarity index 100%
rename from templates/statisticalPage.html
rename to src/templates/statisticalPage.html
diff --git a/test_imgs/test1.jpg b/src/test_imgs/test1.jpg
similarity index 100%
rename from test_imgs/test1.jpg
rename to src/test_imgs/test1.jpg
diff --git a/test_imgs/test2.jpeg b/src/test_imgs/test2.jpeg
similarity index 100%
rename from test_imgs/test2.jpeg
rename to src/test_imgs/test2.jpeg
diff --git a/test_imgs/test3.jpg b/src/test_imgs/test3.jpg
similarity index 100%
rename from test_imgs/test3.jpg
rename to src/test_imgs/test3.jpg
diff --git a/tests/Ensemble-Face-Recognition.py b/src/tests/Ensemble-Face-Recognition.py
similarity index 100%
rename from tests/Ensemble-Face-Recognition.py
rename to src/tests/Ensemble-Face-Recognition.py
diff --git a/tests/Fine-Tuning-Threshold.ipynb b/src/tests/Fine-Tuning-Threshold.ipynb
similarity index 100%
rename from tests/Fine-Tuning-Threshold.ipynb
rename to src/tests/Fine-Tuning-Threshold.ipynb
diff --git a/tests/dataset/face-recognition-pivot.csv b/src/tests/dataset/face-recognition-pivot.csv
similarity index 100%
rename from tests/dataset/face-recognition-pivot.csv
rename to src/tests/dataset/face-recognition-pivot.csv
diff --git a/tests/dataset/img1.jpg b/src/tests/dataset/img1.jpg
similarity index 100%
rename from tests/dataset/img1.jpg
rename to src/tests/dataset/img1.jpg
diff --git a/tests/dataset/img10.jpg b/src/tests/dataset/img10.jpg
similarity index 100%
rename from tests/dataset/img10.jpg
rename to src/tests/dataset/img10.jpg
diff --git a/tests/dataset/img11.jpg b/src/tests/dataset/img11.jpg
similarity index 100%
rename from tests/dataset/img11.jpg
rename to src/tests/dataset/img11.jpg
diff --git a/tests/dataset/img12.jpg b/src/tests/dataset/img12.jpg
similarity index 100%
rename from tests/dataset/img12.jpg
rename to src/tests/dataset/img12.jpg
diff --git a/tests/dataset/img13.jpg b/src/tests/dataset/img13.jpg
similarity index 100%
rename from tests/dataset/img13.jpg
rename to src/tests/dataset/img13.jpg
diff --git a/tests/dataset/img14.jpg b/src/tests/dataset/img14.jpg
similarity index 100%
rename from tests/dataset/img14.jpg
rename to src/tests/dataset/img14.jpg
diff --git a/tests/dataset/img15.jpg b/src/tests/dataset/img15.jpg
similarity index 100%
rename from tests/dataset/img15.jpg
rename to src/tests/dataset/img15.jpg
diff --git a/tests/dataset/img16.jpg b/src/tests/dataset/img16.jpg
similarity index 100%
rename from tests/dataset/img16.jpg
rename to src/tests/dataset/img16.jpg
diff --git a/tests/dataset/img17.jpg b/src/tests/dataset/img17.jpg
similarity index 100%
rename from tests/dataset/img17.jpg
rename to src/tests/dataset/img17.jpg
diff --git a/tests/dataset/img18.jpg b/src/tests/dataset/img18.jpg
similarity index 100%
rename from tests/dataset/img18.jpg
rename to src/tests/dataset/img18.jpg
diff --git a/tests/dataset/img19.jpg b/src/tests/dataset/img19.jpg
similarity index 100%
rename from tests/dataset/img19.jpg
rename to src/tests/dataset/img19.jpg
diff --git a/tests/dataset/img2.jpg b/src/tests/dataset/img2.jpg
similarity index 100%
rename from tests/dataset/img2.jpg
rename to src/tests/dataset/img2.jpg
diff --git a/tests/dataset/img20.jpg b/src/tests/dataset/img20.jpg
similarity index 100%
rename from tests/dataset/img20.jpg
rename to src/tests/dataset/img20.jpg
diff --git a/tests/dataset/img21.jpg b/src/tests/dataset/img21.jpg
similarity index 100%
rename from tests/dataset/img21.jpg
rename to src/tests/dataset/img21.jpg
diff --git a/tests/dataset/img22.jpg b/src/tests/dataset/img22.jpg
similarity index 100%
rename from tests/dataset/img22.jpg
rename to src/tests/dataset/img22.jpg
diff --git a/tests/dataset/img23.jpg b/src/tests/dataset/img23.jpg
similarity index 100%
rename from tests/dataset/img23.jpg
rename to src/tests/dataset/img23.jpg
diff --git a/tests/dataset/img24.jpg b/src/tests/dataset/img24.jpg
similarity index 100%
rename from tests/dataset/img24.jpg
rename to src/tests/dataset/img24.jpg
diff --git a/tests/dataset/img25.jpg b/src/tests/dataset/img25.jpg
similarity index 100%
rename from tests/dataset/img25.jpg
rename to src/tests/dataset/img25.jpg
diff --git a/tests/dataset/img26.jpg b/src/tests/dataset/img26.jpg
similarity index 100%
rename from tests/dataset/img26.jpg
rename to src/tests/dataset/img26.jpg
diff --git a/tests/dataset/img27.jpg b/src/tests/dataset/img27.jpg
similarity index 100%
rename from tests/dataset/img27.jpg
rename to src/tests/dataset/img27.jpg
diff --git a/tests/dataset/img28.jpg b/src/tests/dataset/img28.jpg
similarity index 100%
rename from tests/dataset/img28.jpg
rename to src/tests/dataset/img28.jpg
diff --git a/tests/dataset/img29.jpg b/src/tests/dataset/img29.jpg
similarity index 100%
rename from tests/dataset/img29.jpg
rename to src/tests/dataset/img29.jpg
diff --git a/tests/dataset/img3.jpg b/src/tests/dataset/img3.jpg
similarity index 100%
rename from tests/dataset/img3.jpg
rename to src/tests/dataset/img3.jpg
diff --git a/tests/dataset/img30.jpg b/src/tests/dataset/img30.jpg
similarity index 100%
rename from tests/dataset/img30.jpg
rename to src/tests/dataset/img30.jpg
diff --git a/tests/dataset/img31.jpg b/src/tests/dataset/img31.jpg
similarity index 100%
rename from tests/dataset/img31.jpg
rename to src/tests/dataset/img31.jpg
diff --git a/tests/dataset/img32.jpg b/src/tests/dataset/img32.jpg
similarity index 100%
rename from tests/dataset/img32.jpg
rename to src/tests/dataset/img32.jpg
diff --git a/tests/dataset/img33.jpg b/src/tests/dataset/img33.jpg
similarity index 100%
rename from tests/dataset/img33.jpg
rename to src/tests/dataset/img33.jpg
diff --git a/tests/dataset/img34.jpg b/src/tests/dataset/img34.jpg
similarity index 100%
rename from tests/dataset/img34.jpg
rename to src/tests/dataset/img34.jpg
diff --git a/tests/dataset/img35.jpg b/src/tests/dataset/img35.jpg
similarity index 100%
rename from tests/dataset/img35.jpg
rename to src/tests/dataset/img35.jpg
diff --git a/tests/dataset/img36.jpg b/src/tests/dataset/img36.jpg
similarity index 100%
rename from tests/dataset/img36.jpg
rename to src/tests/dataset/img36.jpg
diff --git a/tests/dataset/img37.jpg b/src/tests/dataset/img37.jpg
similarity index 100%
rename from tests/dataset/img37.jpg
rename to src/tests/dataset/img37.jpg
diff --git a/tests/dataset/img38.jpg b/src/tests/dataset/img38.jpg
similarity index 100%
rename from tests/dataset/img38.jpg
rename to src/tests/dataset/img38.jpg
diff --git a/tests/dataset/img39.jpg b/src/tests/dataset/img39.jpg
similarity index 100%
rename from tests/dataset/img39.jpg
rename to src/tests/dataset/img39.jpg
diff --git a/tests/dataset/img4.jpg b/src/tests/dataset/img4.jpg
similarity index 100%
rename from tests/dataset/img4.jpg
rename to src/tests/dataset/img4.jpg
diff --git a/tests/dataset/img40.jpg b/src/tests/dataset/img40.jpg
similarity index 100%
rename from tests/dataset/img40.jpg
rename to src/tests/dataset/img40.jpg
diff --git a/tests/dataset/img41.jpg b/src/tests/dataset/img41.jpg
similarity index 100%
rename from tests/dataset/img41.jpg
rename to src/tests/dataset/img41.jpg
diff --git a/tests/dataset/img42.jpg b/src/tests/dataset/img42.jpg
similarity index 100%
rename from tests/dataset/img42.jpg
rename to src/tests/dataset/img42.jpg
diff --git a/tests/dataset/img43.jpg b/src/tests/dataset/img43.jpg
similarity index 100%
rename from tests/dataset/img43.jpg
rename to src/tests/dataset/img43.jpg
diff --git a/tests/dataset/img44.jpg b/src/tests/dataset/img44.jpg
similarity index 100%
rename from tests/dataset/img44.jpg
rename to src/tests/dataset/img44.jpg
diff --git a/tests/dataset/img45.jpg b/src/tests/dataset/img45.jpg
similarity index 100%
rename from tests/dataset/img45.jpg
rename to src/tests/dataset/img45.jpg
diff --git a/tests/dataset/img46.jpg b/src/tests/dataset/img46.jpg
similarity index 100%
rename from tests/dataset/img46.jpg
rename to src/tests/dataset/img46.jpg
diff --git a/tests/dataset/img47.jpg b/src/tests/dataset/img47.jpg
similarity index 100%
rename from tests/dataset/img47.jpg
rename to src/tests/dataset/img47.jpg
diff --git a/tests/dataset/img48.jpg b/src/tests/dataset/img48.jpg
similarity index 100%
rename from tests/dataset/img48.jpg
rename to src/tests/dataset/img48.jpg
diff --git a/tests/dataset/img49.jpg b/src/tests/dataset/img49.jpg
similarity index 100%
rename from tests/dataset/img49.jpg
rename to src/tests/dataset/img49.jpg
diff --git a/tests/dataset/img5.jpg b/src/tests/dataset/img5.jpg
similarity index 100%
rename from tests/dataset/img5.jpg
rename to src/tests/dataset/img5.jpg
diff --git a/tests/dataset/img50.jpg b/src/tests/dataset/img50.jpg
similarity index 100%
rename from tests/dataset/img50.jpg
rename to src/tests/dataset/img50.jpg
diff --git a/tests/dataset/img51.jpg b/src/tests/dataset/img51.jpg
similarity index 100%
rename from tests/dataset/img51.jpg
rename to src/tests/dataset/img51.jpg
diff --git a/tests/dataset/img53.jpg b/src/tests/dataset/img53.jpg
similarity index 100%
rename from tests/dataset/img53.jpg
rename to src/tests/dataset/img53.jpg
diff --git a/tests/dataset/img54.jpg b/src/tests/dataset/img54.jpg
similarity index 100%
rename from tests/dataset/img54.jpg
rename to src/tests/dataset/img54.jpg
diff --git a/tests/dataset/img55.jpg b/src/tests/dataset/img55.jpg
similarity index 100%
rename from tests/dataset/img55.jpg
rename to src/tests/dataset/img55.jpg
diff --git a/tests/dataset/img56.jpg b/src/tests/dataset/img56.jpg
similarity index 100%
rename from tests/dataset/img56.jpg
rename to src/tests/dataset/img56.jpg
diff --git a/tests/dataset/img57.jpg b/src/tests/dataset/img57.jpg
similarity index 100%
rename from tests/dataset/img57.jpg
rename to src/tests/dataset/img57.jpg
diff --git a/tests/dataset/img58.jpg b/src/tests/dataset/img58.jpg
similarity index 100%
rename from tests/dataset/img58.jpg
rename to src/tests/dataset/img58.jpg
diff --git a/tests/dataset/img59.jpg b/src/tests/dataset/img59.jpg
similarity index 100%
rename from tests/dataset/img59.jpg
rename to src/tests/dataset/img59.jpg
diff --git a/tests/dataset/img6.jpg b/src/tests/dataset/img6.jpg
similarity index 100%
rename from tests/dataset/img6.jpg
rename to src/tests/dataset/img6.jpg
diff --git a/tests/dataset/img61.jpg b/src/tests/dataset/img61.jpg
similarity index 100%
rename from tests/dataset/img61.jpg
rename to src/tests/dataset/img61.jpg
diff --git a/tests/dataset/img62.jpg b/src/tests/dataset/img62.jpg
similarity index 100%
rename from tests/dataset/img62.jpg
rename to src/tests/dataset/img62.jpg
diff --git a/tests/dataset/img67.jpg b/src/tests/dataset/img67.jpg
similarity index 100%
rename from tests/dataset/img67.jpg
rename to src/tests/dataset/img67.jpg
diff --git a/tests/dataset/img7.jpg b/src/tests/dataset/img7.jpg
similarity index 100%
rename from tests/dataset/img7.jpg
rename to src/tests/dataset/img7.jpg
diff --git a/tests/dataset/img8.jpg b/src/tests/dataset/img8.jpg
similarity index 100%
rename from tests/dataset/img8.jpg
rename to src/tests/dataset/img8.jpg
diff --git a/tests/dataset/img9.jpg b/src/tests/dataset/img9.jpg
similarity index 100%
rename from tests/dataset/img9.jpg
rename to src/tests/dataset/img9.jpg
diff --git a/tests/dataset/master.csv b/src/tests/dataset/master.csv
similarity index 100%
rename from tests/dataset/master.csv
rename to src/tests/dataset/master.csv
diff --git a/tests/face-recognition-how.py b/src/tests/face-recognition-how.py
similarity index 100%
rename from tests/face-recognition-how.py
rename to src/tests/face-recognition-how.py
diff --git a/tests/unit_tests.py b/src/tests/unit_tests.py
similarity index 100%
rename from tests/unit_tests.py
rename to src/tests/unit_tests.py
diff --git a/views/__init__.py b/src/views/__init__.py
similarity index 100%
rename from views/__init__.py
rename to src/views/__init__.py
diff --git a/views/public_route.py b/src/views/public_route.py
similarity index 100%
rename from views/public_route.py
rename to src/views/public_route.py
diff --git a/yolov3_with_emo.py b/src/yolov3_with_emo.py
similarity index 100%
rename from yolov3_with_emo.py
rename to src/yolov3_with_emo.py
diff --git a/test_imgs/.DS_Store b/test_imgs/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
Binary files a/test_imgs/.DS_Store and /dev/null differ