johnolafenwa / DeepStack

The World's Leading Cross Platform AI Engine for Edge Devices
Apache License 2.0
675 stars 105 forks source link

passing `min_confidence` of zero (0) will cause Deepstack to hang indefinitely #58

Closed robmarkcole closed 3 years ago

robmarkcole commented 3 years ago

As reported in https://github.com/robmarkcole/HASS-Deepstack-object/issues/169 and in my own experience, passing min_confidence of zero (0) will cause Deepstack to hang indefinitely. Technically a min confidence of zero is meaningless anyways. We should coerce values to a min confidence of 1%

johnolafenwa commented 3 years ago

Thank you @robmarkcole . Please make a PR to address this, files concern are here https://github.com/johnolafenwa/DeepStack/tree/dev/deepstack/intelligencelayer/shared,

robmarkcole commented 3 years ago

@johnolafenwa could the issue be in non_max_suppression()? This is not easy to debug without understanding what that is performing.

I see however that conf_thres=0.1 so we could just pin this at the go endpoint like this?

if val < 0.1 {

response := response.ErrorResponse{Success: false, Error: "min_confidence cannot be less than 0.1"}

c.JSON(400, response)
c.Abort()
return
robmarkcole commented 3 years ago

I believe this is an example of what non_max_suppression tries to address?

image

johnolafenwa commented 3 years ago

This has been fixed here https://forum.deepstack.cc/t/deepstack-february-2021-release-fixes-for-jetson-windows-native-and-docker-versions/724