Self-hosted Face Api Service

Artur Czepiec 0 Reputation points
2025-01-23T11:37:22.8833333+00:00

I’m looking into ways to use Azure Face API (or any of your face recognition services) in a completely offline environment. My organization follows strict security and privacy policies, so we need a self-hosted solution that works without an internet connection.

Is there any way to run these services directly on some VM or in a disconnected setup?

Regards

Azure Face
Azure Face
An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.
175 questions
{count} votes

2 answers

Sort by: Most helpful
  1. santoshkc 12,035 Reputation points Microsoft Vendor
    2025-01-23T16:19:02.8566667+00:00

    Hi @Artur Czepiec,

    Thank you reaching out to Microsoft Q&A forum!

    Currently, Azure Face API is not available as a disconnected setup. However, you can use Azure AI Vision - Read in a disconnected container. This container is designed to work offline, enabling you to perform vision-related tasks in environments with strict security and data privacy requirements.

    While Face API is not part of the available disconnected services. To use Azure services offline, configure environment variables for your credentials. In the Azure portal, after deploying your resource and locate your key and endpoint under Resource Management > Keys and Endpoint.

    On your local machine, open a console and set the following environment variables:

    • FACE_APIKEY: Replace <your_key> with your resource key.
    • FACE_ENDPOINT: Replace <your_endpoint> with your resource endpoint.

    This setup ensures secure access to Azure services with proper credentials.

    Please refer, for more info: Use Docker containers in disconnected environments and Quickstart: Use the Face service.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

  2. Sina Salam 17,016 Reputation points
    2025-01-23T17:05:41.8433333+00:00

    Hello Artur Czepiec,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you're in need of Azure Face API (or any of your face recognition services) in a completely offline environment.

    As @santoshkc said, Azure Face API and similar cloud-based services from Microsoft are designed to run in connected environments, leveraging the cloud for scalability and updates. Unfortunately, there isn't a self-hosted version of Azure Face API that can run entirely offline.

    However, given the strict security and privacy policies, and the need for a self-hosted, offline face recognition service, you might consider using other face recognition libraries and frameworks that can be deployed in a self-hosted environment. The below are the most suitable options:

    1. OpenCV:
    • Pros: Open-source, widely used, and well-documented. Can be run entirely offline on your own servers or VMs.
    • Cons: Requires significant setup and customization for advanced face recognition tasks.
    1. Dlib:
    • Pros: Includes a state-of-the-art face recognition module, can be used offline, and has good documentation.
    • Cons: Requires setup and integration into your existing systems.
    1. FaceNet:
    • Pros: Developed by Google, provides high accuracy for face recognition, and can be deployed on your own infrastructure.
    • Cons: Requires deep learning expertise to set up and maintain.

    My recommendation:

    For a balance between ease of use and functionality, Dlib might be the best option. It offers robust face recognition capabilities and can be deployed offline. Here are the steps to get started with Dlib:

    • Install Dlib using pip: pip install dlib
    • Install other dependencies like OpenCV: pip install opencv-python
    • Use Dlib's face recognition module to detect and recognize faces. You can find detailed tutorials and examples in the Dlib documentation.
    • Deploy the solution on your own servers or VMs, ensuring it operates entirely offline.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

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.