Custom Vision

Object Detection AI Vision

Using the Custom Vision Prediction API

In order to tailor the output of your trained model, you can use its API (Application Programming Interface) to get the model to communicate with Python code that you can host in a Jupyter Notebook (which can be run either in Azure ML Studio or Microsoft Visual Studio Code). An API allows different pieces of software to communicate with each other using structured requests and responses. In this case, we use the Azure Custom Vision Prediction API to send local images to a cloud-hosted model and receive back predictions directly within Python code.

This setup gives you far greater control over how your model is used. Rather than relying on manual uploads and web-based testing, you can pass in images programmatically, process them in batches, and integrate the results into wider data pipelines. This might include saving predictions to a database, running follow-up analyses or triggering alerts when certain conditions are met. You can also adjust the probability threshold, filter results based on confidence scores, or overlay predictions on the original images for visual inspection.

Working with the API also makes your project more extensible. Once your code is in place, it can be scaled up to handle large datasets, deployed as part of a scheduled job or integrated into a web application or data dashboard. This makes the approach particularly well suited to research workflows, where flexibility, automation and reproducibility are critical.