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
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.
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