ONNX
English
File size: 1,276 Bytes
bf96bdd
 
 
 
 
 
 
 
 
bb6c722
 
 
 
bf96bdd
 
 
 
 
 
 
 
d991b4f
bf96bdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
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