VorlonCD / bi-aidetection

Alarm system for Blue Iris based on Artificial Intelligence.
https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/
GNU General Public License v2.0
205 stars 45 forks source link

AI not properly identifying in darker conditions #83

Open ncrispi opened 4 years ago

ncrispi commented 4 years ago

I have a light that turns on with motion and also a camera with night vision, however AI tool is continuously incorrectly identifying items at night. During the day it is able to identify people walking by and cars.... at night it recognizes the cars as toilets with 54% accuracy and does not identify a person walk by at all.

Is there some way to flag these false to the AI program to improve the identification? -- Seems like with DeepQuest the conditions have to be perfectly lighted to identify anything

VorlonCD commented 4 years ago

I've seen the same issue at night. This should be logged with the deepstack developers.

petermai6655 commented 3 years ago

Also wondering if training DeepStack would allow for better detection during darker conditions?

VorlonCD commented 3 years ago

Let me know if DOODS AI server is any better at night (or day). I've only been using it one night so far and there was nothing of interest anyway...

1) Install docker if you dont have it

2) At a command prompt type docker pull snowzach/doods:latest

3) To run type docker run --restart=always -it -p 8080:8080 snowzach/doods:latest

Or as its instructions say, for Coral EdgeTPU: docker run --restart=always -it --device /dev/bus/usb -p 8080:8080 snowzach/doods:latest

It also has CUDA version but test normal version first.

4) Make sure its working by going to http://localhost:8080/version in a web browser first - you should see its version listed in a json string.

5) Then in AITTOOL, Settings tab specify the ENTIRE URL for it to know it is a doods link (Not just the IP/port!): http://localhost:8080/detect

It must have "/detect"

Also, I tried to use it with a port other than 8080 because mine was in use but it didnt work, so I just disabled the program using that port and let it be default port for now.

AITOOL-VORLONCD.zip

MindfulWolfPack commented 3 years ago

@VorlonCD Thank you! I am testing this build with DOODS now. I will report any issues. So far so good.

apedance commented 3 years ago

Hello!

I tried doods as well. The docker container is receiving the requests as soon below.

2020-11-13T13:45:39.916Z INFO server/server.go:139 HTTP Request {"status": 200, "took": 0.209522826, "request": "/detect", "method": "POST", "package": "server.request", "request-id": "4807c87792a4/jvajeHyPln-000013", "remote": "192.168.1.80:61185"}

Yet, the detection always fires a false alert despite a car being present in the picture. deepstack has no issues detecting the car.

image

VorlonCD commented 3 years ago

@apedance - Disable History tab > Settings > Restrict threshold at source. Then every dang little thing it detects will show up and you can better decide what the correct threshold should be. (This is a doods only feature so far, deepstack just gives us everything it knows about no matter what). I'm assuming you just have threshold set too high, but it seems I had to raise my threshold not lower for doods.

If anyone can figure it out there appears to be a way in doods to use different Tensorflow training models that may or may not be better at detection, and a way to enable Coral EdgeTPU hardware acceleration but I havent looked into it yet.
https://github.com/snowzach/doods

apedance commented 3 years ago

Ah, I see. Thanks.

Well yeah, this needs a little bit more work and time. doods is going crazy on those horses on the street near me.

Will fiddle around with it a bit.

whyfseeguy commented 3 years ago

Hi Chris, I have been testing the DOODs using the aitool from above. I found the confidence level from DOODs are quite a bit lower than deepstack. In my case, a person detected with 90% confidence in deepstack is 60% in DOODs with other false objects!

I like the new feature to specify and parse the data from different ai server.

I also like the new aitool with the ability to add additional detection objects. It would be great to be able to define the priority of all detection objects, but that may make the UI more complicated? Ex. Person = 1, Car = 2, Dog = 3 etc.

I also have a few issues with the UI with screen size and fonts changing when I save the settings etc.

BI is installed on another PC and pointing to it using the IP address resulted in aitool complaining not being able to find the BI server?

I am currently running my prod. docker deepstack in a Ubuntu VM guest, with the host running blue iris and aitool. Absolutely rock solid and no issue with configuration either.

My test of Doods on another PC on a dev. UbuntuVM guest and test aitool on Win 10 guest.

Keep up the great work and thank you very much.

VorlonCD commented 3 years ago

@whyfseeguy - Thanks for testing!

You can set priority to a degree (but not threshold) by ordering the list in aitool.settings.json file called "objectPriority". It just makes sure the [summary] and other lists show objects in that order. If that isnt what you mean, how should it work?

For bi connection, would need to see the log. You have to have "REMOTE REGISTRY" service enabled/started on that machine, maybe firewall off, and you also have to map a drive letter to the root of the BI clips folder for it to remotely resolve them correctly. (or make sure admin shares can be reached like \server\c$ but with new version of windows that is a pain - multiple registry settings / policies as I recall.)

whyfseeguy commented 3 years ago

Hi Chris,

What you described is exactly what I am looking for. I will look carefully at objectPriority in the .json file to "rearrange" the objects priority for triggering. Thanks.

My prod. machine has BI and the Aitool running bare metal on a Win10Pro PC, but my test machine running the above Aitool is a VM guest running on another Win10Pro PC pointing to BI on the prod. machine for aiinput. If Aitool is using remote registry, which I have not enabled on the prod machine, I can understand the error I have experienced.

Any idea when this version with the many enhanced capability will be available for testing?

Thanks for great work and looking forward to the next release.

MYeager1967 commented 3 years ago

Any chance of having some way to alter the confidence value between day and night?

fplanque commented 3 years ago

I found that night pictures vary greatly in sharpness and smearing (light zones leaving a trail on the camera sensor) if you take snapshots just .1 or .25 secondes apart. Hence I suggest to analyze several consecutive images (with raised minimum confidence levels) and normally at least one of them will correctly identify the object. I proposed this: https://github.com/VorlonCD/bi-aidetection/issues/102