Remove Background Competitors Benchmark (Remove.bg, Clipdrop, SAM, Azure)
On this page you will find a comparison of our Remove Background API against some of our competitors.
For additional information about the important features to look for in image background removal technology, you can also consult this blog article.
Result Comparison
If you want to compare two results in details, we recommend using this website: https://www.diffchecker.com/image-compare/
Home Decoration Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Furniture Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Apparel Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
This image failed to process
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Food Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Cosmetic Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
This image failed to process
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Jewelry Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
People Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Industry Images
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Original Image
Photoroom API (response time: ~450 milliseconds)
Remove.bg API (response time: ~600 milliseconds)
Clipdrop API (response time: ~2 seconds, doesn't support cropping to the bounds of the subject)
Segment Anything Model (SAM) (response time: depends on the machine running the model)
Azure Background Removal API (response time: ~2 seconds)
Reproducing the results
If you want to reproduce the results of this benchmark, here are the Python scripts that were used to generate the images.
Before running this code, please download the original images that you want to re-process, and place them in a directory called original-images.
import os
import requests
import concurrent.futures
API_KEY = "YOUR_PHOTOROOM_API_KEY"
def process_image(input_image_path, output_image_path):
try:
url = "https://sdk.photoroom.com/v1/segment"
with open(input_image_path, 'rb') as image_file:
files = { "image_file": image_file }
headers = {
"Accept": "image/png, application/json",
"pr-background-removal-model-version": "2024-09-26",
"x-api-key": API_KEY
}
response = requests.post(url, files=files, headers=headers)
response.raise_for_status()
with open(output_image_path, 'wb') as f:
f.write(response.content)
print(f"Image downloaded and saved to {output_image_path}")
except requests.RequestException as e:
print(f"Error: {str(e)} ({input_image_path})")
return str(e)
def iterate_over_directory(directory_path, result_directory):
with concurrent.futures.ThreadPoolExecutor(max_workers=16) as executor:
for root, _, files in os.walk(directory_path):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.webp', '.heic')):
file_path = os.path.join(root, file)
result_file_name = os.path.splitext(os.path.basename(file_path))[0] + '.png'
result_file_directory = os.path.join(result_directory, os.path.basename(root))
if not os.path.exists(result_file_directory):
os.makedirs(result_file_directory)
result_path = os.path.join(result_file_directory, result_file_name)
if not os.path.exists(result_path): # don't re-process images
executor.submit(process_image, file_path, result_path)
if __name__ == "__main__":
INPUT_DIRECTORY = "./original-images/"
OUTPUT_DIRECTORY = "./result-photoroom/"
if not os.path.exists(OUTPUT_DIRECTORY):
os.makedirs(OUTPUT_DIRECTORY)
iterate_over_directory(directory_path=INPUT_DIRECTORY, result_directory=OUTPUT_DIRECTORY)
Before running this code, please download the original images that you want to re-process, and place them in a directory called original-images
.
import os
import requests
API_KEY = "YOUR_REMOVE_BG_API_KEY"
def process_image(input_image_path, output_image_path):
try:
url = "https://api.remove.bg/v1.0/removebg"
with open(input_image_path, 'rb') as image_file:
files = { "image_file": image_file }
payload = {
"size": "auto"
}
headers = {
"Accept": "image/png, application/json",
"x-api-key": API_KEY
}
response = requests.post(url, data=payload, files=files, headers=headers)
response.raise_for_status()
with open(output_image_path, 'wb') as f:
f.write(response.content)
print(f"Image downloaded and saved to {output_image_path}")
except requests.RequestException as e:
print(f"Error: {str(e)} ({input_image_path})")
return str(e)
def iterate_over_directory(directory_path, result_directory):
for root, _, files in os.walk(directory_path):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.webp', '.heic')):
file_path = os.path.join(root, file)
result_file_name = os.path.splitext(os.path.basename(file_path))[0] + '.png'
result_file_directory = os.path.join(result_directory, os.path.basename(root))
if not os.path.exists(result_file_directory):
os.makedirs(result_file_directory)
result_path = os.path.join(result_file_directory, result_file_name)
if not os.path.exists(result_path): # don't re-process images
process_image(file_path, result_path)
if __name__ == "__main__":
INPUT_DIRECTORY = "./original-images/"
OUTPUT_DIRECTORY = "./result-remove-bg/"
if not os.path.exists(OUTPUT_DIRECTORY):
os.makedirs(OUTPUT_DIRECTORY)
iterate_over_directory(directory_path=INPUT_DIRECTORY, result_directory=OUTPUT_DIRECTORY)
Before running this code, please download the original images that you want to re-process, and place them in a directory called original-images
.
import os
import requests
API_KEY = "YOUR_CLIPDROP_API_KEY"
def process_image(input_image_path, output_image_path):
try:
url = "https://clipdrop-api.co/remove-background/v1"
with open(input_image_path, 'rb') as image_file:
files = { "image_file": image_file }
payload = {
"transparency_handling": "discard_alpha_layer"
}
headers = {
"Accept": "image/png",
"x-api-key": API_KEY
}
response = requests.post(url, data=payload, files=files, headers=headers)
response.raise_for_status()
with open(output_image_path, 'wb') as f:
f.write(response.content)
print(f"Image downloaded and saved to {output_image_path}")
except requests.RequestException as e:
print(f"Error: {str(e)} ({input_image_path})")
return str(e)
def iterate_over_directory(directory_path, result_directory):
for root, _, files in os.walk(directory_path):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.webp', '.heic')):
file_path = os.path.join(root, file)
result_file_name = os.path.splitext(os.path.basename(file_path))[0] + '.png'
result_file_directory = os.path.join(result_directory, os.path.basename(root))
if not os.path.exists(result_file_directory):
os.makedirs(result_file_directory)
result_path = os.path.join(result_file_directory, result_file_name)
if not os.path.exists(result_path): # don't re-process images
process_image(file_path, result_path)
if __name__ == "__main__":
INPUT_DIRECTORY = "./original-images/"
OUTPUT_DIRECTORY = "./result-clipdrop/"
if not os.path.exists(OUTPUT_DIRECTORY):
os.makedirs(OUTPUT_DIRECTORY)
iterate_over_directory(directory_path=INPUT_DIRECTORY, result_directory=OUTPUT_DIRECTORY)
Before running this code please:
download the original images that you want to re-process, and place them in a directory called
original-images
run the command:
pip install pillow rembg
from PIL import Image
from rembg import new_session, remove
import os
MODEL_NAME = "sam"
SESSION = new_session(MODEL_NAME)
def process_image(input_image_path, output_image_path):
input = Image.open(input_image_path)
output = remove(input)
output.save(output_image_path)
print(f"Image saved to {output_image_path}")
def iterate_over_directory(directory_path, result_directory):
for root, _, files in os.walk(directory_path):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.webp', '.heic')):
file_path = os.path.join(root, file)
result_file_name = os.path.splitext(os.path.basename(file_path))[0] + '-sam.png'
result_file_directory = os.path.join(result_directory, os.path.basename(root))
if not os.path.exists(result_file_directory):
os.makedirs(result_file_directory)
result_path = os.path.join(result_file_directory, result_file_name)
if not os.path.exists(result_path): # don't re-process images
process_image(file_path, result_path)
if __name__ == "__main__":
INPUT_DIRECTORY = "./original-images/"
OUTPUT_DIRECTORY = "./result-sam/"
if not os.path.exists(OUTPUT_DIRECTORY):
os.makedirs(OUTPUT_DIRECTORY)
iterate_over_directory(directory_path=INPUT_DIRECTORY, result_directory=OUTPUT_DIRECTORY)
Before running this code, please download the original images that you want to re-process, and place them in a directory called original-images.
import os
import requests
API_ENDPOINT = "YOUR_AZURE_ENDPOINT"
API_KEY = "YOUR_AZURE_API_KEY"
def process_image(input_image_path, output_image_path):
try:
url = API_ENDPOINT + "computervision/imageanalysis:segment?api-version=2023-02-01-preview&mode=backgroundRemoval"
with open(input_image_path, 'rb') as image_file:
headers = {
"Content-Type": "application/octet-stream",
"Ocp-Apim-Subscription-Key": API_KEY
}
response = requests.post(url, data=image_file, headers=headers)
response.raise_for_status()
with open(output_image_path, 'wb') as f:
f.write(response.content)
print(f"Image downloaded and saved to {output_image_path}")
except requests.RequestException as e:
print(f"Error: {str(e)} ({input_image_path})")
return str(e)
def iterate_over_directory(directory_path, result_directory):
for root, _, files in os.walk(directory_path):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.webp', '.heic')):
file_path = os.path.join(root, file)
result_file_name = os.path.splitext(os.path.basename(file_path))[0] + '-azure.png'
result_file_directory = os.path.join(result_directory, os.path.basename(root))
if not os.path.exists(result_file_directory):
os.makedirs(result_file_directory)
result_path = os.path.join(result_file_directory, result_file_name)
if not os.path.exists(result_path): # don't re-process images
process_image(file_path, result_path)
if __name__ == "__main__":
INPUT_DIRECTORY = "./original-images/"
OUTPUT_DIRECTORY = "./result-azure/"
if not os.path.exists(OUTPUT_DIRECTORY):
os.makedirs(OUTPUT_DIRECTORY)
iterate_over_directory(directory_path=INPUT_DIRECTORY, result_directory=OUTPUT_DIRECTORY)
Last updated
Was this helpful?