AI detecting people vs dogs/foxes

Spooling

Getting the hang of it
Sep 26, 2015
211
55
Hey there;

I've been working on dialing in my system for awhile now and the one issue I have currently is trying to get AI to differentiate between a person and a dog or fox. About 50% or more of the time my AI detection will identify a dog or fox as a person.

I'm using both Dahua IVS and CPAI. They both seem to detect dogs as people. I'm running Yolo v5 6.2 on CPAI.

Any suggestions would be appreciated!
 
AI is not perfect and there will always be these types of things. Especially an animal coming directly at or away from the camera where the camera only sees two legs.

With IVS, going thru the global config can sometimes knock these out.

With CPAI, training and creating your own model based on your field of view can knock these out.

Field of view and not trying to do too much helps. For a typical fixed lens camera, trying to keep this detection within 15 feet or so of the camera can help. Much beyond that and the object is too small for reliable detection in many instances.

Can you post some screenshots showing these detections in the field of view.
 
Yeah those are close enough it should have a higher confidence.

Are you running on default settings or did you dial it in? Default versus custom settings of the camera parameters can make a difference.

For the IVS, did you run the global config? That would at least hopefully not trigger as a person based on size.
 
I've dialed the cameras settings in somewhat. I'm running a manual shutter and capping the duration of the shutter.

For IVS, I've never had much luck configuring the global setting. When I try to use the ruler after the calibration it always ends up coming up with something that's way off what it should be.

I guess I could try to increase the minimum size in the IVS rules, but then I wouldn't be able to detect a person a bit further in the distance. I guess there's always a trade off.
 
Did you try the IVS with min size set to 0,0 and let AI do its thing? That is usually when it works best. Only add a min size if it is triggering for smaller items you do not want triggering, like a dog for a person. None of mine have a min size.

For most of us we have seen that contrast 5-8 higher than brightness seems to be the sweet spot for detection.
 
  • Like
Reactions: Chokolinho
Yes, I always leave the min/max size alone, unless there's a specific issue. I'll see if I can tune the cam settings a bit as well.
 
As a mostly non-helpful response, I was in a similar position somewhat over a year ago and gave up on CPAI. The most I got out of it was entertainment, with animals labeled as people, rocks as animals, a few things as fireplugs or parking meters, and so forth. With both the CPAI and Dahua object filters, I've sensed a lot of difference in how they work for city vs. country settings. They both seem to do pretty good with people and vehicles, but when animals and a lot of vegetation are thrown in, the incorrect detections and false positives go up. The one thing you're seeing that is different is, in my experience, the Dahua IVS rarely triggers any IVS event on animals, unless you have a model that includes animal detection, and it's enabled. Are you wanting the camera to trigger on animals? If it's set up for IVS only with only people and vehicles, I'm surprised you're sending the animal images to CPAI.
 
As a mostly non-helpful response...
And even more non-helpful response, I'm experimenting with Google Gemini AI, asking it to analize my camera pictures, here is what it said about those two photos:

Prompt: Can you see any human or animal on the photo?

First photo:
"Yes, I can see an animal in the photo.
There is a medium-to-large dog located on the left side of the deck.

Details:
Appearance: It has a dark-colored patch on its back/side and a lighter (possibly white) curled tail and legs.

Position: It is standing near the glass railing, facing toward the stairs or the lower level of the deck.

Activity: It appears to be sniffing or looking at something on the ground near the railing post.

I do not see any humans in the frame."


Second photo: "Yes, I can see two animals in the photo.

Based on their size, shape, and distinctive bushy tails, they appear to be foxes. Here is where they are located:

Animal 1: Near the bottom-left corner of the image, walking along the stone edge.

Animal 2: In the middle-left area, walking along the stone path next to the hot tub.

There are no humans visible in this image."


It would be cool if BI would have ability to integrate with external AI services like this
 
  • Like
Reactions: kc8tmv
As a mostly non-helpful response, I was in a similar position somewhat over a year ago and gave up on CPAI. The most I got out of it was entertainment, with animals labeled as people, rocks as animals, a few things as fireplugs or parking meters, and so forth. With both the CPAI and Dahua object filters, I've sensed a lot of difference in how they work for city vs. country settings. They both seem to do pretty good with people and vehicles, but when animals and a lot of vegetation are thrown in, the incorrect detections and false positives go up. The one thing you're seeing that is different is, in my experience, the Dahua IVS rarely triggers any IVS event on animals, unless you have a model that includes animal detection, and it's enabled. Are you wanting the camera to trigger on animals? If it's set up for IVS only with only people and vehicles, I'm surprised you're sending the animal images to CPAI.

Thanks for your sharing your experience. On these problematic cameras, i have it set to filter and look for people only. I'm surprised it's identifying my dog as a person a lot of the time. I've tweaked the settings on my cameras, giving them a bit more contrast etc. to see if it helps.
 
Last edited:
And even more non-helpful response, I'm experimenting with Google Gemini AI, asking it to analize my camera pictures, here is what it said about those two photos:

Prompt: Can you see any human or animal on the photo?

First photo:
"Yes, I can see an animal in the photo.
There is a medium-to-large dog located on the left side of the deck.

Details:
Appearance: It has a dark-colored patch on its back/side and a lighter (possibly white) curled tail and legs.

Position: It is standing near the glass railing, facing toward the stairs or the lower level of the deck.

Activity: It appears to be sniffing or looking at something on the ground near the railing post.

I do not see any humans in the frame."


Second photo: "Yes, I can see two animals in the photo.

Based on their size, shape, and distinctive bushy tails, they appear to be foxes. Here is where they are located:

Animal 1: Near the bottom-left corner of the image, walking along the stone edge.

Animal 2: In the middle-left area, walking along the stone path next to the hot tub.

There are no humans visible in this image."


It would be cool if BI would have ability to integrate with external AI services like this
WOW! That's incredible!