GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Pi-DeepLearning/RaspberryPi-FaceDetection-MTCNN-Caffe-With-Motion: MTCNN with Motion Detection, on Raspberry Pi with Love

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
model
model
 
 
.gitignore
.gitignore
 
 
Demo.ipynb
Demo.ipynb
 
 
README.md
README.md
 
 
_init_paths.py
_init_paths.py
 
 
_init_paths.pyc
_init_paths.pyc
 
 
cam.py
cam.py
 
 
demo.py
demo.py
 
 
imglist.txt
imglist.txt
 
 
python_wrapper.py
python_wrapper.py
 
 
python_wrapper.pyc
python_wrapper.pyc
 
 
run
run
 
 
script.m
script.m
 
 
test1.jpg
test1.jpg
 
 
test2.jpg
test2.jpg
 
 

Repository files navigation

MTCNN with Motion Detection On Raspberry Pi 3

The Python version of MTCNN running on Raspberry Pi 3 with Love.
Also a motion detection trigger will help to improve the quality.

Requirement

Installation of dependencies:

  sudo apt-get update && sudo apt-get upgrade
  sudo apt-get install -y gfortran cython
  sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler git
  sudo apt-get install --no-install-recommends libboost-all-dev
  sudo apt-get install -y python-dev libgflags-dev libgoogle-glog-dev liblmdb-dev libatlas-base-dev python-skimage
  sudo pip install pyzmq jsonschema pillow numpy scipy ipython jupyter pyyaml
  1. Raspbian
  2. Caffe && PyCaffe: https://github.com/BVLC/caffe, My Blog

Install caffe:

  git clone https://github.com/BVLC/caffe
  cd caffe
  cp Makefile.config.example Makefile.config
  sudo nano Makefile.config

Modify next lines, instead of these

  #CPU_ONLY := 1
  /usr/lib/python2.7/dist-packages/numpy/core/include
  INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
  LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

with:

  CPU_ONLY := 1
  /usr/local/lib/python2.7/dist-packages/numpy/core/include
  INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
  LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/arm-linux-gnueabihf/hdf5/serial/
  make all
  make test
  make runtest
  make pycaffe
  
  ./scripts/download_model_binary.py models/bvlc_googlenet
  sudo nano ~/.bashrc
  export PYTHONPATH=/home/pi/deepdream/caffe/python:$PYTHONPATH // Add at the end of file

Protobuf installation:

  cd ~/caffe
  cd python
  python setup.py build
  python setup.py google_test
  sudo python setup.py install
  1. OpenCV && CV2: My Blog
    If you have good luck, sudo apt-get install opencv python-opencv will have it done. or search installation guide from google.

  2. WebCam(D-Link DCS-932L)
    I have it on hand, so have to write a IPCamera class for it.
    You can simply use a Camera Model of PI (OV5647), it need Camera White Balance and parameter finetune. (PR Welcome)

 if you use PiNor Cam module or other nonUSB cam, you may need do following changes:

  sudo modprobe bcm2835-v4l2
code:
  ret, frame = ipCam.read()
  _, cnts, _ = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)

Tell mtcnn where pycaffe is

Edit mtcnn/_init_paths.py, change caffe_path to your own.

Run

Demo.ipynb

About

MTCNN with Motion Detection, on Raspberry Pi with Love

Topics

caffecnndetectionfacemachinelearningmotionmotion-detectionmtcnnopencvpython

Resources

Readme
Activity
Custom properties

Stars

215 stars

Watchers

20 watching

Forks

61 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.