- grabcut_nodes.py: torch.no_grad() on remove_background + refine_mask, dtype=torch.float32 on all tensor conversions, torch.cuda.empty_cache() in finally blocks, Pydantic validation at start of every execute() - grabcut_remover.py: Full type-hinting on GrabCutProcessor (mypy-ready), structlog observability with GPU memory tracking (_log_gpu_memory), torch.no_grad() + empty_cache() on all inference paths - requirements.txt: Pin torch>=2.1.0, Pillow>=10.4.0 (CVE fix), opencv>=4.10.0, structlog>=24.4.0, pydantic>=2.7.0 - pyproject.toml: python>=3.10 (from 3.8) - src/validation.py: NEW — Pydantic models for all user-facing params (GrabCutParams, ScalingParams, MaskParams, BBoxParams, GrabCutNodeParams) - src/__init__.py: NEW — package marker - 6/6 pytest tests pass, node import test passes Ref: CD-14 | notion:32c40bf6-db23-8001-92b8-dfe4d91dccb4
10 lines
167 B
Plaintext
10 lines
167 B
Plaintext
torch>=2.1.0
|
|
numpy>=1.24.0
|
|
Pillow>=10.4.0
|
|
opencv-python>=4.10.0
|
|
opencv-contrib-python>=4.10.0
|
|
scikit-learn>=1.4.0
|
|
ultralytics>=8.3.0
|
|
structlog>=24.4.0
|
|
pydantic>=2.7.0
|