File size: 2,583 Bytes
a980711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
language:
- en
tags:
- computer-vision
- segmentation
- few-shot-learning
- zero-shot-learning
- sam2
- clip
- pytorch
license: apache-2.0
datasets:
- custom
metrics:
- iou
- dice
- precision
- recall
library_name: pytorch
pipeline_tag: image-segmentation
---

# Model Card for SAM 2 Few-Shot/Zero-Shot Segmentation

## Model Description

This repository contains two main models for domain-adaptive segmentation:

### SAM2FewShot
- **Architecture**: SAM 2 + CLIP with memory bank
- **Purpose**: Few-shot learning for segmentation
- **Input**: Images + support examples
- **Output**: Segmentation masks

### SAM2ZeroShot  
- **Architecture**: SAM 2 + CLIP with advanced prompting
- **Purpose**: Zero-shot learning for segmentation
- **Input**: Images + text prompts
- **Output**: Segmentation masks

## Intended Uses & Limitations

### Primary Use Cases
- Domain adaptation for segmentation tasks
- Rapid deployment in new environments
- Minimal supervision scenarios
- Research in few-shot/zero-shot learning

### Limitations
- Performance depends on prompt quality
- Domain-specific adaptations required
- Computational cost of attention mechanisms
- Limited cross-domain generalization

## Training and Evaluation Data

### Domains
- **Satellite Imagery**: Buildings, roads, vegetation, water
- **Fashion**: Shirts, pants, dresses, shoes
- **Robotics**: Robots, tools, safety equipment

### Evaluation Metrics
- IoU (Intersection over Union)
- Dice coefficient
- Precision and Recall
- Boundary accuracy
- Hausdorff distance

## Training Results

### Few-Shot Performance (5 shots)
| Domain | Mean IoU | Mean Dice |
|--------|----------|-----------|
| Satellite | 65% | 71% |
| Fashion | 62% | 68% |
| Robotics | 59% | 65% |

### Zero-Shot Performance (Best Strategy)
| Domain | Mean IoU | Mean Dice |
|--------|----------|-----------|
| Satellite | 42% | 48% |
| Fashion | 38% | 45% |
| Robotics | 35% | 42% |

## Environmental Impact

- **Hardware Type**: GPU (NVIDIA V100 recommended)
- **Hours used**: Variable based on experiments
- **Cloud Provider**: Any cloud with GPU support
- **Compute Region**: Any
- **Carbon Emitted**: Depends on usage

## Citation

```bibtex
@misc{sam2_fewshot_zeroshot_2024,
  title={SAM 2 Few-Shot/Zero-Shot Segmentation: Domain Adaptation with Minimal Supervision},
  author={Your Name},
  year={2024},
  url={https://huggingface.co/esalguero/Segmentation}
}
```

## Model Card Authors

This model card was written by the research team.

## Model Card Contact

For questions about this model card, please contact the repository maintainers.