John Galea's Blog

My blog on Gadgets and the like

CodeProject AI with iSpy mini review

So I stumbled upon Codeproject which allows you to run a self hosted AI that get’s called by iSpy for Object detection (as well as Face Recognition, and License Plate recognition). I tried loading this up on Debian (wanted to get NVIDIA GPUs going), and eventually gave up. Couldn’t get the drivers working. Loaded Ubuntu 23.10 server, got the NVIDIA Cuda drivers working, but then ran into an insurmountable road block that Python was at way too high a level for CodeProject to work and gave up here too. On Windows 10 CodeProject was dead easy to load, and even getting NVIDIA GPUs working was also easy. I didn’t find a lot of benefit to the GPUs, yes processing time was less but in my situation the detection is only used occasionally so it wasn’t worth the bother/power consumption.

Within CodeProject you can load the modules you need, if you want face recognition, which object detections you want etc. (this is just a part of what’s available). For now I am just going to use grunt CPU, Yolo 5.3.1. Interestingly there is a USB device you can buy on Amazon $135 called a Google Coral TPU that CodeProject can use to speed up recognition (I didn’t). And you can see an object detection module that supports it.

From within iSpy go over to your server settings, then AI servers and add your server by pointing it at the interface of CodeProject. It can be on a different machine from iSpy or the same.

Now head over to each camera and select Object detection (or Face recognition or License plate recognition) and then enable it and point it at the AI server you added above:

Now slide down the same page and you can click get models, this will have iSpy talk to CodeProject to get it to tell you what Object recognitions are there.

Each model has different in what it can detect, and the categories are odd IMHO. Now with this setup when there is a detection with iSpy, it will then call CodeProject, from the web interface for CodeProject you can see it working. For example …

09:14:57:Object Detection (YOLOv5 6.2): Detecting using ipcam-combined
09:14:57:Response rec'd from Object Detection (YOLOv5 6.2) command 'custom' (...08a6a9) ['Found car, car, car...'] took 282ms

And then you can have iSpy save the photo handed back from CodeProject and here’s the end results:

You can set the % threshold based on confidence.

For face recognition to work you have to train it to recognize people. To do this go to the CodeProject web site you setup/loaded and click on AI Explorer

From there you hand it pictures of people you want it to recognize and train it by registering a name/face.

If you have face recognition enabled within iSpy, and if it can find a face it will attempt to do face recognition. I wasn’t very successful with this, maybe if I stood still and was close enough to the camera it might work, but more often than not, as a security camera, even at 8Mp it often did not even find a face.

09:15:09:Face Processing: No face found in image

It’s an interesting product, and ROCK solid, but of minimal use for my environment.

April 9, 2024 Posted by | Uncategorized | , , , , | Leave a comment