Ctrl + K
DocumentationLog inGet started

tessl/pypi-rembg

tessl install tessl/pypi-rembg@2.0.0

Remove 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%

task.mdevals/scenario-2/

Image Background Remover CLI

Build a command-line tool that removes backgrounds from image files using automated processing.

Requirements

Create a Python script that:

  1. Accepts an input image path and output image path as command-line arguments
  2. Removes the background from the input image
  3. Saves the result to the output path
  4. Handles common error cases gracefully (missing files, invalid paths)

The script should be executable from the command line with this usage pattern:

python remove_bg.py input.jpg output.png

Test Cases

  • Given a valid input image file and output path, the script successfully removes the background and saves the result @test
  • Given a non-existent input file, the script exits with a non-zero exit code and displays an error message @test
  • Given an input image with a human subject, the background is cleanly removed while preserving the subject @test

Implementation

@generates

API

import sys

def main():
    """
    Main entry point for the background removal CLI tool.
    Processes command-line arguments and performs background removal.
    """
    pass

if __name__ == "__main__":
    main()

Dependencies { .dependencies }

rembg { .dependency }

Provides background removal capabilities for images.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/rembg@2.0.x
tile.json