File size: 811 Bytes
f343f06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Features Module

Feature extraction using CLIP for satellite imagery.

## Files

| File | Description |
|------|-------------|
| `extractor.py` | CLIP ViT-L/14 feature extractor |
| `embeddings.py` | Embedding cache utilities |

## Model

| Parameter | Value |
|-----------|-------|
| Model | `openai/clip-vit-large-patch14` |
| Architecture | Vision Transformer |
| Embedding Dim | 768 |
| Input Resolution | 224x224 |

## Usage

```python
from src.features.extractor import FeatureExtractor

# Initialize extractor
extractor = FeatureExtractor(model_name="openai/clip-vit-large-patch14")

# Extract features from single image
embedding = extractor.extract_features(image, modality="optical")

# Extract features from batch
embeddings = extractor.extract_batch(images, modality="optical", batch_size=32)
```