Zero-Shot Image Classification
OpenCLIP
ONNX
English
clip
vision
aerial
drone
tracking
re-identification
Instructions to use llama-farm/llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use llama-farm/llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:llama-farm/llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet') tokenizer = open_clip.get_tokenizer('hf-hub:llama-farm/llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet') - Notebooks
- Google Colab
- Kaggle
Initial release: CLIP ViT-B/16 v3 drone-fleet fine-tune
Browse files- README.md +125 -0
- best.pt +3 -0
- last.pt +3 -0
- results.csv +16 -0
- training_meta.json +22 -0
README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: open_clip
|
| 6 |
+
tags:
|
| 7 |
+
- clip
|
| 8 |
+
- vision
|
| 9 |
+
- aerial
|
| 10 |
+
- drone
|
| 11 |
+
- tracking
|
| 12 |
+
- re-identification
|
| 13 |
+
pipeline_tag: zero-shot-image-classification
|
| 14 |
+
base_model: openai/clip-vit-base-patch16
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet
|
| 18 |
+
|
| 19 |
+
A drone-fleet-specialized fine-tune of OpenCLIP **ViT-B/16** for
|
| 20 |
+
aerial vehicle + person retrieval and re-identification.
|
| 21 |
+
|
| 22 |
+
## What this is
|
| 23 |
+
|
| 24 |
+
`v3-drone-fleet` is the **third** member of the
|
| 25 |
+
`llama-thunderdome-clip-aerial-*` family. It complements `v2`:
|
| 26 |
+
|
| 27 |
+
* `v2` — fine-tuned with **subtype-aware captions** (sedan/SUV/pickup/
|
| 28 |
+
school_bus/etc) on curated aerial imagery. Best for **specific
|
| 29 |
+
vehicle subtype** queries.
|
| 30 |
+
* **`v3-drone-fleet`** (this model) — fine-tuned on **real drone-fleet
|
| 31 |
+
footage** (2 drones, 12 videos, 4,575 Gemini-captioned crops). Best
|
| 32 |
+
for **drone-fleet domain adaptation** — improves discrimination on
|
| 33 |
+
the actual camera profile + altitude of operational drones.
|
| 34 |
+
|
| 35 |
+
## Training data
|
| 36 |
+
|
| 37 |
+
| Source | Crops | Captioning |
|
| 38 |
+
|---|---:|---|
|
| 39 |
+
| Real drone footage (2 drone profiles, 12 videos) | 4,575 | Gemini-2.5-flash-lite verdict + subtype + color/clothing |
|
| 40 |
+
|
| 41 |
+
Class distribution: person 3,130 · car 1,089 · truck 356.
|
| 42 |
+
|
| 43 |
+
Caption style: `overhead drone view of <color> <subtype>` for
|
| 44 |
+
vehicles, `person in <clothing_color> clothing` for persons.
|
| 45 |
+
|
| 46 |
+
## Training recipe
|
| 47 |
+
|
| 48 |
+
```
|
| 49 |
+
base_model: ViT-B-16
|
| 50 |
+
pretrained: openai
|
| 51 |
+
text_encoder: frozen
|
| 52 |
+
epochs: 15 (best at epoch 4)
|
| 53 |
+
batch_size: 64
|
| 54 |
+
learning_rate: 1e-5
|
| 55 |
+
warmup: 100 steps
|
| 56 |
+
val_split: 0.1
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## Eval results
|
| 60 |
+
|
| 61 |
+
| Metric | Baseline (openai) | v3 best (epoch 4) | Delta |
|
| 62 |
+
|---|---:|---:|---:|
|
| 63 |
+
| `val_loss` | 2.83 | **2.74** | -3.2% |
|
| 64 |
+
| `val_recall@1` (image→text) | 0.169 | **0.212** | +25.4% (rel) |
|
| 65 |
+
|
| 66 |
+
## How to use
|
| 67 |
+
|
| 68 |
+
### As a regular open_clip model
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
import open_clip
|
| 72 |
+
from huggingface_hub import hf_hub_download
|
| 73 |
+
import torch
|
| 74 |
+
|
| 75 |
+
ckpt_path = hf_hub_download(
|
| 76 |
+
repo_id="llama-farm/llama-thunderdome-clip-aerial-vit-b16-v3-drone-fleet", filename="best.pt"
|
| 77 |
+
)
|
| 78 |
+
model, _, preprocess = open_clip.create_model_and_transforms(
|
| 79 |
+
"ViT-B-16", pretrained="openai"
|
| 80 |
+
)
|
| 81 |
+
state = torch.load(ckpt_path, map_location="cpu")
|
| 82 |
+
model.load_state_dict(state["model"] if "model" in state else state)
|
| 83 |
+
model.eval()
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### As a ReID backbone inside `llama-thunderdome` (BotSORT / DeepOcSort)
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from thunderdome.tracking.clip_reid_adapter import CLIPReidAdapter
|
| 90 |
+
adapter = CLIPReidAdapter(
|
| 91 |
+
checkpoint="best.pt", base_model="ViT-B-16"
|
| 92 |
+
)
|
| 93 |
+
features = adapter.get_features(xyxys, img) # [N, 512] L2-normalized
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
`thunderdome tracking-lab` auto-detects CLIP checkpoints and routes
|
| 97 |
+
them through the adapter inside the `TrackerWrapper` — no custom code
|
| 98 |
+
needed at the operator level.
|
| 99 |
+
|
| 100 |
+
## When to pick v3 vs v2
|
| 101 |
+
|
| 102 |
+
* **v3 (this model)** -> re-identification across video frames from
|
| 103 |
+
YOUR drones. Better at "is this the same person/vehicle 5 seconds
|
| 104 |
+
later?" because it's tuned to the specific camera profile.
|
| 105 |
+
* **v2** -> subtype queries ("a yellow pickup truck", "a school bus").
|
| 106 |
+
Better at semantic disambiguation between vehicle classes.
|
| 107 |
+
|
| 108 |
+
For most drone tracking workloads, **use both** — v3 as the ReID
|
| 109 |
+
backbone (matching across time/cameras) and v2 as the query encoder
|
| 110 |
+
(matching text -> object).
|
| 111 |
+
|
| 112 |
+
## Limitations
|
| 113 |
+
|
| 114 |
+
* Crops smaller than ~32x32 px (people-as-dots at altitude > 80m) do
|
| 115 |
+
not produce discriminative embeddings — all map to similar vectors.
|
| 116 |
+
Spatial-temporal clustering via `thunderdome tracking-lab
|
| 117 |
+
count-unique` is more appropriate at that scale.
|
| 118 |
+
* Trained on 2 drone profiles. Cross-fleet generalization unverified.
|
| 119 |
+
|
| 120 |
+
## Generated
|
| 121 |
+
|
| 122 |
+
2026-05-26T14:36:33.904905 via the llama-thunderdome agent loop.
|
| 123 |
+
|
| 124 |
+
Full session report:
|
| 125 |
+
`gs://thunderdome-tracking-lab/test-runs/CLIP_DATASET_REPORT.md`
|
best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb65a3e7766453ef1282f7e2a9ffeb26f31e4c70307ccaffbb0aacf8b1434e33
|
| 3 |
+
size 598578887
|
last.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e1225f6394dff475ee5fe99187ba47c1aa74c1e20562fe2671e61ed3ce61414
|
| 3 |
+
size 598578887
|
results.csv
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
epoch,time,train_loss,val_loss,val_recall@1_i2t,val_recall@1_t2i,lr
|
| 2 |
+
1,74.2,3.392101,2.830324,0.168490,0.175055,6.400000e-06
|
| 3 |
+
2,148.9,2.990139,2.760507,0.188184,0.170678,9.973868e-06
|
| 4 |
+
3,228.6,2.823381,2.754390,0.177243,0.188184,9.720278e-06
|
| 5 |
+
4,307.7,2.701809,2.743762,0.212254,0.194748,9.209855e-06
|
| 6 |
+
5,386.4,2.552440,2.786436,0.201313,0.188184,8.470371e-06
|
| 7 |
+
6,462.4,2.398254,2.830706,0.210066,0.201313,7.542062e-06
|
| 8 |
+
7,539.0,2.201203,2.991727,0.190372,0.194748,6.475438e-06
|
| 9 |
+
8,614.9,2.015313,3.121355,0.185996,0.190372,5.328534e-06
|
| 10 |
+
9,690.8,1.856791,3.281529,0.192560,0.194748,4.163755e-06
|
| 11 |
+
10,767.2,1.723562,3.393405,0.192560,0.177243,3.044476e-06
|
| 12 |
+
11,843.1,1.635045,3.452135,0.177243,0.188184,2.031599e-06
|
| 13 |
+
12,919.0,1.579813,3.499683,0.181619,0.185996,1.180234e-06
|
| 14 |
+
13,995.6,1.518687,3.535074,0.172867,0.185996,5.367050e-07
|
| 15 |
+
14,1071.5,1.489815,3.550933,0.175055,0.183807,1.360266e-07
|
| 16 |
+
15,1147.2,1.476328,3.555011,0.177243,0.190372,0.000000e+00
|
training_meta.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_name": "clip-aerial-rn50_20260525_232637",
|
| 3 |
+
"started_at": "2026-05-25T23:26:37.615183Z",
|
| 4 |
+
"base_model": "ViT-B-16",
|
| 5 |
+
"pretrained": "openai",
|
| 6 |
+
"architecture": "clip_vit_b_16",
|
| 7 |
+
"classes": [
|
| 8 |
+
"car",
|
| 9 |
+
"person",
|
| 10 |
+
"truck"
|
| 11 |
+
],
|
| 12 |
+
"n_train": 4118,
|
| 13 |
+
"n_val": 457,
|
| 14 |
+
"epochs": 15,
|
| 15 |
+
"batch_size": 64,
|
| 16 |
+
"lr": 1e-05,
|
| 17 |
+
"freeze_text": true,
|
| 18 |
+
"target": "hailo10h",
|
| 19 |
+
"completed_at": "2026-05-25T23:45:48.238861Z",
|
| 20 |
+
"elapsed_minutes": 19.2,
|
| 21 |
+
"best_val_loss": 2.7437619119882584
|
| 22 |
+
}
|