Hi Trong Nguyen,
You can analyze images stored on your local computer using the azure.ai.vision.imageanalysis.ImageAnalysisClient
in Python by reading the image file as binary data and passing it to the client’s analyze method via the image_data parameter. The client does not accept local file paths directly because the Azure service operates in the cloud and cannot access files on your local filesystem. Instead, you need to open the image file in binary mode (e.g., using Python’s open("path/to/image.jpg", "rb")) and then send the binary content to the service. Alternatively, if you want to use the image_url parameter, the image must be publicly accessible via a valid HTTP or HTTPS URL. This design ensures the service can reliably access the image content for analysis. For more details, you can refer to the official Microsoft Azure SDK documentation for the Python azure-ai-vision package and the Image Analysis API, which explain that images can be provided either as URLs or as binary data, but not as local file paths.
For more information: Azure Image Analysis client library for Python - version 1.0.0