├── .directory ├── .gitignore ├── .idea ├── crimedetec.iml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── AUTHORS.rst ├── CONTRIBUTING.rst ├── Dockerfile ├── Dockerfile.gpu ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.md ├── README.rst ├── README_Simplified_Chinese.md ├── crime_identify.sql ├── crimedetec ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-34.pyc │ ├── __init__.cpython-37.pyc │ ├── settings.cpython-34.pyc │ ├── settings.cpython-37.pyc │ ├── urls.cpython-34.pyc │ ├── urls.cpython-37.pyc │ ├── wsgi.cpython-34.pyc │ └── wsgi.cpython-37.pyc ├── settings.py ├── urls.py └── wsgi.py ├── db.sqlite3 ├── docker-compose.yml ├── docs ├── Makefile ├── authors.rst ├── conf.py ├── contributing.rst ├── face_recognition.rst ├── history.rst ├── index.rst ├── installation.rst ├── make.bat ├── modules.rst ├── readme.rst └── usage.rst ├── face_recognition ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-34.pyc │ ├── __init__.cpython-37.pyc │ ├── api.cpython-34.pyc │ └── api.cpython-37.pyc ├── api.py ├── face_detection_cli.py └── face_recognition_cli.py ├── main ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-34.pyc │ ├── __init__.cpython-37.pyc │ ├── admin.cpython-34.pyc │ ├── admin.cpython-37.pyc │ ├── apps.cpython-34.pyc │ ├── models.cpython-34.pyc │ ├── models.cpython-37.pyc │ ├── serializers.cpython-34.pyc │ ├── serializers.cpython-37.pyc │ ├── urls.cpython-34.pyc │ ├── urls.cpython-37.pyc │ ├── views.cpython-34.pyc │ └── views.cpython-37.pyc ├── admin.py ├── apps.py ├── images │ ├── alex-lacamoire.png │ ├── biden.jpg │ ├── lin-manuel-miranda.png │ ├── moswa.png │ ├── obama-1080p.jpg │ ├── obama-240p.jpg │ ├── obama-480p.jpg │ ├── obama-720p.jpg │ ├── obama.jpg │ ├── obama2.jpg │ ├── obama_small.jpg │ ├── two_people.jpg │ └── web.jpg ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20190513_0501.py │ ├── 0003_file.py │ ├── 0004_auto_20190514_2053.py │ ├── 0005_auto_20190515_0512.py │ ├── 0006_auto_20190515_0529.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-34.pyc │ │ ├── 0001_initial.cpython-37.pyc │ │ ├── 0002_auto_20190513_0501.cpython-34.pyc │ │ ├── 0002_auto_20190513_0501.cpython-37.pyc │ │ ├── 0003_file.cpython-34.pyc │ │ ├── 0003_file.cpython-37.pyc │ │ ├── 0004_auto_20190514_2053.cpython-34.pyc │ │ ├── 0004_auto_20190514_2053.cpython-37.pyc │ │ ├── 0005_auto_20190515_0512.cpython-34.pyc │ │ ├── 0005_auto_20190515_0512.cpython-37.pyc │ │ ├── 0006_auto_20190515_0529.cpython-34.pyc │ │ ├── 0006_auto_20190515_0529.cpython-37.pyc │ │ ├── __init__.cpython-34.pyc │ │ └── __init__.cpython-37.pyc ├── models.py ├── serializers.py ├── static │ └── assets │ │ ├── css │ │ ├── bootstrap.min.css │ │ ├── default-css.css │ │ ├── font-awesome.min.css │ │ ├── metisMenu.css │ │ ├── owl.carousel.min.css │ │ ├── responsive.css │ │ ├── slicknav.min.css │ │ ├── styles.css │ │ ├── themify-icons.css │ │ └── typography.css │ │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── themify.eot │ │ ├── themify.svg │ │ ├── themify.ttf │ │ └── themify.woff │ │ ├── images │ │ ├── author │ │ │ ├── author-img1.jpg │ │ │ ├── author-img2.jpg │ │ │ ├── author-img3.jpg │ │ │ ├── author-img4.jpg │ │ │ └── avatar.png │ │ ├── bg │ │ │ └── singin-bg.jpg │ │ ├── blog │ │ │ ├── post-thumb1.jpg │ │ │ └── post-thumb2.jpg │ │ ├── card │ │ │ ├── card-img1.jpg │ │ │ ├── card-img10.jpg │ │ │ ├── card-img2.jpg │ │ │ ├── card-img3.jpg │ │ │ ├── card-img4.jpg │ │ │ ├── card-img5.jpg │ │ │ ├── card-img6.jpg │ │ │ ├── card-img7.jpg │ │ │ ├── card-img8.jpg │ │ │ ├── card-img9.jpg │ │ │ ├── uploadimage.jpg │ │ │ ├── uploadvideo.png │ │ │ └── webcam.jpg │ │ ├── icon │ │ │ ├── Thumbs.db │ │ │ ├── loader.gif │ │ │ ├── logo.png │ │ │ ├── logo2.png │ │ │ └── market-value │ │ │ │ ├── Thumbs.db │ │ │ │ ├── icon1.png │ │ │ │ ├── icon2.png │ │ │ │ ├── icon3.png │ │ │ │ ├── icon4.png │ │ │ │ ├── trends-down-icon.png │ │ │ │ ├── trends-up-icon.png │ │ │ │ ├── triangle-down.png │ │ │ │ └── triangle-up.png │ │ ├── media │ │ │ ├── media1.jpg │ │ │ ├── media2.jpg │ │ │ └── photo.png │ │ ├── police │ │ │ ├── police.jpeg │ │ │ ├── police.png │ │ │ ├── zrp.jpeg │ │ │ └── zrp.png │ │ └── team │ │ │ ├── team-author1.jpg │ │ │ ├── team-author2.jpg │ │ │ ├── team-author3.jpg │ │ │ ├── team-author4.jpg │ │ │ └── team-author5.jpg │ │ └── js │ │ ├── bar-chart.js │ │ ├── bootstrap.min.js │ │ ├── jquery-1.11.1.min.js │ │ ├── jquery.canvasjs.min.js │ │ ├── jquery.slicknav.min.js │ │ ├── jquery.slimscroll.min.js │ │ ├── line-chart.js │ │ ├── maps.js │ │ ├── metisMenu.min.js │ │ ├── owl.carousel.min.js │ │ ├── pie-chart.js │ │ ├── plugins.js │ │ ├── popper.min.js │ │ ├── scripts.js │ │ └── vendor │ │ ├── jquery-2.2.4.min.js │ │ └── modernizr-2.8.3.min.js ├── templates │ ├── home │ │ ├── add_citizen.html │ │ ├── add_user.html │ │ ├── loc.html │ │ ├── reports.html │ │ ├── spotted_thiefs.html │ │ ├── test.html │ │ ├── upload_pic.html │ │ ├── view_citizenz.html │ │ ├── view_location.html │ │ ├── view_users.html │ │ └── welcome.html │ ├── layout │ │ ├── base.html │ │ └── base2.html │ └── session │ │ └── login.html ├── tests.py ├── urls.py └── views.py ├── manage.py ├── media ├── .directory ├── mapu.jpeg ├── moswa.png ├── moswa_6H5KMnH.png ├── moswa_KGXPLMh.png ├── moswa_KmdRUzW.png ├── moswa_Ov2AjO2.png ├── moswa_cWnMocu.png ├── moswa_lL3JMMO.png ├── moswa_p84zaBm.png ├── patie.jpg ├── patie_Kkx2LMJ.jpg ├── patie_hYH2rZN.jpg ├── wayne.jpg ├── wayne2.jpg ├── wayne2_4eSLLJ6.jpg ├── wayne2_5e7VeBI.jpg ├── wayne2_FTOe0oE.jpg ├── wayne2_HptHBHd.jpg ├── wayne2_KDaHFNA.jpg ├── wayne2_YgtaXAk.jpg ├── wayne2_nP4q4KN.jpg ├── wayne_QUk4I6J.jpg └── wayne_e5iMzjB.jpg ├── requirements.txt ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── test_face_recognition.py └── test_images │ ├── 32bit.png │ ├── biden.jpg │ ├── obama.jpg │ ├── obama2.jpg │ ├── obama3.jpg │ ├── obama_partial_face.jpg │ └── obama_partial_face2.jpg └── tox.ini /.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | PreviewsShown=true 3 | Timestamp=2019,6,1,11,11,33 4 | Version=4 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venvx -------------------------------------------------------------------------------- /.idea/crimedetec.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Authors 3 | ======= 4 | 5 | * Adam Geitgey 6 | 7 | Thanks 8 | ------ 9 | 10 | * Many, many thanks to Davis King (@nulhom) 11 | for creating dlib and for providing the trained facial feature detection and face encoding models 12 | used in this library. 13 | * Thanks to everyone who works on all the awesome Python data science libraries like numpy, scipy, scikit-image, 14 | pillow, etc, etc that makes this kind of stuff so easy and fun in Python. 15 | * Thanks to Cookiecutter and the audreyr/cookiecutter-pypackage project template 16 | for making Python project packaging way more tolerable. 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Contributing 5 | ============ 6 | 7 | Contributions are welcome, and they are greatly appreciated! Every 8 | little bit helps, and credit will always be given. 9 | 10 | You can contribute in many ways: 11 | 12 | Types of Contributions 13 | ---------------------- 14 | 15 | Report Bugs 16 | ~~~~~~~~~~~ 17 | 18 | Report bugs at https://github.com/ageitgey/face_recognition/issues. 19 | 20 | If you are reporting a bug, please include: 21 | 22 | * Your operating system name and version. 23 | * Any details about your local setup that might be helpful in troubleshooting. 24 | * Detailed steps to reproduce the bug. 25 | 26 | Submit Feedback 27 | ~~~~~~~~~~~~~~~ 28 | 29 | The best way to send feedback is to file an issue at https://github.com/ageitgey/face_recognition/issues. 30 | 31 | If you are proposing a feature: 32 | 33 | * Explain in detail how it would work. 34 | * Keep the scope as narrow as possible, to make it easier to implement. 35 | * Remember that this is a volunteer-driven project, and that contributions 36 | are welcome :) 37 | 38 | Get Started! 39 | ------------ 40 | 41 | Ready to contribute? Here's how to set up `face_recognition` for local development. 42 | 43 | 1. Fork the `face_recognition` repo on GitHub. 44 | 2. Clone your fork locally:: 45 | 46 | $ git clone git@github.com:your_name_here/face_recognition.git 47 | 48 | 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: 49 | 50 | $ mkvirtualenv face_recognition 51 | $ cd face_recognition/ 52 | $ python setup.py develop 53 | 54 | 4. Create a branch for local development:: 55 | 56 | $ git checkout -b name-of-your-bugfix-or-feature 57 | 58 | Now you can make your changes locally. 59 | 60 | 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: 61 | 62 | $ flake8 face_recognition tests 63 | $ python setup.py test or py.test 64 | $ tox 65 | 66 | To get flake8 and tox, just pip install them into your virtualenv. 67 | 68 | 6. Commit your changes and push your branch to GitHub:: 69 | 70 | $ git add . 71 | $ git commit -m "Your detailed description of your changes." 72 | $ git push origin name-of-your-bugfix-or-feature 73 | 74 | 7. Submit a pull request through the GitHub website. 75 | 76 | Pull Request Guidelines 77 | ----------------------- 78 | 79 | Before you submit a pull request, check that it meets these guidelines: 80 | 81 | 1. The pull request should include tests. 82 | 2. If the pull request adds functionality, the docs should be updated. Put 83 | your new functionality into a function with a docstring, and add the 84 | feature to the list in README.rst. 85 | 3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check 86 | https://travis-ci.org/ageitgey/face_recognition/pull_requests 87 | and make sure that the tests pass for all supported Python versions. 88 | 89 | Tips 90 | ---- 91 | 92 | To run a subset of tests:: 93 | 94 | 95 | $ python -m unittest tests.test_face_recognition 96 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # This is a sample Dockerfile you can modify to deploy your own app based on face_recognition 2 | 3 | FROM python:3.6-slim-stretch 4 | 5 | RUN apt-get -y update 6 | RUN apt-get install -y --fix-missing \ 7 | build-essential \ 8 | cmake \ 9 | gfortran \ 10 | git \ 11 | wget \ 12 | curl \ 13 | graphicsmagick \ 14 | libgraphicsmagick1-dev \ 15 | libatlas-dev \ 16 | libavcodec-dev \ 17 | libavformat-dev \ 18 | libgtk2.0-dev \ 19 | libjpeg-dev \ 20 | liblapack-dev \ 21 | libswscale-dev \ 22 | pkg-config \ 23 | python3-dev \ 24 | python3-numpy \ 25 | software-properties-common \ 26 | zip \ 27 | && apt-get clean && rm -rf /tmp/* /var/tmp/* 28 | 29 | RUN cd ~ && \ 30 | mkdir -p dlib && \ 31 | git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \ 32 | cd dlib/ && \ 33 | python3 setup.py install --yes USE_AVX_INSTRUCTIONS 34 | 35 | 36 | # The rest of this file just runs an example script. 37 | 38 | # If you wanted to use this Dockerfile to run your own app instead, maybe you would do this: 39 | # COPY . /root/your_app_or_whatever 40 | # RUN cd /root/your_app_or_whatever && \ 41 | # pip3 install -r requirements.txt 42 | # RUN whatever_command_you_run_to_start_your_app 43 | 44 | COPY . /root/face_recognition 45 | RUN cd /root/face_recognition && \ 46 | pip3 install -r requirements.txt && \ 47 | python3 setup.py install 48 | 49 | CMD cd /root/face_recognition/examples && \ 50 | python3 recognize_faces_in_pictures.py -------------------------------------------------------------------------------- /Dockerfile.gpu: -------------------------------------------------------------------------------- 1 | # This is a sample Dockerfile you can modify to deploy your own app based on face_recognition on the GPU 2 | # In order to run Docker in the GPU you will need to install Nvidia-Docker: https://github.com/NVIDIA/nvidia-docker 3 | 4 | FROM nvidia/cuda:9.0-cudnn7-devel 5 | 6 | # Install face recognition dependencies 7 | 8 | RUN apt update -y; apt install -y \ 9 | git \ 10 | cmake \ 11 | libsm6 \ 12 | libxext6 \ 13 | libxrender-dev \ 14 | python3 \ 15 | python3-pip 16 | 17 | RUN pip3 install scikit-build 18 | 19 | # Install compilers 20 | 21 | RUN apt install -y software-properties-common 22 | RUN add-apt-repository ppa:ubuntu-toolchain-r/test 23 | RUN apt update -y; apt install -y gcc-6 g++-6 24 | 25 | RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 50 26 | RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 50 27 | 28 | #Install dlib 29 | 30 | RUN git clone -b 'v19.16' --single-branch https://github.com/davisking/dlib.git 31 | RUN mkdir -p /dlib/build 32 | 33 | RUN cmake -H/dlib -B/dlib/build -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 34 | RUN cmake --build /dlib/build 35 | 36 | RUN cd /dlib; python3 /dlib/setup.py install 37 | 38 | # Install the face recognition package 39 | 40 | RUN pip3 install face_recognition 41 | -------------------------------------------------------------------------------- /HISTORY.rst: -------------------------------------------------------------------------------- 1 | History 2 | ======= 3 | 4 | 1.2.3 (2018-08-21) 5 | ------------------ 6 | 7 | * You can now pass model="small" to face_landmarks() to use the 5-point face model instead of the 68-point model. 8 | * Now officially supporting Python 3.7 9 | * New example of using this library in a Jupyter Notebook 10 | 11 | 1.2.2 (2018-04-02) 12 | ------------------ 13 | 14 | * Added the face_detection CLI command 15 | * Removed dependencies on scipy to make installation easier 16 | * Cleaned up KNN example and fixed a bug with drawing fonts to label detected faces in the demo 17 | 18 | 19 | 1.2.1 (2018-02-01) 20 | ------------------ 21 | 22 | * Fixed version numbering inside of module code. 23 | 24 | 25 | 1.2.0 (2018-02-01) 26 | ------------------ 27 | 28 | * Fixed a bug where batch size parameter didn't work correctly when doing batch face detections on GPU. 29 | * Updated OpenCV examples to do proper BGR -> RGB conversion 30 | * Updated webcam examples to avoid common mistakes and reduce support questions 31 | * Added a KNN classification example 32 | * Added an example of automatically blurring faces in images or videos 33 | * Updated Dockerfile example to use dlib v19.9 which removes the boost dependency. 34 | 35 | 36 | 1.1.0 (2017-09-23) 37 | ------------------ 38 | 39 | * Will use dlib's 5-point face pose estimator when possible for speed (instead of 68-point face pose esimator) 40 | * dlib v19.7 is now the minimum required version 41 | * face_recognition_models v0.3.0 is now the minimum required version 42 | 43 | 44 | 1.0.0 (2017-08-29) 45 | ------------------ 46 | 47 | * Added support for dlib's CNN face detection model via model="cnn" parameter on face detecion call 48 | * Added support for GPU batched face detections using dlib's CNN face detector model 49 | * Added find_faces_in_picture_cnn.py to examples 50 | * Added find_faces_in_batches.py to examples 51 | * Added face_rec_from_video_file.py to examples 52 | * dlib v19.5 is now the minimum required version 53 | * face_recognition_models v0.2.0 is now the minimum required version 54 | 55 | 56 | 0.2.2 (2017-07-07) 57 | ------------------ 58 | 59 | * Added --show-distance to cli 60 | * Fixed a bug where --tolerance was ignored in cli if testing a single image 61 | * Added benchmark.py to examples 62 | 63 | 64 | 0.2.1 (2017-07-03) 65 | ------------------ 66 | 67 | * Added --tolerance to cli 68 | 69 | 70 | 0.2.0 (2017-06-03) 71 | ------------------ 72 | 73 | * The CLI can now take advantage of multiple CPUs. Just pass in the -cpus X parameter where X is the number of CPUs to use. 74 | * Added face_distance.py example 75 | * Improved CLI tests to actually test the CLI functionality 76 | * Updated facerec_on_raspberry_pi.py to capture in rgb (not bgr) format. 77 | 78 | 79 | 0.1.14 (2017-04-22) 80 | ------------------- 81 | 82 | * Fixed a ValueError crash when using the CLI on Python 2.7 83 | 84 | 85 | 0.1.13 (2017-04-20) 86 | ------------------- 87 | 88 | * Raspberry Pi support. 89 | 90 | 91 | 0.1.12 (2017-04-13) 92 | ------------------- 93 | 94 | * Fixed: Face landmarks wasn't returning all chin points. 95 | 96 | 97 | 0.1.11 (2017-03-30) 98 | ------------------- 99 | 100 | * Fixed a minor bug in the command-line interface. 101 | 102 | 103 | 0.1.10 (2017-03-21) 104 | ------------------- 105 | 106 | * Minor pref improvements with face comparisons. 107 | * Test updates. 108 | 109 | 110 | 0.1.9 (2017-03-16) 111 | ------------------ 112 | 113 | * Fix minimum scipy version required. 114 | 115 | 116 | 0.1.8 (2017-03-16) 117 | ------------------ 118 | 119 | * Fix missing Pillow dependency. 120 | 121 | 122 | 0.1.7 (2017-03-13) 123 | ------------------ 124 | 125 | * First working release. 126 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Copyright (c) 2017, Adam Geitgey 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | 12 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | 2 | include AUTHORS.rst 3 | 4 | include CONTRIBUTING.rst 5 | include HISTORY.rst 6 | include LICENSE 7 | include README.rst 8 | 9 | recursive-include tests * 10 | recursive-exclude * __pycache__ 11 | recursive-exclude * *.py[co] 12 | 13 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean clean-test clean-pyc clean-build docs help 2 | .DEFAULT_GOAL := help 3 | define BROWSER_PYSCRIPT 4 | import os, webbrowser, sys 5 | try: 6 | from urllib import pathname2url 7 | except: 8 | from urllib.request import pathname2url 9 | 10 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) 11 | endef 12 | export BROWSER_PYSCRIPT 13 | 14 | define PRINT_HELP_PYSCRIPT 15 | import re, sys 16 | 17 | for line in sys.stdin: 18 | match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) 19 | if match: 20 | target, help = match.groups() 21 | print("%-20s %s" % (target, help)) 22 | endef 23 | export PRINT_HELP_PYSCRIPT 24 | BROWSER := python3 -c "$$BROWSER_PYSCRIPT" 25 | 26 | help: 27 | @python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) 28 | 29 | clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts 30 | 31 | 32 | clean-build: ## remove build artifacts 33 | rm -fr build/ 34 | rm -fr dist/ 35 | rm -fr .eggs/ 36 | find . -name '*.egg-info' -exec rm -fr {} + 37 | find . -name '*.egg' -exec rm -f {} + 38 | 39 | clean-pyc: ## remove Python file artifacts 40 | find . -name '*.pyc' -exec rm -f {} + 41 | find . -name '*.pyo' -exec rm -f {} + 42 | find . -name '*~' -exec rm -f {} + 43 | find . -name '__pycache__' -exec rm -fr {} + 44 | 45 | clean-test: ## remove test and coverage artifacts 46 | rm -fr .tox/ 47 | rm -f .coverage 48 | rm -fr htmlcov/ 49 | 50 | lint: ## check style with flake8 51 | flake8 face_recognition tests 52 | 53 | test: ## run tests quickly with the default Python 54 | 55 | python3 setup.py test 56 | 57 | test-all: ## run tests on every Python version with tox 58 | tox 59 | 60 | coverage: ## check code coverage quickly with the default Python 61 | 62 | coverage run --source face_recognition setup.py test 63 | 64 | coverage report -m 65 | coverage html 66 | $(BROWSER) htmlcov/index.html 67 | 68 | docs: ## generate Sphinx HTML documentation, including API docs 69 | sphinx-apidoc -o docs/ face_recognition 70 | $(MAKE) -C docs clean 71 | $(MAKE) -C docs html 72 | $(BROWSER) docs/_build/html/index.html 73 | 74 | servedocs: docs ## compile the docs watching for changes 75 | watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . 76 | 77 | release: clean ## package and upload a release 78 | python3 setup.py sdist upload 79 | python3 setup.py bdist_wheel upload 80 | 81 | dist: clean ## builds source and wheel package 82 | python3 setup.py sdist 83 | python3 setup.py bdist_wheel 84 | ls -l dist 85 | 86 | install: clean ## install the package to the active Python's site-packages 87 | python3 setup.py install 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Face Recognition 2 | 3 | Recognize faces of thieves captured with CCTV using 4 | the world's simplest face recognition library. 5 | 6 | Built using [dlib](http://dlib.net/)'s state-of-the-art face recognition 7 | built with deep learning. The model has an accuracy of 99.38% on the 8 | [Labeled Faces in the Wild](http://vis-www.cs.umass.edu/lfw/) benchmark. 9 | 10 | 11 | 12 | ## Installation 13 | 14 | ### Requirements 15 | 16 | * Python 3.3+ or 17 | 18 | * clone this repository 19 | * git clone 20 | * #do a pip install 21 | * pip install -r requirements.txt 22 | * #modify the database in the settings.py which is this part 23 | DATABASES = { 24 | 'default': { 25 | 'NAME': 'crime_identify', 26 | 'ENGINE': 'mysql.connector.django', 27 | 'USER': 'root', 28 | 'PASSWORD': 'moswa', 29 | 'OPTIONS': { 30 | 'autocommit': True, 31 | }, 32 | } 33 | } 34 | 35 | * #create a database with the name of your choice 36 | * #import the sql crime_identify.sql in the root folder for the project you cloned 37 | * #you can also run a python migrate if you do not want the data populated in my database 38 | 39 | ## Checkout the video at 40 | * https://www.youtube.com/watch?v=dPHTOraUPDc&t=12s 41 | 42 | 43 | 44 | 45 | ## Thanks 46 | 47 | * Thanks to this repository https://github.com/ageitgey/face_recognition for making this possible 48 | * Thanks to everyone who works on all the awesome Python data science libraries like numpy, scipy, scikit-image, 49 | pillow, etc, etc that makes this kind of stuff so easy and fun in Python. 50 | 51 | -------------------------------------------------------------------------------- /crimedetec/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__init__.py -------------------------------------------------------------------------------- /crimedetec/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/settings.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/settings.cpython-34.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/urls.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/urls.cpython-34.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/wsgi.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/wsgi.cpython-34.pyc -------------------------------------------------------------------------------- /crimedetec/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/crimedetec/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /crimedetec/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for crimedetec project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0.13. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'fre@x55i)(w+_svwf5yk1^_=)m)gii)@q3f66x4!oj5fwh28z4' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'main', 35 | 'django.contrib.admin', 36 | 'django.contrib.auth', 37 | 'django.contrib.contenttypes', 38 | 'django.contrib.sessions', 39 | 'django.contrib.messages', 40 | 'django.contrib.staticfiles', 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = 'crimedetec.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [os.path.join(BASE_DIR, 'templates')] 59 | , 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'crimedetec.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 77 | 78 | # DATABASES = { 79 | # 'default': { 80 | # 'ENGINE': 'django.db.backends.sqlite3', 81 | # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | # } 83 | # } 84 | 85 | DATABASES = { 86 | 'default': { 87 | 'NAME': 'crime_identify', 88 | 'ENGINE': 'mysql.connector.django', 89 | 'USER': 'root', 90 | 'PASSWORD': 'moswa', 91 | 'OPTIONS': { 92 | 'autocommit': True, 93 | }, 94 | } 95 | } 96 | 97 | 98 | # Password validation 99 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 100 | 101 | AUTH_PASSWORD_VALIDATORS = [ 102 | { 103 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 104 | }, 105 | { 106 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 107 | }, 108 | { 109 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 110 | }, 111 | { 112 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 113 | }, 114 | ] 115 | 116 | 117 | # Internationalization 118 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 119 | 120 | LANGUAGE_CODE = 'en-us' 121 | 122 | TIME_ZONE = 'UTC' 123 | 124 | USE_I18N = True 125 | 126 | USE_L10N = True 127 | 128 | USE_TZ = True 129 | 130 | 131 | # Static files (CSS, JavaScript, Images) 132 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 133 | 134 | STATIC_URL = '/static/' 135 | STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') 136 | 137 | MEDIA_URL = '/media/' 138 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 139 | -------------------------------------------------------------------------------- /crimedetec/urls.py: -------------------------------------------------------------------------------- 1 | """crimedetec URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | path('',include('main.urls')) 21 | ] 22 | -------------------------------------------------------------------------------- /crimedetec/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for crimedetec project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "crimedetec.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/db.sqlite3 -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.3' 2 | 3 | services: 4 | face_recognition: 5 | image: face_recognition 6 | container_name: face_recognition 7 | working_dir: /face_recognition/examples 8 | build: 9 | context: . 10 | #Uncomment this line to run the example on the GPU (requires Nvidia-Docker) 11 | # dockerfile: Dockerfile.gpu 12 | command: python3 -u find_faces_in_picture_cnn.py 13 | volumes: 14 | - ./:/face_recognition 15 | #Uncomment this line to run the example on the GPU (requires Nvidia-Docker) 16 | # runtime: nvidia -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/face_recognition.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/face_recognition.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/face_recognition" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/face_recognition" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../AUTHORS.rst 2 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # face_recognition documentation build configuration file, created by 5 | # sphinx-quickstart on Tue Jul 9 22:26:36 2013. 6 | # 7 | # This file is execfile()d with the current directory set to its 8 | # containing dir. 9 | # 10 | # Note that not all possible configuration values are present in this 11 | # autogenerated file. 12 | # 13 | # All configuration values have a default; values that are commented out 14 | # serve to show the default. 15 | 16 | import sys 17 | import os 18 | from unittest.mock import MagicMock 19 | 20 | class Mock(MagicMock): 21 | @classmethod 22 | def __getattr__(cls, name): 23 | return MagicMock() 24 | 25 | MOCK_MODULES = ['face_recognition_models', 'Click', 'dlib', 'numpy', 'PIL'] 26 | sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) 27 | 28 | # If extensions (or modules to document with autodoc) are in another 29 | # directory, add these directories to sys.path here. If the directory is 30 | # relative to the documentation root, use os.path.abspath to make it 31 | # absolute, like shown here. 32 | #sys.path.insert(0, os.path.abspath('.')) 33 | 34 | # Get the project root dir, which is the parent dir of this 35 | cwd = os.getcwd() 36 | project_root = os.path.dirname(cwd) 37 | 38 | # Insert the project root dir as the first element in the PYTHONPATH. 39 | # This lets us ensure that the source package is imported, and that its 40 | # version is used. 41 | sys.path.insert(0, project_root) 42 | 43 | import face_recognition 44 | 45 | # -- General configuration --------------------------------------------- 46 | 47 | # If your documentation needs a minimal Sphinx version, state it here. 48 | #needs_sphinx = '1.0' 49 | 50 | # Add any Sphinx extension module names here, as strings. They can be 51 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 52 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] 53 | 54 | # Add any paths that contain templates here, relative to this directory. 55 | templates_path = ['_templates'] 56 | 57 | # The suffix of source filenames. 58 | source_suffix = '.rst' 59 | 60 | # The encoding of source files. 61 | #source_encoding = 'utf-8-sig' 62 | 63 | # The master toctree document. 64 | master_doc = 'index' 65 | 66 | # General information about the project. 67 | project = u'Face Recognition' 68 | copyright = u"2017, Adam Geitgey" 69 | 70 | # The version info for the project you're documenting, acts as replacement 71 | # for |version| and |release|, also used in various other places throughout 72 | # the built documents. 73 | # 74 | # The short X.Y version. 75 | version = face_recognition.__version__ 76 | # The full version, including alpha/beta/rc tags. 77 | release = face_recognition.__version__ 78 | 79 | # The language for content autogenerated by Sphinx. Refer to documentation 80 | # for a list of supported languages. 81 | #language = None 82 | 83 | # There are two options for replacing |today|: either, you set today to 84 | # some non-false value, then it is used: 85 | #today = '' 86 | # Else, today_fmt is used as the format for a strftime call. 87 | #today_fmt = '%B %d, %Y' 88 | 89 | # List of patterns, relative to source directory, that match files and 90 | # directories to ignore when looking for source files. 91 | exclude_patterns = ['_build'] 92 | 93 | # The reST default role (used for this markup: `text`) to use for all 94 | # documents. 95 | #default_role = None 96 | 97 | # If true, '()' will be appended to :func: etc. cross-reference text. 98 | #add_function_parentheses = True 99 | 100 | # If true, the current module name will be prepended to all description 101 | # unit titles (such as .. function::). 102 | #add_module_names = True 103 | 104 | # If true, sectionauthor and moduleauthor directives will be shown in the 105 | # output. They are ignored by default. 106 | #show_authors = False 107 | 108 | # The name of the Pygments (syntax highlighting) style to use. 109 | pygments_style = 'sphinx' 110 | 111 | # A list of ignored prefixes for module index sorting. 112 | #modindex_common_prefix = [] 113 | 114 | # If true, keep warnings as "system message" paragraphs in the built 115 | # documents. 116 | #keep_warnings = False 117 | 118 | 119 | # -- Options for HTML output ------------------------------------------- 120 | 121 | # The theme to use for HTML and HTML Help pages. See the documentation for 122 | # a list of builtin themes. 123 | html_theme = 'default' 124 | 125 | # Theme options are theme-specific and customize the look and feel of a 126 | # theme further. For a list of options available for each theme, see the 127 | # documentation. 128 | #html_theme_options = {} 129 | 130 | # Add any paths that contain custom themes here, relative to this directory. 131 | #html_theme_path = [] 132 | 133 | # The name for this set of Sphinx documents. If None, it defaults to 134 | # " v documentation". 135 | #html_title = None 136 | 137 | # A shorter title for the navigation bar. Default is the same as 138 | # html_title. 139 | #html_short_title = None 140 | 141 | # The name of an image file (relative to this directory) to place at the 142 | # top of the sidebar. 143 | #html_logo = None 144 | 145 | # The name of an image file (within the static path) to use as favicon 146 | # of the docs. This file should be a Windows icon file (.ico) being 147 | # 16x16 or 32x32 pixels large. 148 | #html_favicon = None 149 | 150 | # Add any paths that contain custom static files (such as style sheets) 151 | # here, relative to this directory. They are copied after the builtin 152 | # static files, so a file named "default.css" will overwrite the builtin 153 | # "default.css". 154 | html_static_path = ['_static'] 155 | 156 | # If not '', a 'Last updated on:' timestamp is inserted at every page 157 | # bottom, using the given strftime format. 158 | #html_last_updated_fmt = '%b %d, %Y' 159 | 160 | # If true, SmartyPants will be used to convert quotes and dashes to 161 | # typographically correct entities. 162 | #html_use_smartypants = True 163 | 164 | # Custom sidebar templates, maps document names to template names. 165 | #html_sidebars = {} 166 | 167 | # Additional templates that should be rendered to pages, maps page names 168 | # to template names. 169 | #html_additional_pages = {} 170 | 171 | # If false, no module index is generated. 172 | #html_domain_indices = True 173 | 174 | # If false, no index is generated. 175 | #html_use_index = True 176 | 177 | # If true, the index is split into individual pages for each letter. 178 | #html_split_index = False 179 | 180 | # If true, links to the reST sources are added to the pages. 181 | #html_show_sourcelink = True 182 | 183 | # If true, "Created using Sphinx" is shown in the HTML footer. 184 | # Default is True. 185 | #html_show_sphinx = True 186 | 187 | # If true, "(C) Copyright ..." is shown in the HTML footer. 188 | # Default is True. 189 | #html_show_copyright = True 190 | 191 | # If true, an OpenSearch description file will be output, and all pages 192 | # will contain a tag referring to it. The value of this option 193 | # must be the base URL from which the finished HTML is served. 194 | #html_use_opensearch = '' 195 | 196 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 197 | #html_file_suffix = None 198 | 199 | # Output file base name for HTML help builder. 200 | htmlhelp_basename = 'face_recognitiondoc' 201 | 202 | 203 | # -- Options for LaTeX output ------------------------------------------ 204 | 205 | latex_elements = { 206 | # The paper size ('letterpaper' or 'a4paper'). 207 | #'papersize': 'letterpaper', 208 | 209 | # The font size ('10pt', '11pt' or '12pt'). 210 | #'pointsize': '10pt', 211 | 212 | # Additional stuff for the LaTeX preamble. 213 | #'preamble': '', 214 | } 215 | 216 | # Grouping the document tree into LaTeX files. List of tuples 217 | # (source start file, target name, title, author, documentclass 218 | # [howto/manual]). 219 | latex_documents = [ 220 | ('index', 'face_recognition.tex', 221 | u'Face Recognition Documentation', 222 | u'Adam Geitgey', 'manual'), 223 | ] 224 | 225 | # The name of an image file (relative to this directory) to place at 226 | # the top of the title page. 227 | #latex_logo = None 228 | 229 | # For "manual" documents, if this is true, then toplevel headings 230 | # are parts, not chapters. 231 | #latex_use_parts = False 232 | 233 | # If true, show page references after internal links. 234 | #latex_show_pagerefs = False 235 | 236 | # If true, show URL addresses after external links. 237 | #latex_show_urls = False 238 | 239 | # Documents to append as an appendix to all manuals. 240 | #latex_appendices = [] 241 | 242 | # If false, no module index is generated. 243 | #latex_domain_indices = True 244 | 245 | 246 | # -- Options for manual page output ------------------------------------ 247 | 248 | # One entry per manual page. List of tuples 249 | # (source start file, name, description, authors, manual section). 250 | man_pages = [ 251 | ('index', 'face_recognition', 252 | u'Face Recognition Documentation', 253 | [u'Adam Geitgey'], 1) 254 | ] 255 | 256 | # If true, show URL addresses after external links. 257 | #man_show_urls = False 258 | 259 | 260 | # -- Options for Texinfo output ---------------------------------------- 261 | 262 | # Grouping the document tree into Texinfo files. List of tuples 263 | # (source start file, target name, title, author, 264 | # dir menu entry, description, category) 265 | texinfo_documents = [ 266 | ('index', 'face_recognition', 267 | u'Face Recognition Documentation', 268 | u'Adam Geitgey', 269 | 'face_recognition', 270 | 'One line description of project.', 271 | 'Miscellaneous'), 272 | ] 273 | 274 | # Documents to append as an appendix to all manuals. 275 | #texinfo_appendices = [] 276 | 277 | # If false, no module index is generated. 278 | #texinfo_domain_indices = True 279 | 280 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 281 | #texinfo_show_urls = 'footnote' 282 | 283 | # If true, do not generate a @detailmenu in the "Top" node's menu. 284 | #texinfo_no_detailmenu = False 285 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /docs/face_recognition.rst: -------------------------------------------------------------------------------- 1 | face_recognition package 2 | ======================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: face_recognition.api 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to Face Recognition's documentation! 2 | ====================================== 3 | 4 | Contents: 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | readme 10 | installation 11 | usage 12 | modules 13 | contributing 14 | authors 15 | history 16 | 17 | Indices and tables 18 | ================== 19 | 20 | * :ref:`genindex` 21 | * :ref:`modindex` 22 | * :ref:`search` 23 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Installation 5 | ============ 6 | 7 | 8 | Stable release 9 | -------------- 10 | 11 | To install Face Recognition, run this command in your terminal: 12 | 13 | .. code-block:: console 14 | 15 | $ pip3 install face_recognition 16 | 17 | This is the preferred method to install Face Recognition, as it will always install the most recent stable release. 18 | 19 | If you don't have `pip`_ installed, this `Python installation guide`_ can guide 20 | you through the process. 21 | 22 | .. _pip: https://pip.pypa.io 23 | .. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ 24 | 25 | 26 | From sources 27 | ------------ 28 | 29 | The sources for Face Recognition can be downloaded from the `Github repo`_. 30 | 31 | You can either clone the public repository: 32 | 33 | .. code-block:: console 34 | 35 | $ git clone git://github.com/ageitgey/face_recognition 36 | 37 | Or download the `tarball`_: 38 | 39 | .. code-block:: console 40 | 41 | $ curl -OL https://github.com/ageitgey/face_recognition/tarball/master 42 | 43 | Once you have a copy of the source, you can install it with: 44 | 45 | .. code-block:: console 46 | 47 | $ python setup.py install 48 | 49 | 50 | .. _Github repo: https://github.com/ageitgey/face_recognition 51 | .. _tarball: https://github.com/ageitgey/face_recognition/tarball/master 52 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\face_recognition.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\face_recognition.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /docs/modules.rst: -------------------------------------------------------------------------------- 1 | face_recognition 2 | ================ 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | face_recognition 8 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | -------------------------------------------------------------------------------- /docs/usage.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Usage 3 | ===== 4 | 5 | To use Face Recognition in a project:: 6 | 7 | import face_recognition 8 | 9 | See the examples in the /examples folder on github for how to use each function. 10 | 11 | You can also check the API docs for the 'face_recognition' module to see the possible parameters for each function. 12 | 13 | The basic idea is that first you load an image:: 14 | 15 | import face_recognition 16 | 17 | image = face_recognition.load_image_file("your_file.jpg") 18 | 19 | That loads the image into a numpy array. If you already have an image in a numpy array, you can skip this step. 20 | 21 | Then you can perform operations on the image, like finding faces, identifying facial features or finding face encodings:: 22 | 23 | # Find all the faces in the image 24 | face_locations = face_recognition.face_locations(image) 25 | 26 | # Or maybe find the facial features in the image 27 | face_landmarks_list = face_recognition.face_landmarks(image) 28 | 29 | # Or you could get face encodings for each face in the image: 30 | list_of_face_encodings = face_recognition.face_encodings(image) 31 | 32 | Face encodings can be compared against each other to see if the faces are a match. Note: Finding the encoding for a face 33 | is a bit slow, so you might want to save the results for each image in a database or cache if you need to refer back to 34 | it later. 35 | 36 | But once you have the encodings for faces, you can compare them like this:: 37 | 38 | # results is an array of True/False telling if the unknown face matched anyone in the known_faces array 39 | results = face_recognition.compare_faces(known_face_encodings, a_single_unknown_face_encoding) 40 | 41 | It's that simple! Check out the examples for more details. 42 | -------------------------------------------------------------------------------- /face_recognition/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | __author__ = """Adam Geitgey""" 4 | __email__ = 'ageitgey@gmail.com' 5 | __version__ = '1.2.3' 6 | 7 | from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance 8 | -------------------------------------------------------------------------------- /face_recognition/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/face_recognition/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /face_recognition/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/face_recognition/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /face_recognition/__pycache__/api.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/face_recognition/__pycache__/api.cpython-34.pyc -------------------------------------------------------------------------------- /face_recognition/__pycache__/api.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/face_recognition/__pycache__/api.cpython-37.pyc -------------------------------------------------------------------------------- /face_recognition/face_detection_cli.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import print_function 3 | import click 4 | import os 5 | import re 6 | import face_recognition.api as face_recognition 7 | import multiprocessing 8 | import sys 9 | import itertools 10 | 11 | 12 | def print_result(filename, location): 13 | top, right, bottom, left = location 14 | print("{},{},{},{},{}".format(filename, top, right, bottom, left)) 15 | 16 | 17 | def test_image(image_to_check, model): 18 | unknown_image = face_recognition.load_image_file(image_to_check) 19 | face_locations = face_recognition.face_locations(unknown_image, number_of_times_to_upsample=0, model=model) 20 | 21 | for face_location in face_locations: 22 | print_result(image_to_check, face_location) 23 | 24 | 25 | def image_files_in_folder(folder): 26 | return [os.path.join(folder, f) for f in os.listdir(folder) if re.match(r'.*\.(jpg|jpeg|png)', f, flags=re.I)] 27 | 28 | 29 | def process_images_in_process_pool(images_to_check, number_of_cpus, model): 30 | if number_of_cpus == -1: 31 | processes = None 32 | else: 33 | processes = number_of_cpus 34 | 35 | # macOS will crash due to a bug in libdispatch if you don't use 'forkserver' 36 | context = multiprocessing 37 | if "forkserver" in multiprocessing.get_all_start_methods(): 38 | context = multiprocessing.get_context("forkserver") 39 | 40 | pool = context.Pool(processes=processes) 41 | 42 | function_parameters = zip( 43 | images_to_check, 44 | itertools.repeat(model), 45 | ) 46 | 47 | pool.starmap(test_image, function_parameters) 48 | 49 | 50 | @click.command() 51 | @click.argument('image_to_check') 52 | @click.option('--cpus', default=1, help='number of CPU cores to use in parallel. -1 means "use all in system"') 53 | @click.option('--model', default="hog", help='Which face detection model to use. Options are "hog" or "cnn".') 54 | def main(image_to_check, cpus, model): 55 | # Multi-core processing only supported on Python 3.4 or greater 56 | if (sys.version_info < (3, 4)) and cpus != 1: 57 | click.echo("WARNING: Multi-processing support requires Python 3.4 or greater. Falling back to single-threaded processing!") 58 | cpus = 1 59 | 60 | if os.path.isdir(image_to_check): 61 | if cpus == 1: 62 | [test_image(image_file, model) for image_file in image_files_in_folder(image_to_check)] 63 | else: 64 | process_images_in_process_pool(image_files_in_folder(image_to_check), cpus, model) 65 | else: 66 | test_image(image_to_check, model) 67 | 68 | 69 | if __name__ == "__main__": 70 | main() 71 | -------------------------------------------------------------------------------- /face_recognition/face_recognition_cli.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import print_function 3 | import click 4 | import os 5 | import re 6 | import face_recognition.api as face_recognition 7 | import multiprocessing 8 | import itertools 9 | import sys 10 | import PIL.Image 11 | import numpy as np 12 | 13 | 14 | def scan_known_people(known_people_folder): 15 | known_names = [] 16 | known_face_encodings = [] 17 | 18 | for file in image_files_in_folder(known_people_folder): 19 | basename = os.path.splitext(os.path.basename(file))[0] 20 | img = face_recognition.load_image_file(file) 21 | encodings = face_recognition.face_encodings(img) 22 | 23 | if len(encodings) > 1: 24 | click.echo("WARNING: More than one face found in {}. Only considering the first face.".format(file)) 25 | 26 | if len(encodings) == 0: 27 | click.echo("WARNING: No faces found in {}. Ignoring file.".format(file)) 28 | else: 29 | known_names.append(basename) 30 | known_face_encodings.append(encodings[0]) 31 | 32 | return known_names, known_face_encodings 33 | 34 | 35 | def print_result(filename, name, distance, show_distance=False): 36 | if show_distance: 37 | print("{},{},{}".format(filename, name, distance)) 38 | else: 39 | print("{},{}".format(filename, name)) 40 | 41 | 42 | def test_image(image_to_check, known_names, known_face_encodings, tolerance=0.6, show_distance=False): 43 | unknown_image = face_recognition.load_image_file(image_to_check) 44 | 45 | # Scale down image if it's giant so things run a little faster 46 | if max(unknown_image.shape) > 1600: 47 | pil_img = PIL.Image.fromarray(unknown_image) 48 | pil_img.thumbnail((1600, 1600), PIL.Image.LANCZOS) 49 | unknown_image = np.array(pil_img) 50 | 51 | unknown_encodings = face_recognition.face_encodings(unknown_image) 52 | 53 | for unknown_encoding in unknown_encodings: 54 | distances = face_recognition.face_distance(known_face_encodings, unknown_encoding) 55 | result = list(distances <= tolerance) 56 | 57 | if True in result: 58 | [print_result(image_to_check, name, distance, show_distance) for is_match, name, distance in zip(result, known_names, distances) if is_match] 59 | else: 60 | print_result(image_to_check, "unknown_person", None, show_distance) 61 | 62 | if not unknown_encodings: 63 | # print out fact that no faces were found in image 64 | print_result(image_to_check, "no_persons_found", None, show_distance) 65 | 66 | 67 | def image_files_in_folder(folder): 68 | return [os.path.join(folder, f) for f in os.listdir(folder) if re.match(r'.*\.(jpg|jpeg|png)', f, flags=re.I)] 69 | 70 | 71 | def process_images_in_process_pool(images_to_check, known_names, known_face_encodings, number_of_cpus, tolerance, show_distance): 72 | if number_of_cpus == -1: 73 | processes = None 74 | else: 75 | processes = number_of_cpus 76 | 77 | # macOS will crash due to a bug in libdispatch if you don't use 'forkserver' 78 | context = multiprocessing 79 | if "forkserver" in multiprocessing.get_all_start_methods(): 80 | context = multiprocessing.get_context("forkserver") 81 | 82 | pool = context.Pool(processes=processes) 83 | 84 | function_parameters = zip( 85 | images_to_check, 86 | itertools.repeat(known_names), 87 | itertools.repeat(known_face_encodings), 88 | itertools.repeat(tolerance), 89 | itertools.repeat(show_distance) 90 | ) 91 | 92 | pool.starmap(test_image, function_parameters) 93 | 94 | 95 | @click.command() 96 | @click.argument('known_people_folder') 97 | @click.argument('image_to_check') 98 | @click.option('--cpus', default=1, help='number of CPU cores to use in parallel (can speed up processing lots of images). -1 means "use all in system"') 99 | @click.option('--tolerance', default=0.6, help='Tolerance for face comparisons. Default is 0.6. Lower this if you get multiple matches for the same person.') 100 | @click.option('--show-distance', default=False, type=bool, help='Output face distance. Useful for tweaking tolerance setting.') 101 | def main(known_people_folder, image_to_check, cpus, tolerance, show_distance): 102 | known_names, known_face_encodings = scan_known_people(known_people_folder) 103 | 104 | # Multi-core processing only supported on Python 3.4 or greater 105 | if (sys.version_info < (3, 4)) and cpus != 1: 106 | click.echo("WARNING: Multi-processing support requires Python 3.4 or greater. Falling back to single-threaded processing!") 107 | cpus = 1 108 | 109 | if os.path.isdir(image_to_check): 110 | if cpus == 1: 111 | [test_image(image_file, known_names, known_face_encodings, tolerance, show_distance) for image_file in image_files_in_folder(image_to_check)] 112 | else: 113 | process_images_in_process_pool(image_files_in_folder(image_to_check), known_names, known_face_encodings, cpus, tolerance, show_distance) 114 | else: 115 | test_image(image_to_check, known_names, known_face_encodings, tolerance, show_distance) 116 | 117 | 118 | if __name__ == "__main__": 119 | main() 120 | -------------------------------------------------------------------------------- /main/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__init__.py -------------------------------------------------------------------------------- /main/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/admin.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/admin.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/apps.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/apps.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/models.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/models.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/serializers.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/serializers.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/serializers.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/serializers.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/urls.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/urls.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /main/__pycache__/views.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/views.cpython-34.pyc -------------------------------------------------------------------------------- /main/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /main/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /main/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MainConfig(AppConfig): 5 | name = 'main' 6 | -------------------------------------------------------------------------------- /main/images/alex-lacamoire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/alex-lacamoire.png -------------------------------------------------------------------------------- /main/images/biden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/biden.jpg -------------------------------------------------------------------------------- /main/images/lin-manuel-miranda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/lin-manuel-miranda.png -------------------------------------------------------------------------------- /main/images/moswa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/moswa.png -------------------------------------------------------------------------------- /main/images/obama-1080p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama-1080p.jpg -------------------------------------------------------------------------------- /main/images/obama-240p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama-240p.jpg -------------------------------------------------------------------------------- /main/images/obama-480p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama-480p.jpg -------------------------------------------------------------------------------- /main/images/obama-720p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama-720p.jpg -------------------------------------------------------------------------------- /main/images/obama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama.jpg -------------------------------------------------------------------------------- /main/images/obama2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama2.jpg -------------------------------------------------------------------------------- /main/images/obama_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/obama_small.jpg -------------------------------------------------------------------------------- /main/images/two_people.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/two_people.jpg -------------------------------------------------------------------------------- /main/images/web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/images/web.jpg -------------------------------------------------------------------------------- /main/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-04-22 13:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='User', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('first_name', models.CharField(max_length=255)), 19 | ('last_name', models.CharField(max_length=255)), 20 | ('police_id', models.CharField(max_length=255)), 21 | ('password', models.CharField(max_length=255)), 22 | ('created_at', models.DateTimeField(auto_now_add=True)), 23 | ('updated_at', models.DateTimeField(auto_now=True)), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /main/migrations/0002_auto_20190513_0501.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-13 05:01 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('main', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Person', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255)), 18 | ('user_id', models.CharField(max_length=255)), 19 | ('address', models.CharField(max_length=255)), 20 | ('picture', models.CharField(max_length=255)), 21 | ('created_at', models.DateTimeField(auto_now_add=True)), 22 | ('updated_at', models.DateTimeField(auto_now=True)), 23 | ], 24 | ), 25 | migrations.RemoveField( 26 | model_name='user', 27 | name='police_id', 28 | ), 29 | migrations.AddField( 30 | model_name='user', 31 | name='email', 32 | field=models.CharField(default=None, max_length=255), 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /main/migrations/0003_file.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-13 06:18 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('main', '0002_auto_20190513_0501'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='File', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('file', models.FileField(upload_to='')), 18 | ('remark', models.CharField(max_length=20)), 19 | ('timestamp', models.DateTimeField(auto_now_add=True)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /main/migrations/0004_auto_20190514_2053.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-14 20:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('main', '0003_file'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='ThiefLocation', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('name', models.CharField(max_length=255)), 18 | ('national_id', models.CharField(max_length=255)), 19 | ('address', models.CharField(max_length=255)), 20 | ('picture', models.CharField(max_length=255)), 21 | ('status', models.CharField(max_length=255)), 22 | ('latitude', models.CharField(max_length=255)), 23 | ('longitude', models.CharField(max_length=255)), 24 | ('created_at', models.DateTimeField(auto_now_add=True)), 25 | ('updated_at', models.DateTimeField(auto_now=True)), 26 | ], 27 | ), 28 | migrations.RenameField( 29 | model_name='person', 30 | old_name='user_id', 31 | new_name='status', 32 | ), 33 | migrations.AddField( 34 | model_name='person', 35 | name='national_id', 36 | field=models.CharField(default=None, max_length=255), 37 | ), 38 | ] 39 | -------------------------------------------------------------------------------- /main/migrations/0005_auto_20190515_0512.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-15 05:12 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('main', '0004_auto_20190514_2053'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='ThiefLocation', 15 | new_name='Location', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /main/migrations/0006_auto_20190515_0529.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.13 on 2019-05-15 05:29 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('main', '0005_auto_20190515_0512'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='Location', 15 | new_name='ThiefLocation', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /main/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__init__.py -------------------------------------------------------------------------------- /main/migrations/__pycache__/0001_initial.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0001_initial.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0002_auto_20190513_0501.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0002_auto_20190513_0501.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0002_auto_20190513_0501.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0002_auto_20190513_0501.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0003_file.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0003_file.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0003_file.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0003_file.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0004_auto_20190514_2053.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0004_auto_20190514_2053.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0004_auto_20190514_2053.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0004_auto_20190514_2053.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0005_auto_20190515_0512.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0005_auto_20190515_0512.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0005_auto_20190515_0512.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0005_auto_20190515_0512.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0006_auto_20190515_0529.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0006_auto_20190515_0529.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/0006_auto_20190515_0529.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/0006_auto_20190515_0529.cpython-37.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /main/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /main/models.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | from django.db import models 3 | 4 | class UserManager(models.Manager): 5 | def validator(self, postData): 6 | errors = {} 7 | if (postData['first_name'].isalpha()) == False: 8 | if len(postData['first_name']) < 2: 9 | errors['first_name'] = "First name can not be shorter than 2 characters" 10 | 11 | if (postData['last_name'].isalpha()) == False: 12 | if len(postData['last_name']) < 2: 13 | errors['last_name'] = "Last name can not be shorter than 2 characters" 14 | 15 | if len(postData['email']) == 0: 16 | errors['email'] = "You must enter an email" 17 | 18 | if len(postData['password']) < 8: 19 | errors['password'] = "Password is too short!" 20 | 21 | return errors 22 | 23 | class User(models.Model): 24 | first_name = models.CharField(max_length=255) 25 | last_name = models.CharField(max_length=255) 26 | email = models.CharField(max_length=255,default=None) 27 | password = models.CharField(max_length=255) 28 | created_at = models.DateTimeField(auto_now_add = True) 29 | updated_at = models.DateTimeField(auto_now = True) 30 | objects = UserManager() 31 | 32 | class ThiefLocation(models.Model): 33 | name = models.CharField(max_length=255) 34 | national_id = models.CharField(max_length=255) 35 | address = models.CharField(max_length=255) 36 | picture = models.CharField(max_length=255) 37 | status = models.CharField(max_length=255) 38 | latitude = models.CharField(max_length=255) 39 | longitude = models.CharField(max_length=255) 40 | created_at = models.DateTimeField(auto_now_add=True) 41 | updated_at = models.DateTimeField(auto_now=True) 42 | 43 | class Person(models.Model): 44 | name = models.CharField(max_length=255) 45 | national_id = models.CharField(max_length=255,default=None) 46 | address = models.CharField(max_length=255) 47 | picture = models.CharField(max_length=255) 48 | status = models.CharField(max_length=255) 49 | created_at = models.DateTimeField(auto_now_add=True) 50 | updated_at = models.DateTimeField(auto_now=True) 51 | 52 | class File(models.Model): 53 | file = models.FileField(blank=False, null=False) 54 | remark = models.CharField(max_length=20) 55 | timestamp = models.DateTimeField(auto_now_add=True) -------------------------------------------------------------------------------- /main/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from .models import File 3 | 4 | 5 | class FileSerializer(serializers.ModelSerializer): 6 | class Meta(): 7 | model = File 8 | fields = ('file', 'remark', 'timestamp') 9 | 10 | # model = Person 11 | # fields = ('name', 'user_id', 'address', 'picture') -------------------------------------------------------------------------------- /main/static/assets/css/default-css.css: -------------------------------------------------------------------------------- 1 | /* 2 | -------------------------- 3 | - 1.1 Default CSS 4 | -------------------------- 5 | */ 6 | 7 | /*google font*/ 8 | 9 | @import url('https://fonts.googleapis.com/css?family=Lato:300,400,700,900|Poppins:100,300,400,500,600,700,800,900'); 10 | /* Your default CSS. */ 11 | 12 | * { 13 | margin: 0; 14 | padding: 0; 15 | box-sizing: border-box; 16 | } 17 | 18 | *, *:before, *:after { 19 | -moz-box-sizing: border-box; 20 | -webkit-box-sizing: border-box; 21 | box-sizing: border-box; 22 | } 23 | 24 | *:focus { 25 | outline: 0; 26 | } 27 | 28 | html { 29 | -webkit-font-smoothing: antialiased; 30 | } 31 | 32 | body { 33 | background: #fff; 34 | font-weight: normal; 35 | -webkit-font-smoothing: antialiased; 36 | /* Fix for webkit rendering */ 37 | -webkit-text-size-adjust: 100%; 38 | } 39 | 40 | img { 41 | max-width: 100%; 42 | height: auto; 43 | } 44 | 45 | /*custome css*/ 46 | 47 | /*-------------------------- 48 | Padding top 49 | ---------------------------*/ 50 | 51 | .pt--0 { 52 | padding-top: 0 53 | } 54 | 55 | .pt--10 { 56 | padding-top: 10px 57 | } 58 | 59 | .pt--15 { 60 | padding-top: 15px 61 | } 62 | 63 | .pt--20 { 64 | padding-top: 20px 65 | } 66 | 67 | .pt--30 { 68 | padding-top: 30px 69 | } 70 | 71 | .pt--40 { 72 | padding-top: 40px 73 | } 74 | 75 | .pt--50 { 76 | padding-top: 50px 77 | } 78 | 79 | .pt--60 { 80 | padding-top: 60px 81 | } 82 | 83 | .pt--70 { 84 | padding-top: 70px 85 | } 86 | 87 | .pt--80 { 88 | padding-top: 80px 89 | } 90 | 91 | .pt--90 { 92 | padding-top: 90px 93 | } 94 | 95 | .pt--100 { 96 | padding-top: 100px 97 | } 98 | 99 | .pt--110 { 100 | padding-top: 110px 101 | } 102 | 103 | .pt--120 { 104 | padding-top: 120px 105 | } 106 | 107 | .pt--130 { 108 | padding-top: 130px 109 | } 110 | 111 | .pt--140 { 112 | padding-top: 140px 113 | } 114 | 115 | .pt--150 { 116 | padding-top: 150px 117 | } 118 | 119 | .pt--160 { 120 | padding-top: 160px 121 | } 122 | 123 | .pt--170 { 124 | padding-top: 170px 125 | } 126 | 127 | .pt--180 { 128 | padding-top: 180px 129 | } 130 | 131 | .pt--190 { 132 | padding-top: 190px 133 | } 134 | 135 | /*------------------------ 136 | Padding bottom 137 | ---------------------------*/ 138 | 139 | .pb--0 { 140 | padding-bottom: 0 141 | } 142 | 143 | .pb--10 { 144 | padding-bottom: 10px 145 | } 146 | 147 | .pb--15 { 148 | padding-bottom: 15px 149 | } 150 | 151 | .pb--20 { 152 | padding-bottom: 20px 153 | } 154 | 155 | .pb--30 { 156 | padding-bottom: 30px 157 | } 158 | 159 | .pb--40 { 160 | padding-bottom: 40px 161 | } 162 | 163 | .pb--50 { 164 | padding-bottom: 50px 165 | } 166 | 167 | .pb--60 { 168 | padding-bottom: 60px 169 | } 170 | 171 | .pb--70 { 172 | padding-bottom: 70px 173 | } 174 | 175 | .pb--80 { 176 | padding-bottom: 80px 177 | } 178 | 179 | .pb--90 { 180 | padding-bottom: 90px 181 | } 182 | 183 | .pb--100 { 184 | padding-bottom: 100px 185 | } 186 | 187 | .pb--110 { 188 | padding-bottom: 110px 189 | } 190 | 191 | .pb--120 { 192 | padding-bottom: 120px 193 | } 194 | 195 | .pb--130 { 196 | padding-bottom: 130px 197 | } 198 | 199 | .pb--140 { 200 | padding-bottom: 140px 201 | } 202 | 203 | .pb--150 { 204 | padding-bottom: 150px 205 | } 206 | 207 | .pb--160 { 208 | padding-bottom: 160px 209 | } 210 | 211 | .pb--170 { 212 | padding-bottom: 170px 213 | } 214 | 215 | .pb--180 { 216 | padding-bottom: 180px 217 | } 218 | 219 | .pb--190 { 220 | padding-bottom: 190px 221 | } 222 | 223 | /*------------------------------ 224 | Page section padding 225 | -------------------------------*/ 226 | 227 | .ptb--0 { 228 | padding: 0 229 | } 230 | 231 | .ptb--10 { 232 | padding: 10px 0 233 | } 234 | 235 | .ptb--20 { 236 | padding: 20px 0 237 | } 238 | 239 | .ptb--30 { 240 | padding: 30px 0 241 | } 242 | 243 | .ptb--40 { 244 | padding: 40px 0 245 | } 246 | 247 | .ptb--50 { 248 | padding: 50px 0 249 | } 250 | 251 | .ptb--60 { 252 | padding: 60px 0 253 | } 254 | 255 | .ptb--70 { 256 | padding: 70px 0 257 | } 258 | 259 | .ptb--80 { 260 | padding: 80px 0 261 | } 262 | 263 | .ptb--90 { 264 | padding: 90px 0 265 | } 266 | 267 | .ptb--100 { 268 | padding: 100px 0 269 | } 270 | 271 | .ptb--110 { 272 | padding: 110px 0 273 | } 274 | 275 | .ptb--120 { 276 | padding: 120px 0 277 | } 278 | 279 | .ptb--130 { 280 | padding: 130px 0 281 | } 282 | 283 | .ptb--140 { 284 | padding: 140px 0 285 | } 286 | 287 | .ptb--150 { 288 | padding: 150px 0 289 | } 290 | 291 | .ptb--160 { 292 | padding: 160px 0 293 | } 294 | 295 | .ptb--170 { 296 | padding: 170px 0 297 | } 298 | 299 | .ptb--180 { 300 | padding: 180px 0 301 | } 302 | 303 | /*------------------------------ 304 | Page section padding left 305 | -------------------------------*/ 306 | 307 | .pl--0 { 308 | padding-left: 0px; 309 | } 310 | 311 | .pl--10 { 312 | padding-left: 10px; 313 | } 314 | 315 | .pl--20 { 316 | padding-left: 20px; 317 | } 318 | 319 | .pl--30 { 320 | padding-left: 30px; 321 | } 322 | 323 | .pl--40 { 324 | padding-left: 40px; 325 | } 326 | 327 | .pl--50 { 328 | padding-left: 50px; 329 | } 330 | 331 | .pl--60 { 332 | padding-left: 60px; 333 | } 334 | 335 | .pl--70 { 336 | padding-left: 70px; 337 | } 338 | 339 | .pl--80 { 340 | padding-left: 80px; 341 | } 342 | 343 | .pl--90 { 344 | padding-left: 90px; 345 | } 346 | 347 | .pl--100 { 348 | padding-left: 100px; 349 | } 350 | 351 | .pl--110 { 352 | padding-left: 110px; 353 | } 354 | 355 | /*------------------------------ 356 | Page section padding right 357 | -------------------------------*/ 358 | 359 | .pr--0 { 360 | padding-right: 0px; 361 | } 362 | 363 | .pr--10 { 364 | padding-right: 10px; 365 | } 366 | 367 | .pr--20 { 368 | padding-right: 20px; 369 | } 370 | 371 | .pr--30 { 372 | padding-right: 30px; 373 | } 374 | 375 | .pr--40 { 376 | padding-right: 40px; 377 | } 378 | 379 | .pr--50 { 380 | padding-right: 50px; 381 | } 382 | 383 | .pr--60 { 384 | padding-right: 60px; 385 | } 386 | 387 | .pr--70 { 388 | padding-right: 70px; 389 | } 390 | 391 | .pr--80 { 392 | padding-right: 80px; 393 | } 394 | 395 | .pr--90 { 396 | padding-right: 90px; 397 | } 398 | 399 | .pr--100 { 400 | padding-right: 100px; 401 | } 402 | 403 | .pr--110 { 404 | padding-right: 110px; 405 | } 406 | 407 | /* Colors */ 408 | 409 | :root { 410 | --primary-color: #4336FB; 411 | } 412 | 413 | #preloader { 414 | position: fixed; 415 | left: 0; 416 | top: 0; 417 | z-index: 99999; 418 | height: 100%; 419 | width: 100%; 420 | background: #fff; 421 | display: flex; 422 | } 423 | .loader{ 424 | margin: auto; 425 | height: 50px; 426 | width: 50px; 427 | border-radius: 50%; 428 | position: relative; 429 | } 430 | .loader:before{ 431 | content: ''; 432 | position: absolute; 433 | left: 0; 434 | top: 0; 435 | height: 100%; 436 | width: 100%; 437 | background: #000; 438 | border-radius: 50%; 439 | opacity: 0; 440 | animation: popin 1.5s linear infinite 0s; 441 | } 442 | .loader:after{ 443 | content: ''; 444 | position: absolute; 445 | left: 0; 446 | top: 0; 447 | height: 100%; 448 | width: 100%; 449 | background: #000; 450 | border-radius: 50%; 451 | opacity: 0; 452 | animation: popin 1.5s linear infinite 0.5s; 453 | } 454 | 455 | @keyframes popin{ 456 | 0%{ 457 | opacity: 0; 458 | transform: scale(0); 459 | } 460 | 1%{ 461 | opacity: 0.1; 462 | transform: scale(0); 463 | } 464 | 99%{ 465 | opacity: 0; 466 | transform: scale(2); 467 | } 468 | 100%{ 469 | opacity: 0; 470 | transform: scale(0); 471 | } 472 | } -------------------------------------------------------------------------------- /main/static/assets/css/metisMenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * metismenu - v2.7.8 3 | * A jQuery menu plugin 4 | * https://github.com/onokumus/metismenu#readme 5 | * 6 | * Made by Osman Nuri Okumus (https://github.com/onokumus) 7 | * Under MIT License 8 | */ 9 | .metismenu .arrow { 10 | float: right; 11 | line-height: 1.42857; 12 | } 13 | *[dir="rtl"] .metismenu .arrow { 14 | float: left; 15 | } 16 | 17 | /* 18 | * Require Bootstrap 3.x 19 | * https://github.com/twbs/bootstrap 20 | */ 21 | 22 | .metismenu .glyphicon.arrow:before { 23 | content: "\e079"; 24 | } 25 | .metismenu .active > a > .glyphicon.arrow:before { 26 | content: "\e114"; 27 | } 28 | 29 | /* 30 | * Require Font-Awesome 31 | * http://fortawesome.github.io/Font-Awesome/ 32 | */ 33 | 34 | .metismenu .fa.arrow:before { 35 | content: "\f104"; 36 | } 37 | .metismenu .active > a > .fa.arrow:before { 38 | content: "\f107"; 39 | } 40 | 41 | /* 42 | * Require Ionicons 43 | * http://ionicons.com/ 44 | */ 45 | 46 | .metismenu .ion.arrow:before { 47 | content: "\f3d2" 48 | } 49 | .metismenu .active > a > .ion.arrow:before { 50 | content: "\f3d0"; 51 | } 52 | .metismenu .plus-times { 53 | float: right; 54 | } 55 | *[dir="rtl"] .metismenu .plus-times { 56 | float: left; 57 | } 58 | .metismenu .fa.plus-times:before { 59 | content: "\f067"; 60 | } 61 | .metismenu .active > a > .fa.plus-times { 62 | -webkit-transform: rotate(45deg); 63 | transform: rotate(45deg); 64 | } 65 | .metismenu .plus-minus { 66 | float: right; 67 | } 68 | *[dir="rtl"] .metismenu .plus-minus { 69 | float: left; 70 | } 71 | .metismenu .fa.plus-minus:before { 72 | content: "\f067"; 73 | } 74 | .metismenu .active > a > .fa.plus-minus:before { 75 | content: "\f068"; 76 | } 77 | .metismenu .collapse { 78 | display: none; 79 | } 80 | .metismenu .collapse.in { 81 | display: block; 82 | } 83 | .metismenu .collapsing { 84 | position: relative; 85 | height: 0; 86 | overflow: hidden; 87 | transition-timing-function: ease; 88 | transition-duration: .35s; 89 | transition-property: height, visibility; 90 | } 91 | 92 | .metismenu .has-arrow { 93 | position: relative; 94 | } 95 | 96 | .metismenu .has-arrow::after { 97 | position: absolute; 98 | content: ''; 99 | width: .5em; 100 | height: .5em; 101 | border-width: 1px 0 0 1px; 102 | border-style: solid; 103 | border-color: initial; 104 | right: 1em; 105 | -webkit-transform: rotate(-45deg) translate(0, -50%); 106 | transform: rotate(-45deg) translate(0, -50%); 107 | -webkit-transform-origin: top; 108 | transform-origin: top; 109 | top: 50%; 110 | transition: all .3s ease-out; 111 | } 112 | 113 | *[dir="rtl"] .metismenu .has-arrow::after { 114 | right: auto; 115 | left: 1em; 116 | -webkit-transform: rotate(135deg) translate(0, -50%); 117 | transform: rotate(135deg) translate(0, -50%); 118 | } 119 | 120 | .metismenu .active > .has-arrow::after, 121 | .metismenu .has-arrow[aria-expanded="true"]::after { 122 | -webkit-transform: rotate(-135deg) translate(0, -50%); 123 | transform: rotate(-135deg) translate(0, -50%); 124 | } 125 | 126 | *[dir="rtl"] .metismenu .active > .has-arrow::after, 127 | *[dir="rtl"] .metismenu .has-arrow[aria-expanded="true"]::after { 128 | -webkit-transform: rotate(225deg) translate(0, -50%); 129 | transform: rotate(225deg) translate(0, -50%); 130 | } 131 | 132 | /*# sourceMappingURL=metisMenu.css.map */ -------------------------------------------------------------------------------- /main/static/assets/css/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.2.1 3 | * Copyright 2013-2017 David Deutsch 4 | * Licensed under () 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /main/static/assets/css/slicknav.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * SlickNav Responsive Mobile Menu v1.0.10 3 | * (c) 2016 Josh Cope 4 | * licensed under MIT 5 | */.slicknav_btn,.slicknav_nav .slicknav_item{cursor:pointer}.slicknav_menu,.slicknav_menu *{box-sizing:border-box}.slicknav_btn{position:relative;display:block;vertical-align:middle;float:right;padding:.438em .625em;line-height:1.125em}.slicknav_btn .slicknav_icon-bar+.slicknav_icon-bar{margin-top:.188em}.slicknav_menu .slicknav_menutxt{display:block;line-height:1.188em;float:left;color:#fff;font-weight:700;text-shadow:0 1px 3px #000}.slicknav_menu .slicknav_icon{float:left;width:1.125em;height:.875em;margin:.188em 0 0 .438em}.slicknav_menu .slicknav_icon:before{background:0 0;width:1.125em;height:.875em;display:block;content:"";position:absolute}.slicknav_menu .slicknav_no-text{margin:0}.slicknav_menu .slicknav_icon-bar{display:block;width:1.125em;height:.125em;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.slicknav_menu:after,.slicknav_menu:before{content:" ";display:table}.slicknav_menu:after{clear:both}.slicknav_nav li,.slicknav_nav ul{display:block}.slicknav_nav .slicknav_arrow{font-size:.8em;margin:0 0 0 .4em}.slicknav_nav .slicknav_item a{display:inline}.slicknav_nav .slicknav_row,.slicknav_nav a{display:block}.slicknav_nav .slicknav_parent-link a{display:inline}.slicknav_menu{*zoom:1;font-size:16px;background:#4c4c4c;padding:5px}.slicknav_nav,.slicknav_nav ul{list-style:none;overflow:hidden;padding:0}.slicknav_menu .slicknav_icon-bar{background-color:#fff}.slicknav_btn{margin:5px 5px 6px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,.75);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#222}.slicknav_nav{clear:both;color:#fff;margin:0;font-size:.875em}.slicknav_nav ul{margin:0 0 0 20px}.slicknav_nav .slicknav_row,.slicknav_nav a{padding:5px 10px;margin:2px 5px}.slicknav_nav .slicknav_row:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#fff}.slicknav_nav a{text-decoration:none;color:#fff}.slicknav_nav a:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#222}.slicknav_nav .slicknav_txtnode{margin-left:15px}.slicknav_nav .slicknav_item a,.slicknav_nav .slicknav_parent-link a{padding:0;margin:0}.slicknav_brand{float:left;color:#fff;font-size:18px;line-height:30px;padding:7px 12px;height:44px} -------------------------------------------------------------------------------- /main/static/assets/css/typography.css: -------------------------------------------------------------------------------- 1 | /* 2 | Table Of Contents 3 | ========================= 4 | - Default Typography 5 | - Custom Typography 6 | ========================= 7 | */ 8 | 9 | 10 | /* 11 | -------------------------- 12 | - Default Typography 13 | -------------------------- 14 | */ 15 | 16 | body { 17 | font-size: 14px; 18 | font-family: 'Lato', sans-serif; 19 | } 20 | 21 | h1, 22 | h2, 23 | h3, 24 | h4, 25 | h5, 26 | h6 { 27 | margin: 0; 28 | font-family: 'Poppins', sans-serif; 29 | } 30 | p{ 31 | font-family: 'Lato', sans-serif; 32 | font-size: 15px; 33 | line-height: 26px; 34 | color: #444; 35 | margin-bottom: 0; 36 | } 37 | p img { 38 | margin: 0; 39 | } 40 | 41 | /* links */ 42 | 43 | a, 44 | a:visited { 45 | text-decoration: none; 46 | transition: all 0.3s ease-in-out; 47 | -webkit-transition: all 0.3s ease-in-out; 48 | -moz-transition: all 0.3s ease-in-out; 49 | -o-transition: all 0.3s ease-in-out; 50 | outline: 0; 51 | font-family: 'Poppins', sans-serif; 52 | } 53 | a:hover{ 54 | text-decoration: none; 55 | } 56 | a:focus { 57 | text-decoration: none; 58 | outline: 0; 59 | } 60 | 61 | p a, 62 | p a:visited { 63 | line-height: inherit; 64 | outline: 0; 65 | } 66 | 67 | 68 | /* list */ 69 | 70 | ul, 71 | ol { 72 | margin-bottom: 0px; 73 | margin-top: 0px; 74 | padding: 0; 75 | } 76 | 77 | ul { 78 | margin: 0; 79 | list-style-type: none; 80 | } 81 | 82 | ol { 83 | list-style: decimal; 84 | } 85 | 86 | ol, 87 | ul.square, 88 | ul.circle, 89 | ul.disc { 90 | margin-left: 0px; 91 | } 92 | 93 | ul.square { 94 | list-style: square outside; 95 | } 96 | 97 | ul.circle { 98 | list-style: circle outside; 99 | } 100 | 101 | ul.disc { 102 | list-style: disc outside; 103 | } 104 | 105 | ul ul, 106 | ul ol, 107 | ol ol, 108 | ol ul { 109 | margin: 0; 110 | } 111 | 112 | ul ul li, 113 | ul ol li, 114 | ol ol li, 115 | ol ul li { 116 | margin-bottom: 0px; 117 | } 118 | 119 | button { 120 | cursor: pointer; 121 | outline: none!important; 122 | letter-spacing: 0; 123 | } 124 | 125 | /* 126 | -------------------------- 127 | - Custom Typography 128 | -------------------------- 129 | */ 130 | /* blockquote */ 131 | blockquote{ 132 | padding: 60px; 133 | position: relative; 134 | background: #853BFA; 135 | } 136 | blockquote:before{ 137 | content: '\f10d'; 138 | font-family: fontawesome; 139 | color: #fff; 140 | font-size: 32px; 141 | position: absolute; 142 | left: 16px; 143 | top: 46px; 144 | } 145 | blockquote p{ 146 | font-size: 17px; 147 | color: #fff; 148 | } 149 | .blockquote-footer{ 150 | color: #fff; 151 | } -------------------------------------------------------------------------------- /main/static/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /main/static/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /main/static/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /main/static/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /main/static/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /main/static/assets/fonts/themify.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/themify.eot -------------------------------------------------------------------------------- /main/static/assets/fonts/themify.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/themify.ttf -------------------------------------------------------------------------------- /main/static/assets/fonts/themify.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/fonts/themify.woff -------------------------------------------------------------------------------- /main/static/assets/images/author/author-img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/author/author-img1.jpg -------------------------------------------------------------------------------- /main/static/assets/images/author/author-img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/author/author-img2.jpg -------------------------------------------------------------------------------- /main/static/assets/images/author/author-img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/author/author-img3.jpg -------------------------------------------------------------------------------- /main/static/assets/images/author/author-img4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/author/author-img4.jpg -------------------------------------------------------------------------------- /main/static/assets/images/author/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/author/avatar.png -------------------------------------------------------------------------------- /main/static/assets/images/bg/singin-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/bg/singin-bg.jpg -------------------------------------------------------------------------------- /main/static/assets/images/blog/post-thumb1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/blog/post-thumb1.jpg -------------------------------------------------------------------------------- /main/static/assets/images/blog/post-thumb2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/blog/post-thumb2.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img1.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img10.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img2.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img3.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img4.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img5.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img6.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img7.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img8.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/card-img9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/card-img9.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/uploadimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/uploadimage.jpg -------------------------------------------------------------------------------- /main/static/assets/images/card/uploadvideo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/uploadvideo.png -------------------------------------------------------------------------------- /main/static/assets/images/card/webcam.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/card/webcam.jpg -------------------------------------------------------------------------------- /main/static/assets/images/icon/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/Thumbs.db -------------------------------------------------------------------------------- /main/static/assets/images/icon/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/loader.gif -------------------------------------------------------------------------------- /main/static/assets/images/icon/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/logo.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/logo2.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/Thumbs.db -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/icon1.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/icon2.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/icon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/icon3.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/icon4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/icon4.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/trends-down-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/trends-down-icon.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/trends-up-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/trends-up-icon.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/triangle-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/triangle-down.png -------------------------------------------------------------------------------- /main/static/assets/images/icon/market-value/triangle-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/icon/market-value/triangle-up.png -------------------------------------------------------------------------------- /main/static/assets/images/media/media1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/media/media1.jpg -------------------------------------------------------------------------------- /main/static/assets/images/media/media2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/media/media2.jpg -------------------------------------------------------------------------------- /main/static/assets/images/media/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/media/photo.png -------------------------------------------------------------------------------- /main/static/assets/images/police/police.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/police/police.jpeg -------------------------------------------------------------------------------- /main/static/assets/images/police/police.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/police/police.png -------------------------------------------------------------------------------- /main/static/assets/images/police/zrp.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/police/zrp.jpeg -------------------------------------------------------------------------------- /main/static/assets/images/police/zrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/police/zrp.png -------------------------------------------------------------------------------- /main/static/assets/images/team/team-author1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/team/team-author1.jpg -------------------------------------------------------------------------------- /main/static/assets/images/team/team-author2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/team/team-author2.jpg -------------------------------------------------------------------------------- /main/static/assets/images/team/team-author3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/team/team-author3.jpg -------------------------------------------------------------------------------- /main/static/assets/images/team/team-author4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/team/team-author4.jpg -------------------------------------------------------------------------------- /main/static/assets/images/team/team-author5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/main/static/assets/images/team/team-author5.jpg -------------------------------------------------------------------------------- /main/static/assets/js/jquery.slicknav.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * SlickNav Responsive Mobile Menu v1.0.10 3 | * (c) 2016 Josh Cope 4 | * licensed under MIT 5 | */ 6 | !function(e,t,n){function a(t,n){this.element=t,this.settings=e.extend({},i,n),this.settings.duplicate||n.hasOwnProperty("removeIds")||(this.settings.removeIds=!1),this._defaults=i,this._name=s,this.init()}var i={label:"MENU",duplicate:!0,duration:200,easingOpen:"swing",easingClose:"swing",closedSymbol:"►",openedSymbol:"▼",prependTo:"body",appendTo:"",parentTag:"a",closeOnClick:!1,allowParentLinks:!1,nestedParentLinks:!0,showChildren:!1,removeIds:!0,removeClasses:!1,removeStyles:!1,brand:"",animations:"jquery",init:function(){},beforeOpen:function(){},beforeClose:function(){},afterOpen:function(){},afterClose:function(){}},s="slicknav",o="slicknav",l={DOWN:40,ENTER:13,ESCAPE:27,LEFT:37,RIGHT:39,SPACE:32,TAB:9,UP:38};a.prototype.init=function(){var n,a,i=this,s=e(this.element),r=this.settings;if(r.duplicate?i.mobileNav=s.clone():i.mobileNav=s,r.removeIds&&(i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("id")})),r.removeClasses&&(i.mobileNav.removeAttr("class"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("class")})),r.removeStyles&&(i.mobileNav.removeAttr("style"),i.mobileNav.find("*").each(function(t,n){e(n).removeAttr("style")})),n=o+"_icon",""===r.label&&(n+=" "+o+"_no-text"),"a"==r.parentTag&&(r.parentTag='a href="#"'),i.mobileNav.attr("class",o+"_nav"),a=e('
'),""!==r.brand){var c=e('
'+r.brand+"
");e(a).append(c)}i.btn=e(["<"+r.parentTag+' aria-haspopup="true" role="button" tabindex="0" class="'+o+"_btn "+o+'_collapsed">',''+r.label+"",'','','','',"",""].join("")),e(a).append(i.btn),""!==r.appendTo?e(r.appendTo).append(a):e(r.prependTo).prepend(a),a.append(i.mobileNav);var p=i.mobileNav.find("li");e(p).each(function(){var t=e(this),n={};if(n.children=t.children("ul").attr("role","menu"),t.data("menu",n),n.children.length>0){var a=t.contents(),s=!1,l=[];e(a).each(function(){return e(this).is("ul")?!1:(l.push(this),void(e(this).is("a")&&(s=!0)))});var c=e("<"+r.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+o+'_item"/>');if(r.allowParentLinks&&!r.nestedParentLinks&&s)e(l).wrapAll('').parent();else{var p=e(l).wrapAll(c).parent();p.addClass(o+"_row")}r.showChildren?t.addClass(o+"_open"):t.addClass(o+"_collapsed"),t.addClass(o+"_parent");var d=e(''+(r.showChildren?r.openedSymbol:r.closedSymbol)+"");r.allowParentLinks&&!r.nestedParentLinks&&s&&(d=d.wrap(c).parent()),e(l).last().after(d)}else 0===t.children().length&&t.addClass(o+"_txtnode");t.children("a").attr("role","menuitem").click(function(t){r.closeOnClick&&!e(t.target).parent().closest("li").hasClass(o+"_parent")&&e(i.btn).click()}),r.closeOnClick&&r.allowParentLinks&&(t.children("a").children("a").click(function(t){e(i.btn).click()}),t.find("."+o+"_parent-link a:not(."+o+"_item)").click(function(t){e(i.btn).click()}))}),e(p).each(function(){var t=e(this).data("menu");r.showChildren||i._visibilityToggle(t.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(t).mousedown(function(){i._outlines(!1)}),e(t).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+o+"_item",function(t){t.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(t){var n=t||event;switch(n.keyCode){case l.ENTER:case l.SPACE:case l.DOWN:t.preventDefault(),n.keyCode===l.DOWN&&e(i.btn).hasClass(o+"_open")||i._menuToggle(),e(i.btn).next().find('[role="menuitem"]').first().focus()}}),i.mobileNav.on("keydown","."+o+"_item",function(t){var n=t||event;switch(n.keyCode){case l.ENTER:t.preventDefault(),i._itemClick(e(t.target));break;case l.RIGHT:t.preventDefault(),e(t.target).parent().hasClass(o+"_collapsed")&&i._itemClick(e(t.target)),e(t.target).next().find('[role="menuitem"]').first().focus()}}),i.mobileNav.on("keydown",'[role="menuitem"]',function(t){var n=t||event;switch(n.keyCode){case l.DOWN:t.preventDefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),r=s+1;a.length<=r&&(r=0);var c=a.eq(r);c.focus();break;case l.UP:t.preventDefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),c=a.eq(s-1);c.focus();break;case l.LEFT:if(t.preventDefault(),e(t.target).parent().parent().parent().hasClass(o+"_open")){var p=e(t.target).parent().parent().prev();p.focus(),i._itemClick(p)}else e(t.target).parent().parent().hasClass(o+"_nav")&&(i._menuToggle(),e(i.btn).focus());break;case l.ESCAPE:t.preventDefault(),i._menuToggle(),e(i.btn).focus()}}),r.allowParentLinks&&r.nestedParentLinks&&e("."+o+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var t=this,n=t.btn,a=t.mobileNav;n.hasClass(o+"_collapsed")?(n.removeClass(o+"_collapsed"),n.addClass(o+"_open")):(n.removeClass(o+"_open"),n.addClass(o+"_collapsed")),n.addClass(o+"_animating"),t._visibilityToggle(a,n.parent(),!0,n)},a.prototype._itemClick=function(e){var t=this,n=t.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+o+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(o+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(o+"_collapsed")?(a.arrow.html(n.openedSymbol),a.parent.removeClass(o+"_collapsed"),a.parent.addClass(o+"_open"),a.parent.addClass(o+"_animating"),t._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(n.closedSymbol),a.parent.addClass(o+"_collapsed"),a.parent.removeClass(o+"_open"),a.parent.addClass(o+"_animating"),t._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(t,n,a,i,s){function l(t,n){e(t).removeClass(o+"_animating"),e(n).removeClass(o+"_animating"),s||p.afterOpen(t)}function r(n,a){t.attr("aria-hidden","true"),d.attr("tabindex","-1"),c._setVisAttr(t,!0),t.hide(),e(n).removeClass(o+"_animating"),e(a).removeClass(o+"_animating"),s?"init"==n&&p.init():p.afterClose(n)}var c=this,p=c.settings,d=c._getActionItems(t),u=0;a&&(u=p.duration),t.hasClass(o+"_hidden")?(t.removeClass(o+"_hidden"),s||p.beforeOpen(i),"jquery"===p.animations?t.stop(!0,!0).slideDown(u,p.easingOpen,function(){l(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slideDown",{duration:u,easing:p.easingOpen,complete:function(){l(i,n)}}),t.attr("aria-hidden","false"),d.attr("tabindex","0"),c._setVisAttr(t,!1)):(t.addClass(o+"_hidden"),s||p.beforeClose(i),"jquery"===p.animations?t.stop(!0,!0).slideUp(u,this.settings.easingClose,function(){r(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slideUp",{duration:u,easing:p.easingClose,complete:function(){r(i,n)}}))},a.prototype._setVisAttr=function(t,n){var a=this,i=t.children("li").children("ul").not("."+o+"_hidden");n?i.each(function(){var t=e(this);t.attr("aria-hidden","true");var i=a._getActionItems(t);i.attr("tabindex","-1"),a._setVisAttr(t,n)}):i.each(function(){var t=e(this);t.attr("aria-hidden","false");var i=a._getActionItems(t);i.attr("tabindex","0"),a._setVisAttr(t,n)})},a.prototype._getActionItems=function(e){var t=e.data("menu");if(!t){t={};var n=e.children("li"),a=n.find("a");t.links=a.add(n.find("."+o+"_item")),e.data("menu",t)}return t.links},a.prototype._outlines=function(t){t?e("."+o+"_item, ."+o+"_btn").css("outline",""):e("."+o+"_item, ."+o+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(o+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(o+"_open")&&e._menuToggle()},e.fn[s]=function(t){var n=arguments;if(void 0===t||"object"==typeof t)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,t))});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){var i;return this.each(function(){var o=e.data(this,"plugin_"+s);o instanceof a&&"function"==typeof o[t]&&(i=o[t].apply(o,Array.prototype.slice.call(n,1)))}),void 0!==i?i:this}}}(jQuery,document,window); -------------------------------------------------------------------------------- /main/static/assets/js/jquery.slimscroll.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * Version: 1.3.8 6 | * 7 | */ 8 | (function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},f);this.each(function(){function v(d){if(r){d=d||window.event; 9 | var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0=b.outerHeight()?k=!0:(c.stop(!0, 11 | !0).fadeIn("fast"),a.railVisible&&m.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),m.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings("."+a.barClass),m=b.siblings("."+a.railClass);x();if(e.isPlainObject(f)){if("height"in f&&"auto"==f.height){b.parent().css("height","auto");b.css("height","auto");var h=b.parent().parent().height();b.parent().css("height", 12 | h);b.css("height",h)}else"height"in f&&(h=f.height,b.parent().css("height",h),b.css("height",h));if("scrollTo"in f)q=parseInt(a.scrollTo);else if("scrollBy"in f)q+=parseInt(a.scrollBy);else if("destroy"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&"destroy"in f)){a.height="auto"==a.height?b.parent().height():a.height;q=e("
").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden", 13 | width:a.width,height:a.height});var m=e("
").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("
").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius, 14 | WebkitBorderRadius:a.borderRadius,zIndex:99}),h="right"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);n(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll", 15 | function(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)}); 16 | x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):"top"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery); -------------------------------------------------------------------------------- /main/static/assets/js/metisMenu.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * metismenu - v2.7.8 3 | * A jQuery menu plugin 4 | * https://github.com/onokumus/metismenu#readme 5 | * 6 | * Made by Osman Nuri Okumus (https://github.com/onokumus) 7 | * Under MIT License 8 | */ 9 | !function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):n.metisMenu=e(n.jQuery)}(this,function(n){"use strict";function a(s){for(var n=1;n 0 ? window.innerHeight : this.screen.height) - 5; 26 | (e -= 67) < 1 && (e = 1), e > 67 && $(".main-content").css("min-height", e + "px") 27 | }; 28 | $(window).ready(e), $(window).on("resize", e); 29 | 30 | /*================================ 31 | sidebar menu 32 | ==================================*/ 33 | $("#menu").metisMenu(); 34 | 35 | /*================================ 36 | slimscroll activation 37 | ==================================*/ 38 | $('.menu-inner').slimScroll({ 39 | height: 'auto' 40 | }); 41 | $('.nofity-list').slimScroll({ 42 | height: '435px' 43 | }); 44 | $('.timeline-area').slimScroll({ 45 | height: '500px' 46 | }); 47 | $('.recent-activity').slimScroll({ 48 | height: 'calc(100vh - 114px)' 49 | }); 50 | $('.settings-list').slimScroll({ 51 | height: 'calc(100vh - 158px)' 52 | }); 53 | 54 | /*================================ 55 | stickey Header 56 | ==================================*/ 57 | $(window).on('scroll', function() { 58 | var scroll = $(window).scrollTop(), 59 | mainHeader = $('#sticky-header'), 60 | mainHeaderHeight = mainHeader.innerHeight(); 61 | 62 | // console.log(mainHeader.innerHeight()); 63 | if (scroll > 1) { 64 | $("#sticky-header").addClass("sticky-menu"); 65 | } else { 66 | $("#sticky-header").removeClass("sticky-menu"); 67 | } 68 | }); 69 | 70 | /*================================ 71 | form bootstrap validation 72 | ==================================*/ 73 | $('[data-toggle="popover"]').popover() 74 | 75 | /*------------- Start form Validation -------------*/ 76 | window.addEventListener('load', function() { 77 | // Fetch all the forms we want to apply custom Bootstrap validation styles to 78 | var forms = document.getElementsByClassName('needs-validation'); 79 | // Loop over them and prevent submission 80 | var validation = Array.prototype.filter.call(forms, function(form) { 81 | form.addEventListener('submit', function(event) { 82 | if (form.checkValidity() === false) { 83 | event.preventDefault(); 84 | event.stopPropagation(); 85 | } 86 | form.classList.add('was-validated'); 87 | }, false); 88 | }); 89 | }, false); 90 | 91 | /*================================ 92 | datatable active 93 | ==================================*/ 94 | if ($('#dataTable').length) { 95 | $('#dataTable').DataTable({ 96 | responsive: true 97 | }); 98 | } 99 | if ($('#dataTable2').length) { 100 | $('#dataTable2').DataTable({ 101 | responsive: true 102 | }); 103 | } 104 | if ($('#dataTable3').length) { 105 | $('#dataTable3').DataTable({ 106 | responsive: true 107 | }); 108 | } 109 | 110 | 111 | /*================================ 112 | Slicknav mobile menu 113 | ==================================*/ 114 | $('ul#nav_menu').slicknav({ 115 | prependTo: "#mobile_menu" 116 | }); 117 | 118 | /*================================ 119 | login form 120 | ==================================*/ 121 | $('.form-gp input').on('focus', function() { 122 | $(this).parent('.form-gp').addClass('focused'); 123 | }); 124 | $('.form-gp input').on('focusout', function() { 125 | if ($(this).val().length === 0) { 126 | $(this).parent('.form-gp').removeClass('focused'); 127 | } 128 | }); 129 | 130 | /*================================ 131 | slider-area background setting 132 | ==================================*/ 133 | $('.settings-btn, .offset-close').on('click', function() { 134 | $('.offset-area').toggleClass('show_hide'); 135 | $('.settings-btn').toggleClass('active'); 136 | }); 137 | 138 | /*================================ 139 | Owl Carousel 140 | ==================================*/ 141 | function slider_area() { 142 | var owl = $('.testimonial-carousel').owlCarousel({ 143 | margin: 50, 144 | loop: true, 145 | autoplay: false, 146 | nav: false, 147 | dots: true, 148 | responsive: { 149 | 0: { 150 | items: 1 151 | }, 152 | 450: { 153 | items: 1 154 | }, 155 | 768: { 156 | items: 2 157 | }, 158 | 1000: { 159 | items: 2 160 | }, 161 | 1360: { 162 | items: 1 163 | }, 164 | 1600: { 165 | items: 2 166 | } 167 | } 168 | }); 169 | } 170 | slider_area(); 171 | 172 | /*================================ 173 | Fullscreen Page 174 | ==================================*/ 175 | 176 | if ($('#full-view').length) { 177 | 178 | var requestFullscreen = function(ele) { 179 | if (ele.requestFullscreen) { 180 | ele.requestFullscreen(); 181 | } else if (ele.webkitRequestFullscreen) { 182 | ele.webkitRequestFullscreen(); 183 | } else if (ele.mozRequestFullScreen) { 184 | ele.mozRequestFullScreen(); 185 | } else if (ele.msRequestFullscreen) { 186 | ele.msRequestFullscreen(); 187 | } else { 188 | console.log('Fullscreen API is not supported.'); 189 | } 190 | }; 191 | 192 | var exitFullscreen = function() { 193 | if (document.exitFullscreen) { 194 | document.exitFullscreen(); 195 | } else if (document.webkitExitFullscreen) { 196 | document.webkitExitFullscreen(); 197 | } else if (document.mozCancelFullScreen) { 198 | document.mozCancelFullScreen(); 199 | } else if (document.msExitFullscreen) { 200 | document.msExitFullscreen(); 201 | } else { 202 | console.log('Fullscreen API is not supported.'); 203 | } 204 | }; 205 | 206 | var fsDocButton = document.getElementById('full-view'); 207 | var fsExitDocButton = document.getElementById('full-view-exit'); 208 | 209 | fsDocButton.addEventListener('click', function(e) { 210 | e.preventDefault(); 211 | requestFullscreen(document.documentElement); 212 | $('body').addClass('expanded'); 213 | }); 214 | 215 | fsExitDocButton.addEventListener('click', function(e) { 216 | e.preventDefault(); 217 | exitFullscreen(); 218 | $('body').removeClass('expanded'); 219 | }); 220 | } 221 | 222 | })(jQuery); -------------------------------------------------------------------------------- /main/templates/home/add_citizen.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 |

