tessl install tessl/pypi-rembg@2.0.0Remove image background using advanced AI models including U-Net, BiRefNet, and SAM with support for multiple input formats and GPU acceleration
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.94x
Baseline
Agent success rate without this tile
89%
Build a specialized image background removal tool that processes images from different domains using optimized models.
Create a Python module that removes backgrounds from images while selecting the appropriate model based on image content type. The tool should support three specialized processing modes:
Implement a function that:
Different image types require different models for optimal results:
The function should:
@generates
def remove_background(input_path: str, output_path: str, mode: str) -> None:
"""
Remove background from an image using a specialized model.
Args:
input_path: Path to the input image file
output_path: Path to save the output image with removed background
mode: Processing mode - one of "anime", "portrait", or "clothing"
Raises:
ValueError: If mode is not one of the supported values
FileNotFoundError: If input_path does not exist
"""
passProvides background removal capabilities with support for specialized AI models.
@satisfied-by