M
M
maryaturova2021-08-04 13:14:29
Flask
maryaturova, 2021-08-04 13:14:29

Keras: How to handle large volume of images?

There is a code with trained models (keras, tensorflow) that makes a request to a remote (own) server and receives pictures in base64 format, processes and returns the result.

Since the volume is large, I have to run multiple instances (.py). The code crashes with an error like not enough resources even though the CPU and RAM is less than 50%. Tried versions of python 3.6 (managed to run no more than 15 instances) to 3.9.6 (8 in general).
I understand that this approach is not correct and I tried to run the models on the Flask server, but at the same time, as I understand it, each request waits in its turn, which leads to an increase in the response time. Google prompted to set the parameter "threaded=True" (app.run(threaded=True)), but this did not give significant results.
Tell me how to process a large volume with a neural network?
PS: Windows 10

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question