Add Citizen

14 | {% if messages %} 15 |
16 | {% for message in messages %} 17 |
18 | {{ message|safe }} 19 |
20 | {% endfor %} 21 |
22 | {% endif %} 23 |
24 |
25 | {% csrf_token %} 26 |
27 | 28 | 30 |
31 |
32 | 33 | 35 |
36 |
37 | 38 | 40 |
41 | 42 |
43 | 44 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 |
55 | 56 | 57 |
58 |
59 | 60 | 61 |
62 |
63 | 64 | 65 | {% endblock %} 66 | {% block js_content %} 67 | 68 | {% endblock %} 69 | -------------------------------------------------------------------------------- /main/templates/home/add_user.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 |

Add System User

14 | {% if messages %} 15 |
16 | {% for message in messages %} 17 |
18 | {{ message|safe }} 19 |
20 | {% endfor %} 21 |
22 | {% endif %} 23 |
24 |
25 | {% csrf_token %} 26 |
27 | 28 | 30 |
31 |
32 | 33 | 35 |
36 |
37 | 38 | 40 |
41 |
42 | 43 | 45 |
46 |
47 | 48 |
49 |
50 | 51 |
52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | 63 | 64 | {% endblock %} 65 | {% block js_content %} 66 | 67 | {% endblock %} 68 | -------------------------------------------------------------------------------- /main/templates/home/loc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Info Windows 7 | 20 | 21 | 22 | Back 23 |
24 | 58 | 61 | 62 | -------------------------------------------------------------------------------- /main/templates/home/reports.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block head_content %} 3 | 32 | {% endblock %} 33 | 34 | 35 | {% block main_content %} 36 | {% load static %} 37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 | 52 | {% endblock %} 53 | 54 | -------------------------------------------------------------------------------- /main/templates/home/spotted_thiefs.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 |
5 |
6 | 7 |
8 |
9 |
10 |

