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-3/

Video Frame Background Remover

A Python tool that processes video frames from a binary RGB24 stream, removes backgrounds from each frame, and outputs the processed frames to image files.

Capabilities

Binary Stream Processing

Process RGB24 pixel data from standard input, remove backgrounds, and save frames as image files.

  • Given RGB24 frames with dimensions 640x480 read from stdin, the tool processes each frame and saves output images to the specified directory @test
  • The tool handles multiple consecutive frames correctly, maintaining frame order @test
  • When output directory doesn't exist, the tool creates it before saving frames @test
  • Frame filenames follow the pattern "frame-0001.png", "frame-0002.png", etc. with zero-padded numbering @test

Implementation

@generates

API

import sys
from typing import BinaryIO

def process_video_stream(
    width: int,
    height: int,
    input_stream: BinaryIO = sys.stdin.buffer,
    output_dir: str = "output"
) -> int:
    """
    Process RGB24 video frames from a binary stream.

    Reads RGB24 pixel data from input_stream, removes backgrounds from each frame,
    and saves processed frames as PNG images to output_dir.

    Args:
        width: Frame width in pixels
        height: Frame height in pixels
        input_stream: Binary stream to read RGB24 data from (default: stdin)
        output_dir: Directory to save processed frames (default: "output")

    Returns:
        Number of frames processed
    """
    pass

Dependencies { .dependencies }

rembg { .dependency }

Provides background removal functionality for image processing.

Version

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