--- license: mit datasets: - dhvazquez/mtg_synthetic_cards_semantic_segmentation language: - en --- # Magic The Gatering Image Semantic Segmentation model. [Demo](https://huggingface.co/spaces/dhvazquez/mtg_semantic_segmentation) [Dataset](https://huggingface.co/datasets/dhvazquez/mtg_synthetic_cards_semantic_segmentation) [Source Code](https://github.com/diegovazquez/mtg_card_image_segmentation) ## Model Details - Architecture: lraspp_mobilenet_v3_large - Input Size: 320x240 - Number of Classes: 2 - Classes: Background (0), Card (1) ## Model Files - `card_segmentation.onnx`: ONNX format for cross-platform deployment - `card_segmentation_fp16.onnx`: ONNX format for cross-platform deployment, fp16 (light model, only 8.1M) - `card_segmentation.pt`: TorchScript format for PyTorch deployment - `card_segmentation_state_dict.pth`: PyTorch state dict for training/fine-tuning ## Input/Output - Input: RGB image tensor of shape (1, 3, 320, 240) - Input normalization: mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] - Output: Segmentation logits of shape (1, 2, 320, 240) ## Usage See `inference_example.py` for example usage. ## Requirements - PyTorch >= 1.9.0 - torchvision >= 0.10.0 - onnxruntime (for ONNX inference) - opencv-python - numpy - Pillow