Spotted Wanted People

11 | {% if messages %} 12 |
13 | {% for message in messages %} 14 |
15 | {{ message|safe }} 16 |
17 | {% endfor %} 18 |
19 | {% endif %} 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% for thief in thiefs %} 33 | 34 | 35 | 36 | 37 | 38 | 42 | 43 | {% endfor %} 44 | 45 |
NameNational IDAddressDate SpottedAction
{{ thief.name }}{{ thief.national_id }}{{ thief.address }}{{ thief.created_at }} 39 | View Location 40 | Found 41 |
46 |
47 |
48 |
49 |
50 | 51 |
52 |
53 | {% endblock %} 54 | {% block js_content %} 55 | 56 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/home/upload_pic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Simple File Upload 6 | 7 | 8 |
9 | {% csrf_token %} 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /main/templates/home/view_citizenz.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 |
5 |
6 | 7 |
8 |
9 |
10 |

View Citizens

11 | {% if messages %} 12 |
13 | {% for message in messages %} 14 |
15 | {{ message|safe }} 16 |
17 | {% endfor %} 18 |
19 | {% endif %} 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% for citizen in citizens %} 33 | 34 | 35 | 36 | 37 | 38 | 47 | 48 | {% endfor %} 49 | 50 |
NameNational IDAddressStatusAction
{{ citizen.name }}{{ citizen.national_id }}{{ citizen.address }}{{ citizen.status }} 39 | {% if citizen.status == 'Free' %} 40 | Wanted 41 | {% elif citizen.status == 'Found' %} 42 | Wanted 43 | {% else %} 44 | Found 45 | {% endif %} 46 |
51 |
52 |
53 |
54 |
55 | 56 |
57 |
58 | {% endblock %} 59 | {% block js_content %} 60 | 61 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/home/view_location.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block head_content %} 3 | 16 | {% endblock %} 17 | {% block main_content %} 18 | {% load static %} 19 | 20 |
21 |
22 | 23 |
24 | 71 | 74 |
75 |
76 | {% endblock %} 77 | {% block js_content %} 78 | 79 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/home/view_users.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 |
5 |
6 | 7 |
8 |
9 |
10 |

