ZoneMinder / mlapi

An easy to use/extend object recognition API you can locally install. Python+Flask. Also works with ZMES!
Other
58 stars 35 forks source link

Sending multiple requests in parallel messes up detection #2

Closed pliablepixels closed 4 years ago

pliablepixels commented 4 years ago

I use a single instance of face and object recognition which has a single instance of the network inside it. When multiple detect() functions are called together, the network variable will change messing up all the layers, resulting in bogus detections. The reason I use a single variable is to avoid re-loading the network on every request (very slow operation).

I need to look at threads or queues to handle this

pliablepixels commented 4 years ago

currently fixed, except if you are using a GPU you need to use 1 process because you can't allocate GPU resources in one context and use it in another. Will explore this more later.