Custom Vision - Object Detection TensorFlow Prediction Very Slow

Alexander 5 Reputation points
2023-08-16T00:21:06.86+00:00

Hi,

We are building an application that utilizes real-time object tracking. We attempted to create an object detection project for the General (compact) domain and exported it to various platforms:

  • TensorFlow (Python)
  • TensorFlow.js (Browser)
  • TensorFlow.js (Node.js)

However, the prediction time isn't suitable for real-time applications. It's significantly slower than the model performance described for GPU or CPU in the official documentation:

https://video2.skills-academy.com/en-us/azure/ai-services/custom-vision-service/select-domain#compact-domains

For a test image with dimensions of 512x512, the prediction times we get are as follows:

  • Browser: ~2400 ms (using customvision-tfjs)
  • Node.js: ~180 ms (using customvision-tfjs-node)
  • Python: ~500 ms (using TensorFlow)

But even with images that are about 35% smaller, the prediction times remain largely unchanged.

We have a few questions:

  • Are there any optimizations we can implement to achieve inference times more in line with the official documentation?
  • Is Microsoft still actively developing these libraries? We've noticed that it's been nearly 2 years since the customvision-tf libraries received an update. The official tfjs library is now at version 4.10.0, yet the exported examples still rely on 3.12.0.
  • What's the YOLO version on which the exported models are based?

Any insights would be appreciated.

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
247 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.