Answer the question
In order to leave comments, you need to log in
How to do dynamic image segmentation with Tensorflow and Socket.IO?
Why do I need dynamic segmentation?
If I just run a Python script, it will take 7 seconds to initialize the neural network model, which is unacceptable.
It is necessary to make sure that the model of this network constantly hangs in memory and when data arrives for segmentation, it immediately loads the necessary weights and gives the result.
I tried to do this: in one script, the model is initialized and the Socket.IO (Flask) server is started. In the "connect" event, weights are loaded and segmentation takes place.
Due to the fact that Flask works asynchronously , incomprehensible errors from the neuron come out.
How to implement this task correctly? Will it work through streams? I watched how to make threads in python, I was a little shocked. In Sishka or Pascal, everything is easier.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question