Object detection - Dog tagged as Person

JCAK
Posts: 20
Joined: Wed Feb 16, 2022 3:11 am

Object detection - Dog tagged as Person

Post by JCAK »

Hi,

I have a question regarding object detection, I'm testing BI and I don't not way and is not the first time, my dogs are tagged as persons by DeepStack. The attached file show one example, but the same happen with another dog I have. Both dogs are very diffrents, one on the picture and the other is small and hair black. I have set on the option "+ real-time images = 5" retry each 750ms
The issue only happen on the night, with poor light.

What do you think, is a DeepStack problem or can I make any adjust to solve this?
Attachments
Cam2.20220215_160211.752098.5123-1.15011.14980 (Small).jpg
Cam2.20220215_160211.752098.5123-1.15011.14980 (Small).jpg (45.49 KiB) Viewed 2389 times
Cam2.20220215_160211.767108.5123-1.57516.57474 (Small).jpg
Cam2.20220215_160211.767108.5123-1.57516.57474 (Small).jpg (45.5 KiB) Viewed 2389 times
MikeBwca
Posts: 1093
Joined: Thu Jun 20, 2019 5:39 am

Re: Object detection - Dog tagged as Person

Post by MikeBwca »

I would say it has to do with the angle and profile of the animal. Slim and 2 legs!

Increase the % bit?
JCAK
Posts: 20
Joined: Wed Feb 16, 2022 3:11 am

Re: Object detection - Dog tagged as Person

Post by JCAK »

I attached new images for consideration.
Note that the confidence value, is high relative to image quality and considering a value "+ real-time images = 5"
What do you think ?
Attachments
Cam5.20220216_085855.1193119.5123-1.14164.14211_cut.jpg
Cam5.20220216_085855.1193119.5123-1.14164.14211_cut.jpg (71.53 KiB) Viewed 2373 times
Cam4.20220216_084731.1984920.5123-1.15969.16040_cut.jpg
Cam4.20220216_084731.1984920.5123-1.15969.16040_cut.jpg (87.32 KiB) Viewed 2373 times
Cam2.20220214_160148.1779729.5123-1.18785.18815_cut.jpg
Cam2.20220214_160148.1779729.5123-1.18785.18815_cut.jpg (92.73 KiB) Viewed 2373 times
User avatar
YrbkMgr
Posts: 587
Joined: Sun Nov 24, 2019 12:56 am
Location: Chicagoland

Re: Object detection - Dog tagged as Person

Post by YrbkMgr »

The way to get to the bottom of it is to first, clarify how you got the images you posted. Are they alert images or captures of video playback? That will reveal where to look first. Also, some clarity on the problem being caused will help.
  • "Whenever I take something apart to fix it and put it back together again, I end up with like six really important looking pieces left over" -Tim Allen
  • If you know what your after, you'll recognize it when you see it.
JCAK
Posts: 20
Joined: Wed Feb 16, 2022 3:11 am

Re: Object detection - Dog tagged as Person

Post by JCAK »

They are alert images but reduced in size, because the maximum filesize per attachment is 256 KiB. The cameras (Dahua) are setting to 4mp 25fps
User avatar
YrbkMgr
Posts: 587
Joined: Sun Nov 24, 2019 12:56 am
Location: Chicagoland

Re: Object detection - Dog tagged as Person

Post by YrbkMgr »

That's a start, but it isn't immediately clear what problem object recognition errors are causing. I assume your complaint is false alerts when your camera triggers on movement of your dogs - that is, you only want to be alerted on people. In order to troubleshoot the issue, post the following screenshots:
1. Status window -> Cameras Tab
2. Camera Settings -> General Tab
3. Camera Settings -> Trigger Tab
4. Camera Settings -> Trigger Tab -> Motion Sensor Configure dialog
5. Camera Settings -> Trigger Tab -> AI dialog
6. Camera Settings -> Record Tab
7. Camera Settings -> Alerts Tab
8. Camera Settings -> Alerts Tab -> On Alert dialog
Having that information will avoid "guess and check" and provide a decent snapshot of your setup. To get around size limitations of image posts, one strategy is to upload the images to a free image hosting service like Imgur. I created an example of a composite image containing multiple screenshots on Imgur as an example: Screen Capture Composite

Also, reviewing Test and Tune Motion and Deep Stack Review Orange Frame is time well spent in my opinion.

