T3ch Flicks
Published © CC BY-NC-SA

Zombie Detecting Smart Security Owl (Deep Learning)

An owl shaped Raspberry Pi 4GB using deep learning on a camera stream to detect Zombies. :O

IntermediateFull instructions provided3 hours1,249
Zombie Detecting Smart Security Owl (Deep Learning)

Things used in this project

Hardware components

Raspberry Pi 4 Model B
Raspberry Pi 4 Model B
×1

Software apps and online services

OpenCV
OpenCV

Story

Read more

Code

Code snippet #1

Plain text
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 

network={ 
	ssid="MySSID" 
	psk="MyPassword" 
}

Code snippet #2

Plain text
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BOARD)

GPIO.setwarnings(False)

GPIO.setup(12, GPIO.OUT)

p = GPIO.PWM(12, 50)

p.start(7.5)
try:
    while True:
        p.ChangeDutyCycle(7.5)  # 90 degrees
        time.sleep(1)
        p.ChangeDutyCycle(2.5)  # 0 degrees
        time.sleep(1)
        p.ChangeDutyCycle(12.5) # 180 degrees
        time.sleep(1)
except KeyboardInterrupt:
    p.stop()
    GPIO.cleanup()

Code snippet #3

Plain text
import subprocess

command = "omxplayer -o alsa:hw:1,0 owl_sound.mp3 --vol 500"

player = subprocess.Popen(command.split(' '), 
                            stdin=subprocess.PIPE, 
                            stdout=subprocess.PIPE, 
                            stderr=subprocess.PIPE
                          )

Code snippet #4

Plain text
import requests 

payload = {
          "app_key": "APP_KEY",
          "app_secret": "APP_SECRET",
          "target_type": "app",
          "content": "Owl has detected a zombie."
          }

r = requests.post("https://api.pushed.co/1/push", data=payload)

Gitlab

https://gitlab.com/t3chflicks/cctv-owl

Credits

T3ch Flicks

T3ch Flicks

7 projects • 59 followers

Comments