Latest YouTube Video
Saturday, December 23, 2017
AA - Alcoholics Anonymous Ladies of the Morning Women's Support Group
from Google Alert - anonymous http://ift.tt/2BGXpXv
via IFTTT
Anonymous user 79a0d9
from Google Alert - anonymous http://ift.tt/2kOZ7LS
via IFTTT
Anonymous user ce197c
from Google Alert - anonymous http://ift.tt/2l4mdO3
via IFTTT
Anonymous user 547a10
from Google Alert - anonymous http://ift.tt/2C2idrD
via IFTTT
Anonymous user cb5655
from Google Alert - anonymous http://ift.tt/2BrQ1v4
via IFTTT
Interim Group Finance Director
from Google Alert - anonymous http://ift.tt/2C49tla
via IFTTT
Graduate Business Analyst
from Google Alert - anonymous http://ift.tt/2BsAtqV
via IFTTT
Anonymous in a town that talks 2
from Google Alert - anonymous http://ift.tt/2C3dbvb
via IFTTT
Anonymous user 8ca77b
from Google Alert - anonymous http://ift.tt/2BrL1pX
via IFTTT
Anonymous user c8fe3a
from Google Alert - anonymous http://ift.tt/2C4Bfhk
via IFTTT
Anonymous user 7b14f9
from Google Alert - anonymous http://ift.tt/2BrKpB0
via IFTTT
Send anonymous mail postage
from Google Alert - anonymous http://ift.tt/2C4X8gs
via IFTTT
Anonymous ip test
from Google Alert - anonymous http://ift.tt/2BrJMr8
via IFTTT
Christmas Cards From Anonymous
from Google Alert - anonymous http://ift.tt/2C3d9n3
via IFTTT
Are you anonymous on sarahah
from Google Alert - anonymous http://ift.tt/2BrKdBM
via IFTTT
(#41457) · Issues
from Google Alert - anonymous http://ift.tt/2kOEP5a
via IFTTT
▶ Joe Flacco goes for 237 yards and 2 TD as Ravens top Colts 23-16 to continue playoff push (ESPN)
via IFTTT
I have a new follower on Twitter
Nancy cooper
Following: 102 - Followers: 1
December 23, 2017 at 05:00PM via Twitter http://twitter.com/trueloveneeded
📋 Ravens: WR Jeremy Maclin (knee) officially out vs. Colts; RB Terrance West active for 1st time in 10 weeks (ESPN)
via IFTTT
Anonymous 2016
from Google Alert - anonymous http://ift.tt/2kLRru1
via IFTTT
Anonymous#23557
from Google Alert - anonymous http://ift.tt/2l3zqXc
via IFTTT
Anonymous hack tools download
from Google Alert - anonymous http://ift.tt/2D4TX5o
via IFTTT
Can police trace anonymous text messages
from Google Alert - anonymous http://ift.tt/2BW16VY
via IFTTT
Zoosk browse anonymously
from Google Alert - anonymous http://ift.tt/2D3TNv5
via IFTTT
8th St.'s surf is at least 5.09ft high
8th St. Summary
At 2:00 AM, surf min of 4.37ft. At 8:00 AM, surf min of 5.09ft. At 2:00 PM, surf min of 5.52ft. At 8:00 PM, surf min of 5.38ft.
Surf maximum: 5.87ft (1.79m)
Surf minimum: 5.09ft (1.55m)
Tide height: 1.04ft (0.32m)
Wind direction: ENE
Wind speed: 21.58 KTS
from Surfline http://ift.tt/1kVmigH
via IFTTT
I have a new follower on Twitter
Marco Essomba
#Founder, #CTO @icybersecurity_ UK | I Help Clients Protect Digital Assets | Tweeting #Startups #CyberSecurity #CyberCrime #IoT #CyberSWAT | https://t.co/X078BfUfmF
Somewhere in UK CyberSpace 🤓
https://t.co/9S975NNHw9
Following: 21609 - Followers: 25827
December 23, 2017 at 04:29AM via Twitter http://twitter.com/marcoessomba
I have a new follower on Twitter
Arturo Duran
★ Strategic IT Biz. Dev. in Spain & LatAm | BSc (Hons) Astrophysics, MBA | Regional Manager @GovCloud | Cloud BigData IoT IIoT RegTech FinTech HealthIT
Madrid - Buenos Aires
http://t.co/WlsBpxBJ9c
Following: 21813 - Followers: 24649
December 23, 2017 at 04:24AM via Twitter http://twitter.com/ITCloudSpanish
Satori IoT Botnet Exploits Zero-Day to Zombify Huawei Routers
from The Hacker News http://ift.tt/2kJze04
via IFTTT
Anonymous user 8fbf4b
from Google Alert - anonymous http://ift.tt/2l07i7u
via IFTTT
Christmas Cards From Anonymous
from Google Alert - anonymous http://ift.tt/2kHkdMo
via IFTTT
Grey Sheeters Anonymous
from Google Alert - anonymous http://ift.tt/2l1ndlO
via IFTTT
Phaethon s Brood
Friday, December 22, 2017
Alcoholics anonymous meetings
from Google Alert - anonymous http://ift.tt/2zii4uK
via IFTTT
Narcotics Anonymous
from Google Alert - anonymous http://ift.tt/2BEymnR
via IFTTT
Make this anonymous inner class a lambda example
from Google Alert - anonymous http://ift.tt/2phxhg2
via IFTTT
"Christmas Cards From Anonymous" To The Homeless
from Google Alert - anonymous http://ift.tt/2DvDAjf
via IFTTT
Anonymous Noise
from Google Alert - anonymous http://ift.tt/2BA1lJn
via IFTTT
Blocking calls from anonymous callers
from Google Alert - anonymous http://ift.tt/2kFsa4D
via IFTTT
Anonymous donor contributes gold coin to Moline Red Kettle
from Google Alert - anonymous http://ift.tt/2BY3ez8
via IFTTT
Ravens admit protest is one factor for "noticeable" no-shows at home games, in letter to fans (ESPN)
via IFTTT
Chinese Man Gets 5-Year Prison for Running 'Unauthorized' VPN Service
from The Hacker News http://ift.tt/2CZv2zN
via IFTTT
Anonymous ddos tool 2016 download
from Google Alert - anonymous http://ift.tt/2Du82u5
via IFTTT
Chrome ig story anonymous
from Google Alert - anonymous http://ift.tt/2kHheTZ
via IFTTT
ISS Daily Summary Report – 12/21/2017
from ISS On-Orbit Status Report http://ift.tt/2pbRJyV
via IFTTT
suggestion for anonymous report feedback
from Google Alert - anonymous http://ift.tt/2kXYejC
via IFTTT
Action on anonymous/pseudonymous complaints
from Google Alert - anonymous http://ift.tt/2paMDmx
via IFTTT
Is ko fi anonymous
from Google Alert - anonymous http://ift.tt/2paVPaE
via IFTTT
Anonymous cgi proxy
from Google Alert - anonymous http://ift.tt/2BP1Fkx
via IFTTT
I have a new follower on Twitter
CompSecGlobal.com
Since '04 we've been providing the best Computer Security Solutions for home & business. Let us find the correct solutions for you. #AV #Backup #Firewall
Colorado, USA
https://t.co/Ia5LAObSdS
Following: 3933 - Followers: 4709
December 22, 2017 at 04:34AM via Twitter http://twitter.com/CompSecGlobal
I have a new follower on Twitter
LabCo NYC
Technology incubator in NYC
New York, NY
https://t.co/d6f9mCybWm
Following: 3192 - Followers: 3590
December 22, 2017 at 04:19AM via Twitter http://twitter.com/labco_nyc
Beware of Cryptocurrency Mining Virus Spreading Through Facebook Messenger
from The Hacker News http://ift.tt/2kXxPCc
via IFTTT
Nissan Finance Canada Suffers Data Breach — Notifies 1.13 Million Customers
from The Hacker News http://ift.tt/2kV4clh
via IFTTT
Gemini s Meteors
Moon Phase and Libration, 2018
from NASA's Scientific Visualization Studio: Most Popular
via IFTTT
Thursday, December 21, 2017
Sexaholics anonymous
from Google Alert - anonymous http://ift.tt/2pacmLX
via IFTTT
This Just In: Ravens WR Jeremy Maclin (knee) likely out Saturday vs. Colts (ESPN)
via IFTTT
BofA CEO on Bitcoin: Is Anonymous Currency Wanted?
from Google Alert - anonymous http://ift.tt/2Bhw5ea
via IFTTT
Ravens: WR Jeremy Maclin (knee) could be game-time decision, says John Harbaugh (ESPN)
via IFTTT
v/ - We have a 10 dollar donation from anonymous
from Google Alert - anonymous http://ift.tt/2BwEGh9
via IFTTT
Apple Admits Deliberately Slowing Older iPhones — Here’s Why
from The Hacker News http://ift.tt/2pa6YbM
via IFTTT
ISS Daily Summary Report – 12/20/2017
from ISS On-Orbit Status Report http://ift.tt/2p4x1AO
via IFTTT
Hackers Targeting Servers Running Database Services for Mining Cryptocurrency
from The Hacker News http://ift.tt/2CRHce7
via IFTTT
Tax Fears? Anonymous Cryptos Dash, Zcash and Monero Surge in Korea
from Google Alert - anonymous http://ift.tt/2Btnl8P
via IFTTT
Solstice Sun and Milky Way
Incredible Solar Flare, Prominence Eruption and CME Event (SDO/HMI visible light)
from NASA's Scientific Visualization Studio: Most Recent Items http://ift.tt/2BTqMoN
via IFTTT
Wednesday, December 20, 2017
Anonymous Donor Gifts Shopping Spree To Girl With Special Needs
from Google Alert - anonymous http://ift.tt/2kQHsTi
via IFTTT
ECCNA.eu
from Google Alert - anonymous http://ift.tt/2kxcroj
via IFTTT
Anonymous user 5cd12d
from Google Alert - anonymous http://ift.tt/2Djn1qm
via IFTTT
One Less Gun: Anonymous Tip Leads to the Recovery of Large Caliber Revolver and Ammunition ...
from Google Alert - anonymous http://ift.tt/2p0yZCm
via IFTTT
Anonymous - Chef
from Google Alert - anonymous http://ift.tt/2Dj7Ygn
via IFTTT
Orioles: The time to trade Manny Machado is now - Eddie Matz (ESPN)
via IFTTT
Forums
from Google Alert - anonymous http://ift.tt/2BoyDuY
via IFTTT
Anonymous user cd6617
from Google Alert - anonymous http://ift.tt/2kuhB4b
via IFTTT
Anonymous external attack v2 download
from Google Alert - anonymous http://ift.tt/2kR8MAM
via IFTTT
Romanian Police Arrest 5 People for Spreading CTB Locker and Cerber Ransomware
from The Hacker News http://ift.tt/2BnwtvM
via IFTTT
TheDjinnnn - ️Alcoholics Anonymous ️
from Google Alert - anonymous http://ift.tt/2z5dlfQ
via IFTTT
Orioles will remove Manny Machado from trade block if offers don't improve by Thursday, says GM Dan Duquette (ESPN)
via IFTTT
MLB: Orioles RP Zach Britton out at least 6 months after rupturing Achilles tendon in workout - The Athletic (ESPN)
via IFTTT
ISS Daily Summary Report – 12/19/2017
from ISS On-Orbit Status Report http://ift.tt/2BQP7M0
via IFTTT
I have a new follower on Twitter
Immo & Finance
Veille sur la Finance, l'immobilier, le patrimoine et la défiscalisation. 10 d’expérience en conseil financier auprès des part. et des CGP. Dad, Golf & Tennis
Following: 13071 - Followers: 19263
December 20, 2017 at 10:14AM via Twitter http://twitter.com/GaspardRousseau
Anonymous user eb1baa
from Google Alert - anonymous http://ift.tt/2z57YNK
via IFTTT
na meeting attendance card
from Google Alert - anonymous http://ift.tt/2Bln87v
via IFTTT
How to receive money anonymously online
from Google Alert - anonymous http://ift.tt/2z4XVIH
via IFTTT
Greedy North Korean Hackers Targeting Cryptocurrencies and Point-of-Sale Terminals
from The Hacker News http://ift.tt/2z59b7P
via IFTTT
I have a new follower on Twitter
WisePops
WisePops is a conversion tool used by 2,000+ ecommerce and other websites to grow their email list, and promote important events (coupons, sales, new releases)
http://t.co/96V9uAqMi7
Following: 2262 - Followers: 3453
December 20, 2017 at 07:34AM via Twitter http://twitter.com/TheWisePops
I have a new follower on Twitter
AssetScan
AssetScan, a complete platform of hardware, software & data analytic services makes it easy for OEMs to connect products to the Industrial #IoT.
Eden Prairie, MN
https://t.co/vep4UcElht
Following: 11644 - Followers: 26051
December 20, 2017 at 05:50AM via Twitter http://twitter.com/ATEKAssetScan
Cache rebuild. Serve a SuperCache file to anonymous users while a new file is be
from Google Alert - anonymous http://ift.tt/2BEVtLI
via IFTTT
Hidden Backdoor Found In WordPress Captcha Plugin Affects Over 300,000 Sites
from The Hacker News http://ift.tt/2B95508
via IFTTT
[DECISION] Should we allow Anonymous Closures in Lambdas?
from Google Alert - anonymous http://ift.tt/2kr7SeW
via IFTTT
I have a new follower on Twitter
TankScan®
TankScan® wireless tank monitoring lets customers check fluid levels in multiple tanks, across multiple sites, and save up to 30% on deliveries and collections.
Eden Prairie, MN
https://t.co/pYq2qEKeiX
Following: 8856 - Followers: 10801
December 20, 2017 at 04:25AM via Twitter http://twitter.com/ATEKTankScan
Tuesday, December 19, 2017
View Forum - CosmoCoffee
from Google Alert - anonymous http://ift.tt/2D8sxwd
via IFTTT
Anonymous woman shopping in Internet
from Google Alert - anonymous http://ift.tt/2oTgeRi
via IFTTT
Ravens: LB Terrell Suggs, S Eric Weddle and LB C.J. Mosley named to 2018 Pro Bowl (ESPN)
via IFTTT
Chicago Sun-Times, Mark Brown: Homeless memorial service honors anonymous lives
from Google Alert - anonymous http://ift.tt/2D6sroJ
via IFTTT
Talk Back with Yik Yak? Exploring User Engagement via Anonymous Social Media in an Academic ...
from Google Alert - anonymous http://ift.tt/2yYYxQb
via IFTTT
Allow Anonymous Grading to be the default in SpeedGrader
from Google Alert - anonymous http://ift.tt/2BKnJPx
via IFTTT
Emotions Anonymous is returning to the QC
from Google Alert - anonymous http://ift.tt/2yYr5JA
via IFTTT
[FD] ESA-2017-157: EMC Data Domain DD OS Memory Overflow Vulnerability
Source: Gmail -> IFTTT-> Blogger
[FD] ESA-2017-161: EMC Isilon OneFS NFS Export Security Setting Fallback Vulnerability
Source: Gmail -> IFTTT-> Blogger
[FD] [SYSS-2017-027] Microsoft Windows Hello Face Authentication - Authentication Bypass by Spoofing (CWE-290)
Source: Gmail -> IFTTT-> Blogger
[FD] SSD Advisory – Huawei P8 wkupccpu debugfs Kernel Buffer Overflow
Source: Gmail -> IFTTT-> Blogger
[FD] Google supported XSS kit aka AdExchange iframe buster kit
Source: Gmail -> IFTTT-> Blogger
[FD] Multiple Vulnerabilities in TP-Link TL-SG108E - CVE-2017-17745, CVE-2017-17746, CVE-2017-17747
Source: Gmail -> IFTTT-> Blogger
Re: [FD] [oss-security] CVE-2017-17670: vlc: type conversion vulnerability
Source: Gmail -> IFTTT-> Blogger
[FD] DefenseCode ThunderScan SAST Advisory: WordPress Booking Calendar Multiple Security Vulnerabilities
Source: Gmail -> IFTTT-> Blogger
Re: [FD] CVE-2017-15944: Palo Alto Networks firewalls remote root code execution
Source: Gmail -> IFTTT-> Blogger
[FD] DefenseCode ThunderScan SAST Advisory: WordPress Clean Up Optimizer Plugin Security Vulnerability
Source: Gmail -> IFTTT-> Blogger
[FD] DefenseCode ThunderScan SAST Advisory: WordPress Top-10 Plugin SQL Injection Security Vulnerability
Source: Gmail -> IFTTT-> Blogger
[FD] [CVE-2017-17704] Broken Cryptography in iStar Ultra & IP ACM by Software House
Source: Gmail -> IFTTT-> Blogger
[FD] [CFP] Security BSides Ljubljana 0x7E2
Source: Gmail -> IFTTT-> Blogger
LINK BACK PARTICIPANTS TO ATTRIBUTES IN Anonymous SURVEY
from Google Alert - anonymous http://ift.tt/2yYno6r
via IFTTT
Why Do People Give Anonymous Donations?
from Google Alert - anonymous http://ift.tt/2BdrwWa
via IFTTT
CHRISTEENE & Peaches on cruising, anonymous sex and new video Aktion Toilet
from Google Alert - anonymous http://ift.tt/2yY9e5q
via IFTTT
↔ Ravens remain No. 12 in Week 16 NFL Power Rankings (ESPN)
via IFTTT
ISS Daily Summary Report – 12/18/2017
from ISS On-Orbit Status Report http://ift.tt/2CEtrPY
via IFTTT
Anonymous Mrs. Claus continues wonderful tradition, with dresses for Paint Creek students
from Google Alert - anonymous http://ift.tt/2AZr4Xq
via IFTTT
Best of Nappoholics Anonymous 2017
from Google Alert - anonymous http://ift.tt/2Byvupk
via IFTTT
Anonymous doser
from Google Alert - anonymous http://ift.tt/2D0Jd8K
via IFTTT
Anonymous Minnesota donor puts $200000 check into Salvation Army kett
from Google Alert - anonymous http://ift.tt/2CDiu0U
via IFTTT
wsg/ - attractive girls general
from Google Alert - anonymous http://ift.tt/2BxnDsb
via IFTTT
This New Android Malware Can Physically Damage Your Phone
from The Hacker News http://ift.tt/2oKaRE1
via IFTTT
Kaspersky Lab Sues U.S. Government Over Software Ban
from The Hacker News http://ift.tt/2BcSRYD
via IFTTT
Jupiter Quasi-Quadrennial Oscillation
from NASA's Scientific Visualization Studio: Most Recent Items http://ift.tt/2D0y2gu
via IFTTT
Moon Phase and Libration, 2018
from NASA's Scientific Visualization Studio: Most Recent Items http://ift.tt/2AXwLW0
via IFTTT
Moon Phase and Libration, 2018 South Up
from NASA's Scientific Visualization Studio: Most Recent Items http://ift.tt/2CZs7Ip
via IFTTT
Monday, December 18, 2017
App for Anonymous Cart Abandonment
from Google Alert - anonymous http://ift.tt/2kKB3cm
via IFTTT
BDN quotes Socolow in article on anonymous Maine 'news' websites
from Google Alert - anonymous http://ift.tt/2CWmHhb
via IFTTT
I have a new follower on Twitter
Response Labs
A Digital CRM and product development company providing strategic digital services that help businesses realize their brand’s full online potential.
Baltimore | St. Paul | Seattle
http://t.co/IMM2mDNBSn
Following: 9646 - Followers: 10824
December 18, 2017 at 10:00PM via Twitter http://twitter.com/ResponseLabs
I have a new follower on Twitter
David Orren
Business Coach to ambitious Innovation & Technology companies.
Reading, London
Following: 1801 - Followers: 1846
December 18, 2017 at 09:25PM via Twitter http://twitter.com/DavidExecCoach
I have a new follower on Twitter
Rob Thompson
Sales Training ♦ Sales Consultant ♦ Sales Coaching ♦ Speaker https://t.co/MOI4sLxp7G
Houston, TX
https://t.co/btqLfmZbfj
Following: 11547 - Followers: 13127
December 18, 2017 at 08:35PM via Twitter http://twitter.com/TruCoreBD
I have a new follower on Twitter
Cassandra Frangos
Passion for innovation and #disruptiveleadership. Head of Global Executive Talent @ Cisco.
Boston MA
https://t.co/96H4x16nD0
Following: 10070 - Followers: 15975
December 18, 2017 at 07:25PM via Twitter http://twitter.com/c_frangos
I have a new follower on Twitter
Matthew VanDyke
Founder, Sons of Liberty International, #veterans providing free military training for local forces fighting #ISIS. Nonprofit 501c3 org https://t.co/wZQtkfBLOm
Washington, DC and Iraq
http://t.co/ugpMBatNLB
Following: 177865 - Followers: 201138
December 18, 2017 at 07:10PM via Twitter http://twitter.com/Matt_VanDyke
Business development sales executive in East London
from Google Alert - anonymous http://ift.tt/2kK0evE
via IFTTT
Dad-of-four murdered wife and hanged himself after anonymous letter revealed she was having affair
from Google Alert - anonymous http://ift.tt/2BwjLI2
via IFTTT
I have a new follower on Twitter
Keith Krach
Chairman & former CEO @DocuSign Previously Founder, Chairman/CEO @SAPAriba; Chairman @AngiesList; Chairman, Board of Trustees of Purdue. @SigmaChi. Entrepreneur
San Francisco, California
https://t.co/cDbz8y5FsQ
Following: 28514 - Followers: 50979
December 18, 2017 at 01:25PM via Twitter http://twitter.com/KeithJKrach
Keras and deep learning on the Raspberry Pi
Today’s blog post is the most fun I’ve EVER had writing a PyImageSearch tutorial.
It has everything we have been discussing the past few weeks, including:
- Deep learning
- Raspberry Pis
- 3D Christmas trees
- References to HBO’s Silicon Valley “Not Hotdog” detector
- Me dressing up as Santa Clause!
In keeping with the Christmas and Holiday season, I’ll be demonstrating how to take a deep learning model (trained with Keras) and then deploy it to the Raspberry Pi.
But this isn’t any machine learning model…
This image classifier has been specifically trained to detect if Santa Claus is in our video stream.
And if we do detect Santa Claus…
Well. I won’t spoil the surprise (but it does involve a 3D Christmas tree and a jolly tune).
Enjoy the tutorial. Download the code. Hack with it.
And most of all, have fun!
Looking for the source code to this post?
Jump right to the downloads section.
Keras and deep learning on the Raspberry Pi
Today’s blog post is a complete guide to running a deep neural network on the Raspberry Pi using Keras.
I’ve framed this project as a Not Santa detector to give you a practical implementation (and have some fun along the way).
In the first part of this blog post, we’ll discuss what a Not Santa detector is (just in case you’re unfamiliar with HBO’s Silicon Valley “Not Hotdog” detector which has developed a cult following).
We’ll then configure our Raspberry Pi for deep learning by installing TensorFlow, Keras, and a number of other prerequisites.
Once our Raspberry Pi is configured for deep learning we’ll move on to building a Python script that can:
- Load our Keras model from disk
- Access our Raspberry Pi camera module/USB webcam
- Apply deep learning to detect if Santa Clause is in the frame
- Access our GPIO pins and play music if Santa is detected
These are my favorite types of blog posts to write here on PyImageSearch as they integrate a bunch of techniques we’ve discussed, including:
- Deep learning on the Raspberry Pi
- Accessing your Raspberry Pi camera module/USB webcam
- Working with GPIO + computer on the Raspberry Pi
Let’s get started!
What is a Not Santa detector?
A Not Santa detector is a play off HBO’s Silicon Valley where the characters create a smartphone app that can determine if an input photo is a “hot dog” or is “not a hot dog”:
The show is clearly poking fun at the Silicon Valley startup culture in the United States by:
- Preying on the hype of machine learning/deep learning
- Satirically remaking on the abundance of smartphone applications that serve little purpose (but the creators are convinced their app will “change the world”)
I decided to have some fun myself.
Today we are creating a Not Santa detector that will detect if Santa Claus is in an image/video frame.
For those unfamiliar with Santa Claus (or simply Santa” for short), he is a jolly, portly, white-bearded, fictional western culture figure who delivers presents to boys and girls while they sleep Christmas Eve
However, this application is not totally just for fun and satire!
We’ll be learning some practical skills along the way, including how to:
- Configure your Raspberry Pi for deep learning
- Install Keras and TensorFlow on your Raspberry Pi
- Deploy a pre-trained Convolutional Neural Network (with Keras) to your Raspberry Pi
- Perform a given action once a positive detection has occurred
But before we can write a line of code, let’s first review the hardware we need.
What hardware do I need?
In order to follow along exactly with this tutorial (with no modifications) you’ll need:
- A Raspberry Pi 3 (or the Raspberry Pi 3 Starter Kit which I also highly recommend)
- A Raspberry Pi camera module or a USB camera. For the purposes of this tutorial, I went with the Logitech C920 as it’s a great camera for the price (and having a USB cable gives you a bit of extra room to work with versus the short ribbon on the Pi camera)
- The 3D Christmas Tree for the Raspberry Pi (designed by Rachel Rayns)
- A set of speakers — I recommend these from Pi Hut, the stereo speakers from Adafruit, or if you’re looking for something small that still packs a punch, you could get this speaker from Amazon
Of course, you do not need all these parts.
If you have just a Raspberry Pi + camera module/USB camera you’ll be all set (but you will have to modify the code so it doesn’t try to access the GPIO pins or play music via the speakers).
Your setup should look similar to mine in Figure 2 above where I have connected my speakers, 3D Christmas Tree, and webcam (not pictured as it’s off camera).
I would also recommend hooking up an HDMI monitor + keyboard to test your scripts and debug them:
In the image above, you can see my Raspberry Pi, HDMI, keyboard, and Christmas critter friends keeping me company while I put together today’s tutorial.
How do I install TensorFlow and Keras on the Raspberry Pi?
Last week, we learned how to train a Convolutional Neural Network using Keras to determine if Santa was in an input image.
Today, we are going to take the pre-trained model and deploy it to the Raspberry Pi.
As I’ve mentioned before, the Raspberry Pi is not suitable for training a neural network (outside of “toy” examples). However, the Raspberry Pi can be used to deploy a neural network once it has already been trained (provided the model can fit into a small enough memory footprint, of course).
I’m going to assume you have already installed OpenCV on your Raspberry Pi.
If you have not installed OpenCV on your Raspberry Pi, start by using this tutorial where I demonstrate how to optimize your Raspberry Pi + OpenCV install for speed (leading to a 30%+ increase in performance).
Note: This guide will not work with Python 3 — you’ll instead need to use Python 2.7. I’ll explain why later in this section. Take the time now to configure your Raspberry Pi with Python 2.7 and OpenCV bindings. In Step #4 of the Raspberry Pi + OpenCV installation guide, be sure to make a virtual environment with the
-p python2switch.
From there, I recommend increasing the swap space on your Pi. Increasing the swap will enable you to use the Raspberry Pi SD card for additional memory (a critical step when trying to compile and install large libraries on the memory-limited Raspberry Pi).
To increase your swap space, open up
/etc/dphys-swapfileand then edit the
CONF_SWAPSIZEvariable:
# set size to absolute value, leaving empty (default) then uses computed value # you most likely don't want this, unless you have a special disk situation # CONF_SWAPSIZE=100 CONF_SWAPSIZE=1024
Notice that I am increasing the swap from 100MB to 1024MB.
From there, restart the swap service:
$ sudo /etc/init.d/dphys-swapfile stop $ sudo /etc/init.d/dphys-swapfile start
Note: Increasing swap size is a great way to burn out your memory card, so be sure to revert this change and restart the swap service when you’re done. You can read more about large sizes corrupting memory cards here.
Now that your swap size has been increased, let’s get started configuring our development environment.
To start, create a Python virtual environment named
not_santausing Python 2.7 (I’ll explain why Python 2.7 once we get to the TensorFlow install command):
$ mkvirtualenv not_santa -p python2
Notice here how the
-pswitch points to
python2, indicating that Python 2.7 will be used for the virtual environment.
If you are new to Python virtual environments, how they work, and why we use them, please refer to this guide to help get you up to speed as well as this excellent virtualenv primer from RealPython.
You’ll also want to make sure you have sym-linked your
cv2.sobindings into your
not_santavirtual environment (if you have not done so yet):
$ cd ~/.virtualenvs/not_santa/lib/python2.7/site-packages $ ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
Again, make sure you have compiled OpenCV with Python 2.7 bindings. You’ll want to double-check your path to your
cv2.sofile as well, just in case your install path is slightly different than mine.
If you compiled Python 3 + OpenCV bindings, created the sym-link, and then tried to
import cv2into your Python shell, you will get a confusing traceback saying that the import failed.
Important: For these next few pip commands, be sure that you’re in the
not_santaenvironment (or your Python environment of choice), otherwise you’ll be installing the packages to your Raspberry Pi’s system Python.
To enter the environment simply use the
workoncommand at the bash prompt:
$ workon not_santa
From there, you’ll see “
(not_santa)” at the beginning of your bash prompt.
Ensure you have NumPy installed in the
not_santaenvironment using the following command:
$ pip install numpy
Since we’ll be accessing the GPIO pins for this project we’ll need to install both RPi.GPIO and gpiozero:
$ sudo pip install RPi.GPIO gpiozero
We are now ready to install TensorFlow on your Raspberry Pi.
The problem is that there is not an official (Google released) TensorFlow distribution.
We can follow the long, arduous, painful process of compiling TensorFlow from scratch on the Raspberry Pi…
Or we can use the pre-compiled binaries created Sam Abrahams (published on GitHub).
The problem is that there are only two types of pre-compiled TensorFlow binaries:
- One for Python 2.7
- And another for Python 3.4
The Raspbian Stretch distribution (the latest release of the Raspbian operating system at the time of this writing) ships with Python 3.5 — we, therefore, have a version mismatch.
To avoid any headaches between Python 3.4 and Python 3.5, I decided to stick with the Python 2.7 install.
While I would have liked to use Python 3 for this guide, the install process would have become more complicated (I could easily write multiple posts on installing TensorFlow + Keras on the Raspberry Pi, but since installation is not the main focus of this tutorial, I decided to keep it more straightforward).
Let’s go ahead and install TensorFlow for Python 2.7 using the following commands:
$ wget http://ift.tt/2rDmlFT $ pip install tensorflow-1.1.0-cp27-none-linux_armv7l.whl
Note: You will need to expand the code block above to copy the full URL. I recommend pressing the “<>” button before you copy the commands.
Once TensorFlow compiles and installs (which took around an hour on my Raspberry Pi) you’ll need to install HDF5 and h5py. These libraries will allow us to load our pre-trained model from disk:
$ sudo apt-get install libhdf5-serial-dev $ pip install h5py
I Install HDF5 + h5py without the
timecommand running so I can’t remember the exact amount of time it took to install, but I believe it was around 30-45 minutes.
And finally, let’s install Keras and the other prerequisites required for this project:
$ pip install pillow imutils $ pip install scipy --no-cache-dir $ pip install keras
The SciPy install in particular will take a few hours so make sure you let the install run overnight/while you’re at work.
To test your configuration, open up a Python shell (while in the
not_santaenvironment) and execute the following commands:
$ workon not_santa $ python >>> import h5py >>> from gpiozero import LEDBoard >>> from gpiozero.tools import random_values >>> import cv2 >>> import imutils >>> import keras Using TesnsorFlow backend. >>> print("OpenCV version: {}".format(cv2.__version__)) '3.3.1' >>> print("Keras version: {}".format(keras.__version__)) '2.0.8' >>> exit()
If all goes as planned you should see Keras imported using the TensorFlow backend.
As the output above demonstrates, you should also double-check that your OpenCV bindings (
cv2) can be imported as well.
Finally, don’t forget to reduce your swap size from 1024MB back down to 100MB by:
- Opening up
/etc/dphys-swapfile
. - Resetting
CONF_SWAPSIZE
to 100MB. - Restarting the swap service (as we discussed earlier in this post).
As mentioned in the note above, setting your swap size back to 100MB is important for memory card longevity. If you skip this step, you may encounter memory corruption issues and a decreased lifespan of the card.
Running a Keras + deep learning model on the Raspberry Pi
We are now ready to code our Not Santa detector using Keras, TensorFlow, and the Raspberry Pi.
Again, I’ll be assuming you have the same hardware setup as I do (i.e., 3D Christmas Tree and speakers) so if your setup is different you’ll need to hack up the code below.
To get started, open a new file, name it
not_santa_detector.py, and insert the following code:
# import the necessary packages from keras.preprocessing.image import img_to_array from keras.models import load_model from gpiozero import LEDBoard from gpiozero.tools import random_values from imutils.video import VideoStream from threading import Thread import numpy as np import imutils import time import cv2 import os
Lines 2-12 handle our imports, notably:
-
keras
is used to preprocess input frames for classification and to load our pre-trained model from disk. -
gpiozero
is used to access the 3D Christmas tree. -
imutils
is used to access the video stream (whether Raspberry Pi camera module or USB). -
threading
is used for non-blocking operations, in particular when we want to light the Christmas tree or play music while not blocking execution of the main thread.
From there, we’ll define a function to light our 3D Christmas tree:
def light_tree(tree, sleep=5): # loop over all LEDs in the tree and randomly blink them with # varying intensities for led in tree: led.source_delay = 0.1 led.source = random_values() # sleep for a bit to let the tree show its Christmas spirit for # santa clause time.sleep(sleep) # loop voer the LEDs again, this time turning them off for led in tree: led.source = None led.value = 0
Our
light_treefunction accepts a
treeargument (which is assumed be an
LEDBoardobject).
First, we loop over all LEDs in the
treeand randomly light each of the LEDs to create a “twinkling” effect (Lines 17-19).
We leave the lights on for a period of time for some holiday spirit (Line 23) and then we loop over the LEDs again, this time turning them off (Lines 26-28).
An example of the 3D Christmas tree lights turned on can be seen below:
Our next function handles playing music when Santa is detected:
def play_christmas_music(p): # construct the command to play the music, then execute the # command command = "aplay -q {}".format(p) os.system(command)
In the
play_christmas_musicfunction, we make a system call to the
aplaycommand which enables us to play a music file as we would from the command line.
Using the
os.systemcall is a bit of a hack, but playing the audio file via pure Python (using a library such as Pygame) is overkill for this project.
From there, let’s hardcode the configurations we’ll use:
# define the paths to the Not Santa Keras deep learning model and # audio file MODEL_PATH = "santa_not_santa.model" AUDIO_PATH = "jolly_laugh.wav" # initialize the total number of frames that *consecutively* contain # santa along with threshold required to trigger the santa alarm TOTAL_CONSEC = 0 TOTAL_THRESH = 20 # initialize is the santa alarm has been triggered SANTA = False
Lines 38 and 39 hardcode paths to our pre-trained Keras model and audio file. Be sure to use the “Downloads” section of this blog post to grab the files.
We also initialize parameters used for detection which include
TOTAL_CONSECand
TOTAL_THRESH. These two values represent the number of frames containing Santa and the threshold at which we’ll both play music and turn on the tree respectively (Lines 43 and 44).
The last initialization is
SANTA = False, a boolean (Line 47). We’ll use the
SANTAvariable later in the script as a status flag to aid in our logic.
Next, we’ll load our pre-trained Keras model and initialize our Christmas tree:
# load the model print("[INFO] loading model...") model = load_model(MODEL_PATH) # initialize the christmas tree tree = LEDBoard(*range(2, 28), pwm=True)
Keras allows us to save models to disk for future use. Last week, we saved our Not Santa model to disk and this week we’re going to load it up on our Raspberry Pi. We load the model on Line 51 with the Keras
load_modelfunction.
Our
treeobject is instantiated on Line 54. As shown,
treeis an
LEDBoardobject from the
gpiozeropackage.
Now we’ll initialize our video stream:
# initialize the video stream and allow the camera sensor to warm up print("[INFO] starting video stream...") vs = VideoStream(src=0).start() # vs = VideoStream(usePiCamera=True).start() time.sleep(2.0)
To access the camera, we’ll use
VideoStreamfrom my imutils package (you can find the documentation to VideoStream here) on either Line 58 or 59.
Important: If you’d like to use the PiCamera module (instead of a USB camera) for this project, simply comment Line 58 and uncomment Line 59.
We
sleepfor a brief 2 seconds so our camera can warm up (Line 60) before we begin looping over the frames:
# loop over the frames from the video stream while True: # grab the frame from the threaded video stream and resize it # to have a maximum width of 400 pixels frame = vs.read() frame = imutils.resize(frame, width=400)
On Line 63 we start looping over video frames until the stop condition is met (shown later in the script).
First, we’ll grab a
frameby calling
vs.read(Line 66).
Then we resize
frameto
width=400, maintaining the aspect ratio (Line 67). We’ll be preprocessing this
frameprior to sending it through our neural network model. Later on we’ll be displaying the frame to the screen along with a text label.
From there let’s preprocess the image and pass it through our Keras + deep learning model for prediction:
# prepare the image to be classified by our deep learning network image = cv2.resize(frame, (28, 28)) image = image.astype("float") / 255.0 image = img_to_array(image) image = np.expand_dims(image, axis=0) # classify the input image and initialize the label and # probability of the prediction (notSanta, santa) = model.predict(image)[0] label = "Not Santa" proba = notSanta
Lines 70-73 preprocess the
imageand prepare it for classification. To learn more about preprocessing for deep learning, be sure to check out the Starter Bundle of my latest book, Deep Learning for Computer Vision with Python.
From there, we query
model.predictwith our
imageas the argument. This sends the
imagethrough the neural network, returning a tuple containing class probabilities (Line 77).
We initialize the
labelto “Not Santa” (we’ll revisit
labellater) and the probability,
proba, to the value of
notSantaon Lines 78 and 79.
Let’s check to see if Santa is in the image:
# check to see if santa was detected using our convolutional # neural network if santa > notSanta: # update the label and prediction probability label = "Santa" proba = santa # increment the total number of consecutive frames that # contain santa TOTAL_CONSEC += 1
On Line 83 we check if the probability of
santais greater than
notSanta. If that is the case, we proceed to update the
labeland
probafollowed by incrementing
TOTAL_CONSEC(Lines 85-90).
Provided enough consecutive “Santa” frames have passed, we need to trigger the Santa alarm:
# check to see if we should raise the santa alarm if not SANTA and TOTAL_CONSEC >= TOTAL_THRESH: # indicate that santa has been found SANTA = True # light up the christmas tree treeThread = Thread(target=light_tree, args=(tree,)) treeThread.daemon = True treeThread.start() # play some christmas tunes musicThread = Thread(target=play_christmas_music, args=(AUDIO_PATH,)) musicThread.daemon = False musicThread.start()
We have two actions to perform if
SANTAis
Falseand if the
TOTAL_CONSEChits the
TOTAL_THRESHthreshold:
- Create and start a
treeThread
to twinkle the Christmas tree lights (Lines 98-100). - Create and start a
musicThread
to play music in the background (Lines 103-106).
These threads will run independently without stopping the forward execution of the script (i.e., a non-blocking operation).
You can also see that, on Line 95, we set our
SANTAstatus flag to
True, implying that we have found Santa in the input frame. In the next pass of the loop, we’ll be looking at this value as we did on Line 93.
Otherwise (
SANTAis
Trueor the
TOTAL_THRESHis not met), we reset
TOTAL_CONSECto zero and
SANTAto
False:
# otherwise, reset the total number of consecutive frames and the # santa alarm else: TOTAL_CONSEC = 0 SANTA = False
Finally, we display the frame to our screen with the generated text label:
# build the label and draw it on the frame label = "{}: {:.2f}%".format(label, proba * 100) frame = cv2.putText(frame, label, (10, 25), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 0), 2) # show the output frame cv2.imshow("Frame", frame) key = cv2.waitKey(1) & 0xFF # if the `q` key was pressed, break from the loop if key == ord("q"): break # do a bit of cleanup print("[INFO] cleaning up...") cv2.destroyAllWindows() vs.stop()
The probability value is appended to the
labelcontaining either “Santa” or “Not Santa” (Line 115).
Then using OpenCV’s
cv2.putText, we can write the label (in Christmas-themed green) on the top of the frame before we display the frame to the screen (Lines 116-120).
The exit condition of our infinite while loop is when the ‘q’ key is pressed on the keyboard (Lines 121-125).
If the loop’s exit condition is met, we
breakand perform some cleanup on Lines 129 and 130 before the script itself exits.
That’s all there is to it. Take a look back at the 130 lines we reviewed together — this framework/template can easily be used for other deep learning projects on the Raspberry Pi as well.
Now let’s catch that fat, bearded, jolly man on camera!
Deep learning + Keras + Raspberry Pi results
In last week’s blog post we tested our Not Santa deep learning model using stock images gathered from the web.
But that’s no fun — and certainly not sufficient for this blog post.
I’ve always wanted to dress up like good ole’ St. Nicholas, so I ordered a cheap Santa Claus costume last week:
I’m a far cry from the real Santa, but the costume should do the trick.
I then pointed my camera attached to the Raspberry Pi at the Christmas tree in my apartment:
If Santa comes by to put out some presents for the good boys and girls I want to make sure he feels welcome by twinkling the 3D Christmas tree lights and playing some Christmas tunes.
I then started the Not Santa deep learning + Keras detector using the following command:
$ python not_santa_detector.py
To follow along, make sure you use “Downloads” section below to download the source code + pre-trained model + audio file used in this guide.
Once the Not Santa detector was up and running, I slipped into action:
Whenever Santa is detected the 3D Christmas tree lights up and music starts playing! (which you cannot hear since this is a sample GIF animation).
To see the full Not Santa detector (with sound), take a look at the video below:
Whenever Santa enters the scene you’ll see the 3D Christmas tree display turn on followed by a jolly laugh emitting from the Raspberry Pi speakers (audio credit to SoundBible).
Our deep learning model is surprisingly accurate and robust given the small network architecture.
I’ve been good this year, so I’m sure that Santa is stopping at my apartment.
I’m also more confident than I’ve ever been about seeing Santa bring some presents with my Not Santa detector.
Before Christmas, I’ll probably hack this script (with a call to
cv2.imwrite, or better yet, save the video clip) to make sure that I save some frames of Santa to disk, as proof. If it is someone else that puts presents under my tree, I’ll certainly know.
Dear Santa: If you’re reading this, just know that I’ve got my Pi on you!
Summary
In today’s blog post you learned how to run a Keras deep learning model on the Raspberry Pi.
To accomplish this, we first trained our Keras deep learning model to detect if an image contains “Santa” or “Not Santa” on our laptop/desktop.
We then installed TensorFlow and Keras on our Raspberry Pi, enabling us to take our trained deep learning image classifier and then deploy it to our Raspberry Pi. While the Raspberry Pi isn’t suitable for training deep neural networks, it can be used for deploying them — and provided the network architecture is simplistic enough, we can even run our models in real-time.
To demonstrate this, we created a Not Santa detector on our Raspberry Pi that classifies each individual input frame from a video stream.
If Santa is detected, we access our GPIO pins to light up a 3D Christmas tree and play holiday tunes.
What now?
I hope you had fun learning how to build a Not Santa app using deep learning!
If you want to continue studying deep learning and:
- Master the fundamentals of machine learning and neural networks…
- Study deep learning in more detail…
- Train your own Convolutional Neural Networks from scratch…
…then you’ll want to take a look at my new book, Deep Learning for Computer Vision with Python.
Inside my book you’ll find:
- Super practical walkthroughs.
- Hands-on tutorials (with lots of code).
- Detailed, thorough guides to help you replicate state-of-the-art results from popular deep learning publications.
To learn more about my new book (and start your journey to deep learning mastery), just click here.
Otherwise, be sure to enter your email address in the form below to be notified when new deep learning post are published here on PyImageSearch.
Downloads:
The post Keras and deep learning on the Raspberry Pi appeared first on PyImageSearch.
from PyImageSearch http://ift.tt/2kHDY5p
via IFTTT