Fashion segmentation based on Mask R-CNN (ResNet-50 FPN) using the imaterialist-fashion-2019-FGVC6 dataset.
| Category | Technology |
|---|---|
| Framework | PyTorch 2.1+, Torchvision |
| Backbone | ResNet-50 Feature Pyramid Network (FPN) |
| Package Management | uv |
| Serving | NVIDIA Triton Inference Server |
| Configuration | python-dotenv |
| Visualization | Matplotlib, OpenCV |
Ensure you have uv installed, then run:
uv syncCopy the template and set your dataset paths:
cp .env.example .envuv run src/fashion_parser/scripts/train_torch.pyPrepare your trained model for production:
uv run src/fashion_parser/scripts/export_triton.py --weights fashion_mrcnn_pytorch.pthDeploy the model repository using Docker:
docker run --gpus=all --rm -p 8000:8000 \
-v $(pwd)/model_repository:/models \
nvcr.io/nvidia/tritonserver:24.01-py3 \
tritonserver --model-repository=/modelsuv run src/fashion_parser/scripts/triton_client.py path/to/image.jpgfashion-parser/
├── src/fashion_parser/
│ ├── models/ # PyTorch model definitions & wrappers
│ ├── data/ # Torch Dataset & Loader engines
│ ├── config/ # Environment-driven settings
│ └── scripts/ # Training, Exporting & Triton clients
├── model_repository/ # Triton deployment configurations
├── scripts/ # Legacy entry points (for reference)
├── old_code/ # Backup of legacy TF/Keras implementation
└── pyproject.toml # Modern project configuration
- Phase 1: Restructure & Modernize Codebase
- Phase 2: Migrate to PyTorch &
uv - Phase 3: Triton Inference Server Integration
- Phase 4: Add Inference & Visualization Jupyter Notebooks

