Is combining 2 models performing 2 tasks into 1 model accelerates inference time?

Hello everyone! I’m recently working on my graduate project and my task is to have the model perform 2 tasks ( tracking and depth estimation) at the same time which is very slow. Is that combining 2 models into 1 accelerate the inference time? Thanks

In case the two models would reuse a common internal model, you could see a speedup due to the decreased number of operations needed the model execution.
However, it depends on your actual use case, if this would be a valid option.

Thanks ptrblck for replying to me! But if two models don’t reuse a common internal model what’s the solution for this problem?

Assuming your “problem” is the speed: you could profile your workload, check where the bottlenecks are, and try to avoid/optimize them. Also, if you have two independent models, you could try to run them in parallel on different devices, if possible.