View Users

11 | {% if messages %} 12 |
13 | {% for message in messages %} 14 |
15 | {{ message|safe }} 16 |
17 | {% endfor %} 18 |
19 | {% endif %} 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% for user in users %} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {% endfor %} 42 | 43 |
NameSurnamePolice IDJoined Date
{{ user.first_name }}{{ user.last_name }}{{ user.email }}{{ user.created_at }}
44 |
45 |
46 |
47 |
48 | 49 |
50 |
51 | {% endblock %} 52 | {% block js_content %} 53 | 54 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/home/welcome.html: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.html" %} 2 | {% block main_content %} 3 | {% load static %} 4 |
5 |
6 | {% if messages %} 7 |
8 | {% for message in messages %} 9 |
10 | {{ message|safe }} 11 |
12 | {% endfor %} 13 |
14 | {% endif %} 15 |
16 |
17 |
18 | image 19 |
20 |
Upload Thief Picture
21 |

Upload thief picture and the system will detect and run an analysis on the picture face to detect the person as best as it can 22 |

23 | 24 | 25 | 46 |
47 |
48 |
49 |
50 |
51 | image 52 |
53 |
Upload Thief Video
54 |

Upload thief video and the system will detect and run an analysis on the picture face to detect the person as best as it can 55 |

56 | 57 | 58 | 79 |
80 |
81 |
82 | 83 | 84 |
85 |
86 | image 87 |
88 |
Detect Using Webcam.
89 |

