Skip to content

Latest commit

 

History

History
173 lines (135 loc) · 9.55 KB

README.md

File metadata and controls

173 lines (135 loc) · 9.55 KB

YoloIP

output image

A RPi 4 / RPi 5 supporting multiple IP surveillance cameras with stand-alone AI.

With live feed, email notification and event-triggered GPIO/URL.

License

Introduction.

YoloIP is a software package running on a Raspberry Pi 4 or 5.
It transforms the RPi into a stand-alone AI-powered monitor.
You can connect multiple commercial surveillance IP cameras to the Raspberry Pi.
A deep learning model detects objects in the camera scene.

You can define what actions YoloIP performs when it recognizes an object.
For instance, send you an email. Or activate one of its GPIO pins.
At the same time, you can view your footage in any browser.

Installation is simple. Just download the software and flash it to an SD card.
Once inserted into your Raspberry Pi, everything works right away.
The software comes with the latest Raspberry Pi Bullseye operating system.
You don't need to be able to program. However, the used C++ source code is available on the image.

Given the many hours of work, we ask you for a small one-time fee for the license (€ 10,00).
See our shop where we explain how the license works.

output image

A red box is a recognized moving object. Blue boxes are recognized stationary objects.


You might also be interested in YoloCam. YoloCam works with the RaspiCam. And, just like YoloIP, events trigger the GPIO and send emails. On top of that, it records events (even 5 Sec before the actual trigger) and stores them on USB or at Google GDrive.


Hardware.

To get the YoloIP working, you need the following hardware:

  • A Raspberry Pi 4 or 5.
  • An SD card (min 16 GB) holding all the software.

Obviously, you have some IP camera which you want to monitor.


Software.

For now, there is only one version of the YoloIP software, the GPIO version.
This version activates the GPIO output pins when a recognized object triggers an event. The GPIO outputs act in real time.
At the same time it triggers an email to let you know which object is detected.
There are live feeds in your browser. Finally, it has the possibility to trigger URLs.
output image

An example of a received email.


Downloading.

Select the desired version from the matrix below.

Model GPIO SHA256
Raspberry Pi 5 image 93509b618cdc8a6b6b632a4df268d2d3336cf4e90cc5d275bb6cb5faf4f8c82b
Raspberry Pi 4 image

username: pi
password: 3.14


Flashing.

Once the file has been downloaded, you need to flash it to an SD card. Use a good quality SD with a minimum size of 16 GByte for this.
On the Raspberry Pi website, you can follow the instructions on how to flash an image.

Don't select a standard OS, but the file you just downloaded. For instance YoloIP_Rpi4_GPIO.img.xz.

output image

Instead of the Raspberry Pi Imager, some people prefer balenaEtcher. It doesn't matter, they all do a perfect job.


First boot.

Insert your fresh SD card into the slot and power your Raspberry Pi.
Because you don't have a license yet, the YoloIP comes with a unique ID to buy the key.

output image


Camera check.

At the same time it shows a most valuable tip; check your cameras!
Not all the surveillance cameras support the used ONVIF protocol.
Best to check on the forehand if your camera works. It would be a pity if you paid and your camera turned out to be unusable.
Our Wiki page connecting the camera explains the procedure of how to get the footage from a surveillance camera in your Raspberry Pi.
On the desktop, you find a README.pdf with the same instructions.

output image


License.

Follow the instructions and visit the check out site.

output image

After a successful payment, you receive an email with the 8-digit key.
The instructions on how to unlock the app are shown on the congratulations page.
It is all very simple and self-explanatory.


Preparations.

Now that you have your license key, a few settings are required for YoloIP to work properly.
First of all, you need an internet connection. This Wiki page explains how to set up the WiFi connection on your Raspberry Pi.

Only if you like to use the email option you have to follow the next steps.

  • You need a Google account to redirect emails and save recorded clips. Since your personal login details are stored in the Raspberry Pi, we recommend a separate Google account for this application. Just for safety reasons.
  • Register your app with Google to get your email password. Follow the instructions on the Wiki page Email notification on how to set email traffic from your Raspberry Pi.
  • Alter the settings to your personal Google account. See for extra information on the Wiki page Settings.
    • cam_name Give a name to your YoloIP. Especially useful if you have more than one YoloIP working.
    • email The email address that receives the notifications. Note, none will block the mail traffic, but not the recording
    • gmail The Gmail address associated with the Google account above.

Triggers.

The real beauty of YoloIP lies in its ability to generate triggers when objects are detected.

Each recognized object is tested to see if it should trigger an event.
The event can set or reset an output pin and send you an email. It can even activate a user-defined URL.

The Wiki page Triggers gives you all the instructions you need to set the most sophisticated trigger events.


Specs.

Rpi 4 OS: Linux raspberrypi 6.1.21-v8+ #1642 Debian GNU/Linux 11 (bullseye) aarch64 GNU/Linux

AP (Average Precision) - slow : 25.8 %

AP (Average Precision) - fast : 24.1 %

Although the AP doesn't differ that much between the two, the size of detectable objects does. The 'slow' one recognizes far smaller objects in the background than the 'fast' one. Looking for the car heading for the birdcage in the backyard? You can best use the 'slow' model. The fast model suits your needs if you only have to detect the postman on your lane. Keep in mind that no deep learning model is perfect. Given the limited computing power of the Raspberry PI, we had to make a compromise.
Our network works amazingly well in everyday use. Even small objects in the background are recognized correctly. Likewise, half-cut objects at the edge of the image. Yet it sometimes makes mistakes. For example, misinterpreting a truck for a car or bus. An understandable error.

Raspberry Pi 5 (Bookworm)

Resolution Nr of cams slow fast comment
1920x1080 1 25.2 FPS 17.0 FPS
1920x1080 2 11.2 FPS 6.5 FPS
1920x1080 3 2.4 FPS 1.22 FPS
1920x1080 4 1.1 FPS 0.6 FPS
640x480 1 25.0 FPS 25.0 FPS CCTV is 25 FPS
640x480 2 12.5 FPS 25.0 FPS CCTV is 25 FPS
640x480 3 12.04 FPS 20.4 FPS
640x480 4 11.5 FPS 19.1 FPS
640x480 5 8.61 FPS 5.13 FPS
640x480 6 6.11 FPS 4.17 FPS
640x480 7 5.10 FPS 3.70 FPS
640x480 8 4.10 FPS 3.24 FPS

The load will be approximately 2.1 Ampere.

Raspberry Pi 4

Resolution Nr of cams slow fast comment
1920x1080 1 2.25 FPS 4.5 FPS
1920x1080 2 0.75 FPS 1.4 FPS POC errors
640x480 1 6.0 FPS 13.0 FPS
640x480 2 2.9 FPS 6.2 FPS
640x480 3 1.7 FPS 4.17 FPS
640x480 4 1.2 FPS 2.9 FPS
640x480 5 0.9 FPS 1.92 FPS
640x480 6 0.68 FPS 1.52 FPS
640x480 7 0.45 FPS 1.05 FPS
640x480 8 0.35 FPS 0.82 FPS

The load will be approximately 1.1 Ampere


Final remarks.

  • You can use slow and fast modes interchangeably. One camera in fast mode, the other in slow is therefore perfectly fine.
  • Use small camera resolutions. Keep the amount of transferred memory from GPU to CPU for analysis as low as possible. The higher your FPS will be.
  • If possible, use an ethernet cable instead of a WiFi connection. A cable is more robust and much more reliable.