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
203 stars 45 forks source link

MQTT Issue: #187

Closed rtman238 closed 3 years ago

rtman238 commented 3 years ago

I found an MQTT payload issue. [Confidence] returns a string as expected (76%) but [Confidences] also returns a string instead of 75.5976. I am using version 2.0.721.7719.

VorlonCD commented 3 years ago

is it a bug? Did an older original version spit out just the number rather than formatted string? What are you using it for on the MQTT end?

Note this version lets you use [AllJson] variable which gives you all the raw details: https://github.com/VorlonCD/bi-aidetection/issues/168

rtman238 commented 3 years ago

[Confidences] is shown as numeric without any formatting in the variable list.

image

I plan on using this to set the minimum confidence level of person in HomeSeer. In AiTool I have the minimum confidence level set to 40% but I want to increase the confidence level for a person up to 60%. This is a workaround for not being able to set the minimum confidence per object. With 1 topic and payload I get the camera, label and image path. With the next topic and payload I get the camera, label and confidence.

I am using an MQTT broker plugin for HomeSeer. I might be able to use the [AIJson] variable if I can research how to use portions of the payload.

VorlonCD commented 3 years ago

I think maybe [Confidences] only displays like that in the variable preview window? Can you try to test it in a real action? The preview window doesnt always have enough data to display real data.

rtman238 commented 3 years ago

Both [Confidence] and [Confidences] output in the same format in the log file. "AiSE/Person' with payload '(76%)'"

rtman238 commented 3 years ago

I know the MQTT portion of AiTool may be designed more for BI users so the formatting of the confidence is geared to those users. Someone with an MQTT broker is going to have more flexibility to change the format of the payload. I did see a payload come through with multiple confidences. With that in mind the easiest fix would be to change the example in the variable list to show the same format as [Confidence] but with multiple values. I believe the values were separated with a semicolon.

VorlonCD commented 3 years ago

@rtman238 - This should be working correctly: AITool-VorlonCD-v2.0.845.zip

rtman238 commented 3 years ago

Thank you. I will give it a try.

rtman238 commented 3 years ago

Works as expected.