How to run two machine learning models in one CV application? #184
-
Taking inspiration from object-detector-python, can I run two tflite models in the same CV applications? If yes, how? One way I think it can be done is - Run two inference-server containers with corresponding models and call them. But I am not sure if I need to define two unix sockets for the same. Is there a better alternative? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, yes it is possible. You would have to add another -m flag here: Then, in your application, you should just be able to do two calls like this: |
Beta Was this translation helpful? Give feedback.
Hi, yes it is possible.
You would have to add another -m flag here:
https://github.com/AxisCommunications/acap-computer-vision-sdk-examples/blob/main/object-detector-python/docker-compose.yml#L28
so that it looks like:
entrypoint: ["/opt/app/acap_runtime/acapruntime", "-m", "${MODEL_PATH}", "-m", "${MODEL_PATH_2}", "-j", "${INFERENCE_CHIP}"]
You define the new model path here:
https://github.com/AxisCommunications/acap-computer-vision-sdk-examples/blob/main/object-detector-python/config/env.aarch64.artpec8
And add the model to this docker file:
https://github.com/AxisCommunications/acap-computer-vision-sdk-examples/blob/main/object-detector-python/Dockerfile.model
Then, in your applicatio…