element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Photography
  • Challenges & Projects
  • Project14
  • Photography
  • More
  • Cancel
Photography
Blog Smart DoorBell
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Photography to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 21 Jul 2021 1:36 PM Date Created
  • Views 1183 views
  • Likes 8 likes
  • Comments 0 comments
  • photographych
Related
Recommended

Smart DoorBell

fyaocn
fyaocn
21 Jul 2021
image

Photography                                               Submit an EntrySubmit an Entry

 

Monthly Themes   | Monthly Poll   |  Back to homepage image

 

    • Photography                                               Submit an EntrySubmit an Entry
    • 1 Idea of Smart DoorBell
    • 2 Hardware and software
    • 3  First Demo
    • 4  Lens Sets
    • 5 Play with AI engine

1 Idea of Smart DoorBell

There are door bell for visitors to press.

But no need for smart door bell, if visitor approaches , the camera knows someone is coming and trigger door bell or SMS to mobile if you are not at home.

Simple idea but not one easy-to-go task.

 

2 Hardware and software

Thanks for Element14 for the Raspberry Pi HQ camera Kits. With everything needed.

image

The raspberry Pi 4B, one HQ camera and HQ lens.

image

I would like to build the codes on RaspberryPi with VIM only.

That is good enough with latest Raspbian OS buster.

 

 

3  First Demo

Connect the Camera and Enable the camera in raspi-config,

SSH and VNC is enable as well for me to build with SSH without the keyboard and screen. In the end, there would be not screen for the door bell.

image

 

 

4  Lens Sets

Here is the lens I have prepared for this project. I need adapter to fit for C-socket. It takes some time to find right adapter, I think it work from Aliexpress.

I shall try Paddlelite from Baidu, enclosed all AI function with API open to dummy like me.

But it takes more time in build the lib

imageimage

 

5 Play with AI engine

There are full instruction in github for https://github.com/paddlepaddle/paddle

/*** I would like to go on with lens sets test and AI human detection in next blog. ***/

image

5.1 Install PaddlePaddle may be new to most of us, but it worth trying. Since it has made many API for dummies like me, especially  Paddlehub , change face with AI in a couple of lines in python. Refer to github for more information,

https://github.com/paddlepaddle/paddle ,

Use Lite version of paddlelite in Rasperberrypi as follows,

sudo apt install patchelf

sudo apt-get update

sudo apt-get install -y

gcc g++ make wget python unzip patchelf python-dev

Then,

git clone https://gitee.com/paddlepaddle/paddle-lite.git

cd paddle-lite

git checkout release/v2.8

sudo ./lite/tools/build_linux.sh --arch=armv7hf --with_python=ON --python_version=3.7 --with_cv=ON

It there are erros, mke build thread into 1 take longer time, but it works

export LITE_BUILD_THREADS=1

image

image

 

Then install  with pip

pip install paddlelite-28605ee8c-cp27-cp27mu-linux_armv7l.whl

pip install paddlelite-28605ee8c-cp27-cp27mu-linux_armv7l.whl

image

5.2 Run paddlelite-demo

git clone https://github.com/PaddlePaddle/Paddle-Lite-Demo

cd Paddle-Lite-Demo/PaddleLite-armlinux-demo

./download_models_and_libs.sh

 

image

cd Paddle-Lite-Demo/PaddleLite-armlinux-demo/image_classification_demo

Use armv7hr instead of TARGET_ARCH_ABI=armv8, since the Raspbian OS is not for armv8 now. then test the demo.

image

sudo ./run.sh

 

5.3 Install OpenCV

Install needed libs

sudo apt-get install libjpeg-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libtiff5-dev
sudo apt-get install libpng12-dev
sudo apt-get install libqtgui4 libqt4-test
sudo apt-get install libjasper-dev

Install openCV

sudo pip install opencv-python
or
pip install --upgrade opencv-python

 

5.4 Test camera

Try still image with

raspistill -o test.jpg 

Try video with

raspivid -o test.h264 -t 25000 -timed 2500,5000

or with video stream on port 8090, use VLC to open http://ip:8090 for video stream

raspivid -t 0 -w 1280 -h 720 -fps 20 -o - | nc -k -l 8090

That is OK with the camera, but only blur picture, need to adjust the focus and aperture. That is really interesting.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube