d24c6ed608
Wrap the BGfilter matting pipeline in a long-running FastAPI service (POST /remove-background, GET /healthz) exposing only screen_color and seg_model, matching the birefnet-service request contract. - bgfilter/pipeline.py: add in-memory run_rgb entry returning a MattingResult; allow injecting a shared runner/segmenter. CLI file path (run_image) behaviour is unchanged. - bgfilter/service.py: PipelineManager caches one shared ViTMatte runner and per-backend segmenters, so screen_color/seg_model never reload a model. - app.py: thin FastAPI layer -- param validation, image decode/encode, error codes (400/413/500), timing headers, global asyncio lock. - requirements.txt: fastapi, uvicorn[standard], python-multipart. - README + design doc: HTTP service usage and HF-mirror/proxy/Xet download notes. Verified end-to-end (base ViTMatte + BiRefNet + anime-seg): 11/11 acceptance checks pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
223 B
Plaintext
24 lines
223 B
Plaintext
opencv-python
|
|
pillow
|
|
numpy
|
|
scipy
|
|
scikit-image
|
|
pymatting
|
|
torch
|
|
torchvision
|
|
transformers
|
|
accelerate
|
|
safetensors
|
|
huggingface_hub
|
|
timm
|
|
einops
|
|
kornia
|
|
onnxruntime
|
|
tqdm
|
|
typer
|
|
rich
|
|
PyYAML
|
|
fastapi
|
|
uvicorn[standard]
|
|
python-multipart
|