# Standalone Raspberry Pi Security Camera with AI "person detection"

**URL:** https://discourse.nodered.org/t/standalone-raspberry-pi-security-camera-with-ai-person-detection/1470
**Category:** Share Your Projects
**Created:** [9 July 2018 20:51 UTC](https://discourse.nodered.org/t/standalone-raspberry-pi-security-camera-with-ai-person-detection/1470 "2018-07-09T20:51:56Z")
**Posts on this page:** 1
**Showing post:** 42

<div class="post-metadata">

### Author: ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)
#### Post date: [11 February 2019 18:12 UTC](https://discourse.nodered.org/t/standalone-raspberry-pi-security-camera-with-ai-person-detection/1470/42 "2019-02-11T18:12:21Z")

</div>

I've played a bit with CLAHE and pre-processing the images with it before sending to the AI can definitely help. Unfortunately I've found little guidance on how to set its parameters with my googlefu.

Here is an ~10 second clip of that security camera footage I mentioned of an actual crime where the people paid to monitor the cameras totally missed it, the entire event lasted ~30 minutes, the thefts were discovered the next day.

[CLAHE enhanced AI performance comparrison](https://youtu.be/z38pO7kvkA4)

Dual frame view "normally" processed by the MobileNet-SSD AI on the left. On the right is the result of images pre-processed with CLAHE before going to the AI sub-system. The images certainly look better to the naked eye, but I doubt it would have been enough to make a difference to the people who were obviously not paying attention.

If you want to play with this, I'll share my Python code, if requested. It reads from a video file or a "live" camera on /dev/video0 using OpenCV cv2.VideoCapture(). This code uses the Movidius NCS, so as far as I know it will not run on Windows. Analyzing the input file, twice per frame, gave me ~4.5 fps meaning the NCS was processing ~9 fps.

---

_[View the full topic](https://discourse.nodered.org/t/standalone-raspberry-pi-security-camera-with-ai-person-detection/1470)._