"If you know what your after, you'll recognize it when you see it."
  • "Whenever I take something apart to fix it and put it back together again, I end up with like six really important looking pieces left over" -Tim Allen
  • If you know what your after, you'll recognize it when you see it.
JCAK
Posts: 20
Joined: Wed Feb 16, 2022 3:11 am

Re: Object detection - Dog tagged as Person

Post by JCAK »

Hello, I'm here again with all information requested. Your assumption about people recognition is right.
I created a composite image like you suggest with the camera config and upload this to Imgur. Also include a video clip and a sequence of images with the metamorphosis of my dog according to DeepStack (cow, horse, dog, person and giraff). I hope it helps to find the solution. Check out the link below, please:

https://imgur.com/a/OISuLIt

Best regards
User avatar
YrbkMgr
Posts: 587
Joined: Sun Nov 24, 2019 12:56 am
Location: Chicagoland

Re: Object detection - Dog tagged as Person

Post by YrbkMgr »

Nicely done! That reveals a ton about what's going on. I have edited your composite for reference and suggest the following:
1. Camera status window -> key frame is too low, should be 1.0. That's changed in the camera firmware by making the frame interval = FPS. Also, 25 FPS is way more than you need for the area - you should drop it down to 15 or 20 at most. See these two examples of the effect of fps on video: IP Video Frame Rate Demo and DVR Frames Per Second FPS Compared Video

2. Disable "Use main stream" temporarily until you optimize the streams.
By default, analysis will Use the main stream if available. If you are using dual-streams from the camera, this provides more information for the AI with which to work. However, you might consider using the sub stream for analysis instead by unchecking this box if you need to lower CPU demand or if the two streams are significantly out of synchronization.
3. Enable Save DeepStack Analysis details. It's not the cause of any problem the way it is set, but having it enabled is an extremely useful tool to fine tune object recognition. Reviewing the DAT tells you what happened. See DeepStack tab about halfway down the page. That info will help you understand what the DS status window is telling you. There's also information here Canceled Alert with 91% deepstack

4. Disable detect/ignore static objects - it only increases the processing load for DS. It's mainly used to cancel an alert when an object is in the To confirm box, but hasn't moved. Like a car in a parking lot.

5. Drop number of RT images to 5

6. Pre-trigger buffer -> set it to 5 seconds

7. Enable High Def - The High definition option actually increases the number of motion detection blocks that are used by typically 4x. Disable it if CPU performance degrades

8. Enable Obj Det.

9. Zones and Hotspots are an important factor depending how are using them, so a screen shot of that will help.

10. Lower the resolution of your camera to 2MP - you'll get much better performance at night for motion sensing and object recognition, and resolutions higher than 2MP are either application specific or a marketing gimmick. I've heard it called Mega Pixel Mania.
------------------------
In summary, it's an optimization issue. Motion sense -> Object Detection -> Camera Triggers -> Pre-trigger buffer images -> DS Analysis -> Object Recognition -> Confirm or Cancel. Confirmed proceed to Alert Actions. So the timing of what is being sent to BI, and what BI is passing to DS is critical to optimize.
  • "Whenever I take something apart to fix it and put it back together again, I end up with like six really important looking pieces left over" -Tim Allen
  • If you know what your after, you'll recognize it when you see it.
JCAK
Posts: 20
Joined: Wed Feb 16, 2022 3:11 am

Re: Object detection - Dog tagged as Person

Post by JCAK »

I greatly appreciate your help and all the tutorial you have prepared.
Continuing with the tests, after fulfilling all the steps indicated above, I did what the image shows and the false detection continues.
The main problem now is that I have 2 days left to test BI and I will not be able to do any more tests.
I hope you can help me.
Thanks
Attachments
LOG camera after adjust.jpg
LOG camera after adjust.jpg (42.62 KiB) Viewed 2199 times
Clip_test.jpg
Clip_test.jpg (173.97 KiB) Viewed 2199 times
Tinman
Posts: 39
Joined: Mon Jun 24, 2019 12:12 pm

Re: Object detection - Dog tagged as Person

Post by Tinman »

Do you have this set to high ?
Screenshot 2022-02-21 083929.jpg
Screenshot 2022-02-21 083929.jpg (201.06 KiB) Viewed 2196 times
Post Reply