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%
A utility that processes images with different orientations and prepares them for further processing by removing backgrounds while preserving correct orientation.
Images from digital cameras and smartphones often contain EXIF metadata that specifies how the image should be rotated for proper display. When processing such images (e.g., for background removal), it's crucial to handle this orientation data correctly to ensure the output appears as expected.
Your task is to create a tool that processes images with various EXIF orientations, removes their backgrounds, and outputs correctly oriented results.
The tool must:
@generates
def process_image(input_path: str, output_path: str) -> None:
"""
Process an image by removing its background while preserving orientation.
Args:
input_path: Path to the input image file
output_path: Path where the processed image should be saved
Raises:
FileNotFoundError: If input_path does not exist
ValueError: If the input file is not a valid image
"""
passProvides background removal functionality with automatic EXIF orientation handling.
@satisfied-by