Webcam is used to model a CCTV in this case 90 |

91 | Open Webcam 92 |
93 |
94 |
95 | 96 |
97 |
98 |
99 | {% endblock %} 100 | {% block js_content %} 101 | 102 | {% endblock %} -------------------------------------------------------------------------------- /main/templates/layout/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Criminal Detection 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% block head_content %} 33 | 34 | {% endblock head_content %} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 | 46 | 47 |
48 | 49 | 91 | 92 | 93 |
94 | 95 |
96 |
97 | 98 |
99 | 104 | 105 |
106 | 107 |
108 |
109 |
110 | 117 |
118 |
119 |
120 |
121 |
122 | 123 | 124 |
125 |
126 |
127 | 134 |
135 | 136 |
137 |
138 | 139 | {% block main_content %} 140 | 141 | {% endblock main_content %} 142 |
143 | 144 | 145 |
146 | 149 |
150 | 151 |
152 | 153 | 154 | 155 | {% block js_content %} 156 | 157 | {% endblock js_content %} 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /main/templates/layout/base2.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Cards - srtdash 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
39 |
40 |
41 | 42 | 43 |
44 | 45 | 89 | 90 | 91 |
92 | 93 |
94 |
95 | 96 |
97 | 102 | 103 |
104 | 105 |
106 |
107 |
108 | 117 |
118 |
119 |
120 |
121 |
122 | 123 | 124 |
125 |
126 |
127 | 134 |
135 | 136 |
137 |
138 | 139 | {% block main_content %} 140 | 141 | {% endblock main_content %} 142 |
143 | 144 | 145 |
146 | 149 |
150 | 151 |
152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /main/templates/session/login.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Crime Identify System 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |
33 | 34 | 35 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /main/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /main/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from django.urls import path 3 | from django.conf import settings 4 | from django.conf.urls.static import static 5 | 6 | from main.views import FileView 7 | from . import views 8 | 9 | urlpatterns = [ 10 | url(r'^$', views.index), 11 | url(r'^add_user', views.addUser), 12 | url(r'^save_user', views.saveUser), 13 | url(r'^view_users', views.viewUsers), 14 | url(r'^success$', views.success), 15 | 16 | url(r'^add_citizen', views.addCitizen), 17 | url(r'^save_citizen', views.saveCitizen), 18 | url(r'^view_citizens', views.viewCitizens), 19 | 20 | path('wanted_citizen//',views.wantedCitizen,name='wanted_citizen'), 21 | path('free_citizen//',views.freeCitizen,name='free_citizen'), 22 | 23 | 24 | 25 | 26 | url(r'^login$', views.login), 27 | url(r'^logout', views.logout_view), 28 | url(r'^detectImage', views.detectImage), 29 | url(r'^detectWithWebcam', views.detectWithWebcam), 30 | url(r'^upload', FileView.as_view(), name='file-upload'), 31 | 32 | url(r'^spotted_criminals', views.spottedCriminals), 33 | path('thief_location//',views.viewThiefLocation,name='thief_location'), 34 | path('found_thief//', views.foundThief, name='found_thief'), 35 | 36 | url(r'^reports', views.viewReports), 37 | 38 | 39 | 40 | 41 | 42 | ] 43 | 44 | if settings.DEBUG: 45 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 46 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "crimedetec.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /media/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | PreviewsShown=true 3 | Timestamp=2019,6,1,11,13,13 4 | Version=4 5 | -------------------------------------------------------------------------------- /media/mapu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/mapu.jpeg -------------------------------------------------------------------------------- /media/moswa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa.png -------------------------------------------------------------------------------- /media/moswa_6H5KMnH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_6H5KMnH.png -------------------------------------------------------------------------------- /media/moswa_KGXPLMh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_KGXPLMh.png -------------------------------------------------------------------------------- /media/moswa_KmdRUzW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_KmdRUzW.png -------------------------------------------------------------------------------- /media/moswa_Ov2AjO2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_Ov2AjO2.png -------------------------------------------------------------------------------- /media/moswa_cWnMocu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_cWnMocu.png -------------------------------------------------------------------------------- /media/moswa_lL3JMMO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_lL3JMMO.png -------------------------------------------------------------------------------- /media/moswa_p84zaBm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/moswa_p84zaBm.png -------------------------------------------------------------------------------- /media/patie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/patie.jpg -------------------------------------------------------------------------------- /media/patie_Kkx2LMJ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/patie_Kkx2LMJ.jpg -------------------------------------------------------------------------------- /media/patie_hYH2rZN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/patie_hYH2rZN.jpg -------------------------------------------------------------------------------- /media/wayne.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne.jpg -------------------------------------------------------------------------------- /media/wayne2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2.jpg -------------------------------------------------------------------------------- /media/wayne2_4eSLLJ6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_4eSLLJ6.jpg -------------------------------------------------------------------------------- /media/wayne2_5e7VeBI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_5e7VeBI.jpg -------------------------------------------------------------------------------- /media/wayne2_FTOe0oE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_FTOe0oE.jpg -------------------------------------------------------------------------------- /media/wayne2_HptHBHd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_HptHBHd.jpg -------------------------------------------------------------------------------- /media/wayne2_KDaHFNA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_KDaHFNA.jpg -------------------------------------------------------------------------------- /media/wayne2_YgtaXAk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_YgtaXAk.jpg -------------------------------------------------------------------------------- /media/wayne2_nP4q4KN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne2_nP4q4KN.jpg -------------------------------------------------------------------------------- /media/wayne_QUk4I6J.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne_QUk4I6J.jpg -------------------------------------------------------------------------------- /media/wayne_e5iMzjB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/media/wayne_e5iMzjB.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | absl-py==0.7.1 2 | astor==0.7.1 3 | bottle==0.12.8 4 | chatterbot-corpus==1.2.0 5 | Click==7.0 6 | cmake==3.13.3 7 | coverage==4.5.1 8 | cycler==0.10.0 9 | Django==2.0.13 10 | django-widget-tweaks==1.4.3 11 | djangorestframework==3.9.4 12 | dlib==19.17.0 13 | face-recognition==1.2.3 14 | face-recognition-models==0.3.0 15 | gast==0.2.2 16 | google-pasta==0.1.5 17 | grpcio==1.20.1 18 | h5py==2.9.0 19 | image==1.5.27 20 | Keras-Applications==1.0.7 21 | Keras-Preprocessing==1.0.9 22 | kiwisolver==1.0.1 23 | Markdown==3.0.1 24 | matplotlib==2.2.4 25 | mysql-connector-python==8.0.15 26 | mysqlclient==1.4.2.post1 27 | nose==1.3.7 28 | numpy==1.16.2 29 | opencv-python==4.0.0.21 30 | Pillow==5.4.1 31 | protobuf==3.7.1 32 | py==1.4.31 33 | py-bcrypt==0.4 34 | pycups==1.9.72 35 | pyparsing==2.3.1 36 | pysmbc==1.0.15.4 37 | python-dateutil==2.8.0 38 | pytz==2018.9 39 | PyYAML==3.13 40 | requests==2.7.0 41 | scikit-learn==0.20.3 42 | scipy==1.2.1 43 | simplejson==3.8.2 44 | six==1.12.0 45 | sklearn==0.0 46 | tb-nightly==1.14.0a20190301 47 | tensorflow==2.0.0a0 48 | termcolor==1.1.0 49 | tf-estimator-nightly==1.14.0.dev2019030115 50 | virtualenv==13.1.2 51 | Werkzeug==0.15.2 52 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 1.2.1 3 | commit = True 4 | tag = True 5 | 6 | [bumpversion:file:setup.py] 7 | search = version='{current_version}' 8 | replace = version='{new_version}' 9 | 10 | [bumpversion:file:face_recognition/__init__.py] 11 | search = __version__ = '{current_version}' 12 | replace = __version__ = '{new_version}' 13 | 14 | [bdist_wheel] 15 | universal = 1 16 | 17 | [flake8] 18 | exclude = 19 | .github, 20 | .idea, 21 | .eggs, 22 | examples, 23 | docs, 24 | .tox, 25 | bin, 26 | dist, 27 | tools, 28 | *.egg-info, 29 | __init__.py, 30 | *.yml 31 | max-line-length = 160 32 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from setuptools import setup 5 | 6 | with open('README.rst') as readme_file: 7 | readme = readme_file.read() 8 | 9 | with open('HISTORY.rst') as history_file: 10 | history = history_file.read() 11 | 12 | requirements = [ 13 | 'face_recognition_models>=0.3.0', 14 | 'Click>=6.0', 15 | 'dlib>=19.7', 16 | 'numpy', 17 | 'Pillow' 18 | ] 19 | 20 | test_requirements = [ 21 | 'tox', 22 | 'flake8==2.6.0' 23 | ] 24 | 25 | setup( 26 | name='face_recognition', 27 | version='1.2.3', 28 | description="Recognize faces from Python or from the command line", 29 | long_description=readme + '\n\n' + history, 30 | author="Adam Geitgey", 31 | author_email='ageitgey@gmail.com', 32 | url='https://github.com/ageitgey/face_recognition', 33 | packages=[ 34 | 'face_recognition', 35 | ], 36 | package_dir={'face_recognition': 'face_recognition'}, 37 | package_data={ 38 | 'face_recognition': ['models/*.dat'] 39 | }, 40 | entry_points={ 41 | 'console_scripts': [ 42 | 'face_recognition=face_recognition.face_recognition_cli:main', 43 | 'face_detection=face_recognition.face_detection_cli:main' 44 | ] 45 | }, 46 | install_requires=requirements, 47 | license="MIT license", 48 | zip_safe=False, 49 | keywords='face_recognition', 50 | classifiers=[ 51 | 'Development Status :: 4 - Beta', 52 | 'Intended Audience :: Developers', 53 | 'License :: OSI Approved :: MIT License', 54 | 'Natural Language :: English', 55 | "Programming Language :: Python :: 2", 56 | 'Programming Language :: Python :: 2.6', 57 | 'Programming Language :: Python :: 2.7', 58 | 'Programming Language :: Python :: 3', 59 | 'Programming Language :: Python :: 3.3', 60 | 'Programming Language :: Python :: 3.4', 61 | 'Programming Language :: Python :: 3.5', 62 | 'Programming Language :: Python :: 3.6', 63 | ], 64 | test_suite='tests', 65 | tests_require=test_requirements 66 | ) 67 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/test_images/32bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/32bit.png -------------------------------------------------------------------------------- /tests/test_images/biden.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/biden.jpg -------------------------------------------------------------------------------- /tests/test_images/obama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/obama.jpg -------------------------------------------------------------------------------- /tests/test_images/obama2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/obama2.jpg -------------------------------------------------------------------------------- /tests/test_images/obama3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/obama3.jpg -------------------------------------------------------------------------------- /tests/test_images/obama_partial_face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/obama_partial_face.jpg -------------------------------------------------------------------------------- /tests/test_images/obama_partial_face2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moswag/FacialRecognitionForPolice/0bb947116f27b0ebd007f537251a6e7e67de3d64/tests/test_images/obama_partial_face2.jpg -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = 3 | py27 4 | py34 5 | py35 6 | py36 7 | flake8 8 | 9 | 10 | [travis] 11 | python = 12 | 2.7: py27, flake8 13 | 3.4: py34, flake8 14 | 3.5: py35, flake8 15 | 3.6: py36, flake8 16 | 17 | 18 | [testenv] 19 | commands = 20 | python setup.py test 21 | 22 | 23 | [testenv:flake8] 24 | deps = 25 | flake8==2.6.0 26 | 27 | commands = 28 | flake8 29 | --------------------------------------------------------------------------------