项目作者: mayorquinmachines

项目描述 :
A smart dog vest connected to a cellular network, collecting biometrics, and performing YOLO object recognition
高级语言: Python
项目地址: git://github.com/mayorquinmachines/PoochPak.git
创建时间: 2018-01-01T23:58:43Z
项目社区:https://github.com/mayorquinmachines/PoochPak

开源协议:

下载


Project: PoochPak

  • Home security systems may be vulnerable where stationary webcam coverage is weak.
  • Access to real-time GPS data may help retrieve a lost pet.
  • K9 Rescue and Security operations may benefit from object recognition algorithms or environmental sensors.

Deploy your own furry minions! The PoochPak leverages the special abilities/perspective of dogs for a ‘poochies-in-the-loop’ system to collect and execute logic based on audio/visual and biometric cues.
Thanks to PiSimo’s repo for the YOLO code to run on raspbian.

This repo is a spinoff of the same project using a drone! Check it
out!

Here
is a link to the contest entry on hackster.io for more info.

PoochPak

Hardware

Software

Requirements:

Wiring the Sensors

Here is a diagram showcasing how the temperature, pulse, and accelerometer sensors should be wired. We wired all these
sensors to a small pcb board for more reliable connections while the vest is worn. You should connect the Hologram Nova
via a usb port (for the zero we used a microusb to usb converter). You should also connect the pi camera using the mini
camera ribbon.
Wiring

Install

Compatibility between project dependencies requires python3.4 as default python3. You should burn
this specific
image for your raspberry pi zero.
After making this image and wiring the pi, boot up and go through the first-time boot configuration.
You should make sure to:

  • Under Advanced Options, Expand filesystem
  • Under Localization Options change timezone
  • Change User password
  • Under Interfacing Options, enable ssh, camera, SPI, IC2, and Serial

After a reboot, git clone this repo

  1. cd ~/
  2. git clone https://github.com/mayorquinmachines/PoochPak.git
  3. cd PoochPak

Run the install script to install all dependencies. Note: This will take a long time! Leave it running overnight.

  1. ./install.sh

Reboot your pi after the install script has finished. Run:

  1. sudo modprobe bcm2835-v4l2
  2. sudo modprobe w1-gpio
  3. sudo modprobe w1-therm

This is just making sure all modules needed to communicate with the sensors are enabled.

Setting up Hologram

To use hologram to send SMS, you’ll need to set up you Hologram Dashboard and activate your sim card.
Here is the Hologram starter guide for doing
just that. The install script has handled installing hologram-cli and hologram-python-sdk for you. You can test this
by running

  1. sudo hologram version

Once your sim card is activated and your device shows that it is live in your Dashboard, you want to set up a phone
number you want to send SMS messages to. In your Dashboard, click on your device and navigate to Configuration. From
that page, you’ll want to configure your phone number under Configure phone number. This should set up you Nova to
send SMS messages to this phone number. In this same page, you’ll see + Show Device Key. Clicking on this button
will give you a key you’ll need to authenticate your hologram-python-sdk. You’ll want to create a config file where
you’ll place this key for use. Run the following:

  1. cd ~/PoochPak
  2. touch config.py
  3. echo "DEVICEKEY='<your-key-here>'" >> config.py

Run

Finally, to run the code for object recognition and starting the sensor server, follow the instructions below!

Starting YOLO object recognition

  1. cd yolo_picam/
  2. nohup sudo python3 picam.py &

Starting Server

  1. nohup sudo python poochpak_server.py &

Troubleshooting

If you’re having issues with the Yolo object recognitition script (picam.py) not finding the camera, it could be that
you need to reenable the camera again. Try enabling it again using sudo raspi-config and run sudo modprobe bcm2835-v4l2.

Sometimes the Hologram Nova loses signal. You should make sure that the red LED is lit up and the blue LED is flashing.
Rapid flashing means you’re on the 3G network, slower flashing means 2G network, and no blue light means the Nova isn’t
on a network yet.

If the sensors aren’t working correctly, take a look at the wiring again and make sure everything is correct. Then try
reenabling their modules again:

  1. sudo modprobe w1-gpio #For temp sensor
  2. sudo modprobe w1-therm #For temp sensor
  3. sudo modprobe spi-bcm2708 #For pulse sensor

There are also a script you can run to test all of the sensors. Try running python ~/PoochPak/tests/run_tests.py