File size: 910 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
# Data Module

Per-modality preprocessing for satellite imagery.

## Files

| File | Description |
|------|-------------|
| `preprocessing.py` | Per-modality transforms (optical, SAR, multispectral) |
| `dataset.py` | Dataset loading, splitting, and DataLoader creation |

## Supported Modalities

| Modality | Channels | Description |
|----------|----------|-------------|
| Optical | 3 (RGB) | Sentinel-2 bands B4, B3, B2 |
| SAR | 2 (VV/VH) | Sentinel-1 C-band |
| Multispectral | 12 | Sentinel-2 all bands |

## Usage

```python
from src.data.preprocessing import preprocess_image
from src.data.dataset import CrisisLandMarkDataset, create_splits

# Preprocess a single image
tensor = preprocess_image(image, modality="optical", size=224)

# Create dataset
dataset = CrisisLandMarkDataset(modality="optical")

# Split into query/gallery
query_idx, gallery_idx = create_splits(dataset, query_ratio=0.2)
```