File size: 3,925 Bytes
f46cb86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
112
113
114
______________________________________________________________________

license: cdla-permissive-1.0
task_categories:

- image-classification
  tags:
- camera-trap
- wildlife
- serengeti
- snapshot-safari
- megadetector
  pretty_name: Snapshot Safari SER Sampled — Classroom Subset v1.0
  size_categories:
- 1K\<n\<10K

______________________________________________________________________

# Snapshot Safari SER (Serengeti) — Sampled Classroom Subset v1.0

## Summary

A curated, realistically distributed subset of the Snapshot Safari 2024 Expansion SER
(Serengeti National Park) camera trap dataset, prepared for use in the CAS Deep Learning —
Computer Vision course exercises. Unlike `ser_balanced`, the class distribution reflects
real-world Serengeti encounter rates: wildebeest and zebra dominate, while rarer species
(impala, warthog, gazelle grants) appear infrequently.

| Archive | Images | Description |
|---|---:|---|
| `ser_sampled.tar.gz` | 4 999 | Realistic distribution, full frames |
| `ser_sampled_cropped.tar.gz` | 4 949 | Realistic distribution, MD-cropped |

## Source

- **Dataset:** Snapshot Safari 2024 Expansion — SER (Serengeti) subset
- **URL:** https://lila.science/datasets/snapshot-safari-2024-expansion/
- **License:** Community Data License Agreement — Permissive variant 1.0
- **Attribution:** Snapshot Safari / University of Minnesota Lion Center

## MegaDetector

Pre-computed MegaDetector v1000-redwood RDE-filtered results from LILA Science:
`snapshot-safari-2024-expansion-SER-subset-v1000.0.0-redwood_detections.threshold.filtered.json.zip`

Used to filter frames (conf ≥ 0.8) and select the best frame per sequence.
The `_cropped` variant additionally crops each image to the primary detected animal
bounding box (10% padding).

## Species

buffalo, elephant, empty, gazellegrants, gazellethomsons, hartebeest, impala,
warthog, wildebeestblue, zebraplains

## Statistics — `ser_sampled`

| Class | Train | Val | Test | Total |
|-----------------|------:|----:|-----:|------:|
| wildebeestblue | 1 244 | 267 | 266 | 1 777 |
| zebraplains | 919 | 197 | 197 | 1 313 |
| gazellethomsons | 724 | 155 | 156 | 1 035 |
| buffalo | 146 | 31 | 31 | 208 |
| elephant | 115 | 25 | 25 | 165 |
| hartebeest | 115 | 25 | 24 | 164 |
| gazellegrants | 74 | 16 | 16 | 106 |
| warthog | 66 | 14 | 15 | 95 |
| impala | 60 | 13 | 13 | 86 |
| empty | 35 | 8 | 7 | 50 |
| **Total** | **3 498** | **751** | **750** | **4 999** |

## Statistics — `ser_sampled_cropped`

Same splits and class labels as `ser_sampled`. The `empty` class is excluded from
the cropped variant (no animal detection box available). Total: 4 949 images.

**Note:** ~56% of images are IR/night (near-infrared, nearly greyscale).

## Curation Details

- **Deduplication:** one image per sequence (highest MD animal confidence frame)
- **Animal filter:** MD animal confidence ≥ 0.8
- **Empty filter:** max MD animal confidence < 0.2
- **Sampling:** proportional to real Serengeti encounter rates (no per-class cap)
- **Split strategy:** stratified 70/15/15 by sequence ID — no sequence spans splits
- **Image resolution:** resized to max 1024 px on longer side, JPEG quality 92
- **Format:** ImageFolder layout — `<split>/<label>/<filename>.jpg`

## Usage

```python
from huggingface_hub import hf_hub_download
import tarfile

# Full-frame version
archive = hf_hub_download(
    "marco-willi/ser_sampled",
    "ser_sampled.tar.gz",
    repo_type="dataset",
)
with tarfile.open(archive) as tar:
    tar.extractall(DATA_PATH)
# → DATA_PATH/ser_sampled/{train,val,test}/<label>/*.jpg

# MD-cropped version (recommended for Colab — smaller download)
archive = hf_hub_download(
    "marco-willi/ser_sampled_cropped",
    "ser_sampled_cropped.tar.gz",
    repo_type="dataset",
)
with tarfile.open(archive) as tar:
    tar.extractall(DATA_PATH)
# → DATA_PATH/ser_sampled_cropped/{train,val,test}/<label>/*.jpg
```