Realtime Object Detection

I’m getting way ahead of myself here, but I’m just curious about the possible uses of object detection. One suggestion from Jeremy’s lecture in lesson 8 was that we experiment a lot in our area of expertise. Well, I work in a public school. The most useful application of object detection in a school would be realtime processing of security camera video to identify potential threats, the presence of a gun for example. We’re talking about data from 15-20 cameras (or more). Does technology such as this already exist? If not, is it technically feasible? If it can be done, could it be done at a cost that would be reasonable for budget-strapped public schools to obtain?

9 Likes

raspberry pi with yolo, maybe ensembling at the back-end server - bootstrapped as a school project - your students can pretty much build this themselves… :thinking:

3 Likes

Yeah using the structure suggested by @helena I think this would be a great project!

1 Like

@travis I was doing a hobby project to detect missiles(In case noth-korea goes crazy :sweat_smile: ) using a rpi. I have successfully installed tensorflow and keras (python 2.7) on my raspberry pi. I paused my work in between due to lack of time. Your problem statement has great social value. I’ll try to implement it.

Use these pre-trained weights from Tiny Yolo, and no need for cloud computing, as you can have multiple raspberry pi’s at the location to confirm if its a gun or a weapon.

https://pjreddie.com/darknet/yolo/

and this for generating the app… for real-time feedback(google home e.t.c.)

4 Likes

Being able to query a security camera for a “natural” description of recent events etc would be interesting.

In: Events in last hour?
Out: “Raccoon knocked over trash can”.

The question would be if that could provide more value than a picture or short video/gif.

Nest has worked on the concept of “key clips”, but it seems to be mostly just detected motion + time buffer.

Awesome! Thanks for the suggestion. I’ll see if I can make it work.

Thanks very much!

I’ve been able to get Yolo working easily enough for still images. However, to run it on video requires OpenCV. I’ve downloaded OpenCV and placed it in the same folder (‘AppData/Local’) where darknet resides. (I’m installing everything in my ‘user’ folder because I don’t have admin privileges on my work laptop.)

When I try to ‘make’ the file with “OPENCV=1” in the Makefile, I get the following error. Any idea what’s going on here? I get this same error whether I try to install it on my local machine or in my Paperspace account with the FastAi environment activated.

tdickey@ECMS-TDICKEY-LT /cygdrive/c/Users/tdickey/AppData/Local/darknet
$ make
gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv`  -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/gemm.c -o obj/gemm.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
In file included from ./src/utils.h:5:0,
                 from ./src/gemm.c:2:
include/darknet.h:25:43: fatal error: opencv2/highgui/highgui_c.h: No such file or directory

                                           ^
compilation terminated.
make: *** [Makefile:85: obj/gemm.o] Error 1

The error message suggests placing ‘opencv.pc’ in the correct path, but I can’t find the directory ‘opencv.pc’.