While working on Camera Live Stream Service i decided will add machine learning in to this project. That mean our camera can be learn to know who is family member, during stream video and send warning to the owner if someone in the camera is not family members. that is just idea you may have more idea to use this for other devices maybe Door open …
I recommend download Pycharm tool for Python development.
sudo pip install virtualenv
mkdir project
cd project
virtualenv venv
We need boost python when compile Dlib c++ for Python module
To compile Boost.Python yourself download boost from http://boost.org and then go into the boost root folder
./bootstrap.sh --with-libraries=python./b2sudo ./b2 install
Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real world problems. https://github.com/davisking/dlib
brew install cmake
git clone https://github.com/davisking/dlib.git
cd dlibmkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1; cmake --build .
Activate Python Virtual Environment in our Python project
cd /PATH-OUR-PROJECTcd venvsource bin/activate
python setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA
Use flask as Python framework build api service. Api http://flask.pocoo.org/docs/0.12/api
from flask import Flask,Response,jsonapp = Flask(__name__)
@app route('/', methods=['GET'])def home():return Response(json.dumps({"api": "1.0"}), status=200, mimetype='application/json')
if __name__ == "__main__":
app.run()
we can use any database to store users info. in this project i just use sqlite3 default support by Python. Tool for design slqlite http://sqlitebrowser.org/
Part 1: Setup and begin with Flask
Please Subscribe me on Youtube for next part.