Transitioning from Azure AI Image Analysis to Florence 2.0 for Background Removal

Julian Korevaar 15 Reputation points
2024-09-26T14:15:41.6566667+00:00

Hi everyone,

I recently received an email from Azure informing me that on January 10, 2025, the Azure AI Image Analysis 4.0 Segment API and its background removal service will be retired. I’ve been using this service to remove backgrounds from uploaded images, and I have a few questions regarding the transition.

The email mentions that to avoid service disruptions, we should switch to Florence 2.0 by the specified date. As someone who’s relatively new to computer vision and AI, the Segment API was a perfect solution for my needs.

It seems like Florence 2.0 offers a "Region to Segmentation" feature, but I’m not sure what steps I need to take to achieve the same outcome — specifically, creating a transparent image with the background removed.

Could anyone guide me on how to use Florence 2.0 for background removal? Any help or advice on this transition would be greatly appreciated!

Thank you,

Julian

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
397 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,041 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Tabareh 25 Reputation points
    2024-11-11T13:32:12.1833333+00:00

    @Julian Korevaar Have you found any solution/workaround for that?


  2. Neil Thompson 20 Reputation points
    2024-12-02T13:42:32.58+00:00

    srilakshmic - what do you mean by "To use Florence 2.0 for background removal, you can process your images through Azure Computer Vision." ?

    I was under the impression the only way forward is the whole semantic kernel w/ huggingface route and not the (very convenient) background removal as a service, we have (had?) with Computer Vision.

    Can you clarify please?


  3. Alex Hanneman 0 Reputation points
    2024-12-13T18:32:42.6633333+00:00

    We experimented with Florence 2 and is not even close to as good as Florence 1 (Azure Computer Vision) for background removal of human portraits. Additionally, the AI model architecture outputs polygons which requires a high amount of looping for post processing the image. Other AI models output prediction of pixels which allows for a much faster image post processing.

    Microsoft Azure has published this sample code for how to process background removal of human portraits: https://github.com/Azure-Samples/azure-ai-vision/tree/main/face/Scenario-PortraitProcessing

    You can also look at https://github.com/danielgatis/rembg as an your alternative for background removal. It is open source, easy to use, and has implemented a variety of AI models for you to choose based on your needs. You just have to host it in your own infrastructure.


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.