Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / artificial-intelligence

How to Setup Agent DVR and CodeProject.AI Server on Windows Using a Wyze Cam

5.00/5 (3 votes)
9 Dec 2022CPOL7 min read 33.9K  
In this article, we setup Agent DVR, get it running with CodeProject.AI Server, and setup Agent DVR to trigger an alert when a person is detected.
This article provides a step-by-step guide to installing Agent DVR, setting up a Wyze Cam v3 with Agent DVR, configuring CodeProject.AI Server with Agent DVR, and using them to detect a person.

Image 1

Agent DVR is a video surveillance software that's used for home security, theft prevention, and wildlife watching. Like Blue Iris, Agent DVR also supports multiple cameras, offers recording, alert notifications, and has AI integration. The difference between Blue Iris and Agent DVR is that Agent DVR is free to use locally for private use, while Blue Iris has a trial version. Because Agent DVR also works with CodeProject.AI Server, I thought it would be fun to try and set it up.

In this article, I go through setting up Agent DVR and getting it working with CodeProject.AI Server, then using Agent DVR and CodeProject.AI Server to detect a person. For this article, I am using Windows 10 and a Wyze Cam v3, which I got off Amazon for $34 USD.

Installing Agent DVR

The first step is to go to the ispyconnect.com download page. I'm doing a Windows install, so I select Agent DVR - Windows and hit the Download button. This downloads Agent_Setup_Windows.zip which needs to be extracted. The two files within the zip are install.exe and Setup.exe. As far as I can tell, these two files do the exact same thing.

Image 2

So run install.exe as an administrator. To install Agent DVR, it needs access to your home network, so when the Windows Defender Firewall window pops up, hit Allow access.

Image 3

Next on the Agent Setup Utility screen, there is an option to select the destination folder for installation, the local server port for Agent DVR, then some other installation options. I'm keeping all this default, and hit Next. If you select the install tray application option, a second Windows Defender Firewall window pops up requesting access.

Image 4

Agent DVR launches in your browser at localhost:8090 and gives a series of Help options for getting started with Agent DVR. Hit OK.

Image 5

Then a Language selection pops up. English is the default, so hit OK.

Setting up a Wyze Cam v3 with Agent DVR

Image 6

Now to setup the camera. Go to the Server Menu, which is in the upper-left hand corner.

Image 7

Then hit New Device.

Image 8

From here, there's a page that lists all your current devices. Because there aren't any yet, it's blank. Hit the + button to bring up the New Device menu. Now select Video Source. I tried to use IP Camera Wizard, but I couldn't get my Wyze Cam v3 set up with that option, so Video Source it is!

Image 9

Straight out of the gate, Agent DVR wants to know if you're going to want to use alerts with this camera, whether or not you want to record when motion is detected, if you want to reduce the resolution of the video, or if you want to record raw. I'm switching on Alerts and Record on Detect.

Image 10

Next is the camera setup window.

Image 11

The first thing to do is to change the Source Type to IP Camera. This brings up the Network Source window. I'm using a Wyze Cam v3 that I've setup to do RTSP, so I input the settings I created for my Wyze Cam. If you want to see how I set up my Wyze Cam v3, please check out my article, How to Setup Blue Iris and CodeProject.AI Server on Windows Using a Wyze Cam. Input the Username for the camera (my camera is called "eyespy"), the Password, and the Live URL. For the Live URL, I'm going to use the RTSP stream address, which looks something like rtsp://username:password@10.0.0.299/live where the username and password are the options you just input. Hit OK.

Image 12

Then in the camera settings, give your camera a name (I call mine Eye Spy), and hit OK.

Image 13

There it is! The Wyze Cam v3 is working with Agent DVR.

Getting CodeProject.AI Server Working with AgentDVR

Now it's time to get CodeProject.AI Server working with Agent DVR. If you haven't set up CodeProject.AI Server before, check out my article, How to Setup Blue Iris and CodeProject.AI Server on Windows Using a Wyze Cam. From Agent DVR, click on the Server Menu button. Then from the Configuration heading, select Settings.

Image 14

Then from the General dropdown, select AI Settings.

Image 15

Then click the ... button next to Configure.

Image 16

Now input the URL for CodeProject.AI Server, which is http://localhost:32168/ and hit OK, then OK to accept the AI Server settings, OK to accept the AI Settings, and OK to exit the Agent DVR menu.

Image 17

Launch the CodeProject.AI Server dashboard by putting http://localhost:32168/ in your browser, and make sure Object Detection (YOLO) is running.

Using CodeProject.AI Server and Agent DVR to Detect a Person

CodeProject.AI Server is set up and it's happily running. Now let's use it to detect an object and trigger an alert when that object is detected. I'm sitting in front of my camera, so I'll try and detect a person.

Image 18

Go back to the camera settings by clicking the edit icon in the bottom left corner while on the Live Feed.

Image 19

Then from the General dropdown, select Object Recognition.

Image 20

Input the URL for CodeProject.AI Server http://localhost:32168/, put the Mode on Alert, make sure Object Recognition is enabled, then click the ... button in front of Configure.

Image 21

The default Confidence level for Agent DVR object detection is 60, but I think this is too high. Change it to 50. I want Agent DVR to save a photo when a person is detected, so I toggle Photos to the On position. Then, in the Find list, I'm only looking for a person, so I remove everything else from the list, and hit OK, and OK again to accept the Object Recognition settings.

Image 22

Now go back to the camera settings and from the General dropdown, select Detector.

Image 23

Within the detector settings, make sure it is Enabled. Change the Detector type to "Simple". The Simple detector means that the AI detection will be triggered on motion. I want it to be real easy to detect me, so I put this setting to Simple and hit OK to accept the settings.

Image 24

Time to set up some actions and alerts. Go back to the camera settings, and from the General dropdown, select Actions. Then click Add. From the If dropdown, select Object Found, and on the From dropdown, select Trigger Object Recognition. The camera should automatically be selected after this, but ensure the camera (in my case, Eye Spy) is in the Device section, then hit OK. Hit OK again to accept those actions.

Image 25

Then we need to ensure Alerts are enabled. Go back to the camera settings, and from the General dropdown, select Alerts. Make sure Alerts are Enabled, and hit OK.

Image 26

Finally, we need to filter our alerts. Go back to the camera settings, and from the General dropdown, select Alert Filter. This will help filter the alerts so that more "person" detections will come through. From the Find menu, ensure only person is listed, and hit OK.

Image 27

Go back to the live feed, and bam! Look at that alert notification in the corner!

Image 28

Click on the Alert icon, and that's me! Person detected! You can see there is both a tv tag, and person tag. I suspect because my monitor is in the frame, it is also getting detected. I ran the camera feed while typing up the article and moving to and from my desk, and I was detected several more times. It's not 100%, which I'm sure could be modified in the settings, but person detection in Agent DVR using CodeProject.AI Server definitely works.

And that's everything. In this article, we setup Agent DVR, got it running with CodeProject.AI Server, and setup Agent DVR to trigger an alert when a person was detected.

If you have any questions, please feel free to ask them in the article forum below.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)