garmentiq.segmentation

Garment segmentation.

Separates the garment from its background and produces the mask the later stages rely on. Landmark refinement and derivation both need this mask, and matting uses it as guidance.

Four backends are supported through one interface: BiRefNet, which needs no prompt at all, and SAM 1, SAM 2, and SAM 3, which are guided by a unified prompt dictionary accepting points, labels, boxes, and text.

 1# garmentiq/segmentation/__init__.py
 2"""Garment segmentation.
 3
 4Separates the garment from its background and produces the mask the later stages rely
 5on. Landmark refinement and derivation both need this mask, and matting uses it as
 6guidance.
 7
 8Four backends are supported through one interface: BiRefNet, which needs no prompt at
 9all, and SAM 1, SAM 2, and SAM 3, which are guided by a unified `prompt` dictionary
10accepting points, labels, boxes, and text.
11"""
12from .load_model import load_model
13from .extract import extract
14from .plot import plot
15from .change_background_color import change_background_color
16from .process_and_save_images import process_and_save_images