amaan784 commited on
Commit
ee660e3
·
verified ·
1 Parent(s): 529d93a

Trained Eye release product

Browse files
Files changed (2) hide show
  1. README.md +120 -17
  2. release.json +2 -2
README.md CHANGED
@@ -3,14 +3,118 @@ base_model: meta-models/Muse-Glimmer-30B
3
  base_model_relation: adapter
4
  library_name: peft
5
  license: apache-2.0
 
6
  pipeline_tag: image-text-to-text
7
- tags: [trained-eye, qlora, axolotl, smart-glasses]
8
  ---
9
 
10
- # Trained Eye watch skills (LoRA adapter)
11
 
12
- A QLoRA adapter (PEFT) for `meta-models/Muse-Glimmer-30B` at revision `a4e59da52a7bc87ae7251dd5545c0dd437c44b68`. It answers yes or no to one watch condition,
13
- given in the prompt, about a first-person camera frame. Run `product`; skills: burner_left_on, fridge_left_open.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  ## Training
16
 
@@ -53,19 +157,6 @@ Bundle `mixed`: 603 training and 65 validation examples (train.jsonl SHA-256 `c0
53
 
54
  The generated images are not included. `manifests/` lists every edit prompt with the SHA-256 of its keyframe and of its image. For burner_left_on, fridge_left_open, `te regenerate` needs the original keyframes, which are not published.
55
 
56
- ## Evaluation
57
-
58
- Test footage: other kitchens filmed first-person on phones (handheld; four fridges and two stoves the model was not taught on; labels drafted by an AI assistant, see docs/evaluation.md). From `te eval`'s `results.json` (SHA-256 `6704865a78632b3e1d28aa5b50c1f56ca68537b9307949ead80969b32ecb1d8a`); evaluations scored: 6, pending: 0. n/a means there was nothing to compute it from. Each skill alerts only once its condition has stayed true for its hold: event_recall_in_window counts an alert within the skill's window after the hold ends, and time_to_alert_median_s is counted from the end of the hold. Holds and windows: burner_left_on, a 10 s hold and a 5 s window; fridge_left_open, a 20 s hold and a 10 s window. Thresholds were calibrated for frame F1 (this footage has too few events past the hold to judge alerts).
59
-
60
- | evaluation | experiment | skill | variant | hours | precision | recall | f1 | event_recall_in_window | false_alarms_per_hour | time_to_alert_median_s | latency_median_s | usd_per_hour |
61
- |---|---|---|---|---|---|---|---|---|---|---|---|---|
62
- | phone-exp4-finetuned-fridge_left_open | 4 | fridge_left_open | finetuned | 0.1322 | 0.9328 | 0.9633 | 0.9478 | 0.6667 | 7.563 | 0.0 | 1.5845 | 3.95 |
63
- | phone-exp4-base-fridge_left_open | 4 | fridge_left_open | base | 0.1322 | 0.8614 | 0.9746 | 0.9145 | 0.6667 | 7.563 | 0.0 | 2.341 | 3.95 |
64
- | phone-exp4-spark-fridge_left_open | 4 | fridge_left_open | spark | 0.1322 | 0.8723 | 0.9755 | 0.921 | 0.6667 | 7.563 | 0.0 | 11.6665 | 16.5276 |
65
- | phone-exp4-finetuned-burner_left_on | 4 | burner_left_on | finetuned | 0.0594 | 1.0 | 0.4667 | 0.6364 | 0.0 | 0.0 | 13.0 | 1.689 | 4.1045 |
66
- | phone-exp4-base-burner_left_on | 4 | burner_left_on | base | 0.0594 | 1.0 | 0.65 | 0.7879 | 0.5 | 0.0 | 0.0 | 3.2215 | 4.2589 |
67
- | phone-exp4-spark-burner_left_on | 4 | burner_left_on | spark | 0.0594 | 0.9829 | 0.9583 | 0.9705 | 0.5 | 16.8224 | 9.5 | 11.9315 | 16.5276 |
68
-
69
  ## Uses
70
 
71
  Intended: yes/no watch skills on first-person frames from smart glasses or a phone, each
@@ -96,3 +187,15 @@ or coaching, and anything where a missed or false alert could put someone at ris
96
  ## License
97
 
98
  `apache-2.0` as the base model's (meta-models/Muse-Glimmer-30B at revision `a4e59da52a7bc87ae7251dd5545c0dd437c44b68`; its license text is in `LICENSE`). These weights are a modification of that model: QLoRA fine-tuning on the data above (for a merged build, that adapter merged into the base). Any use is also subject to Meta's [Muse Glimmer Usage Policy](https://huggingface.co/meta-models/Muse-Glimmer-30B/blob/main/USAGE_POLICY.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  base_model_relation: adapter
4
  library_name: peft
5
  license: apache-2.0
6
+ language: [en]
7
  pipeline_tag: image-text-to-text
8
+ tags: [trained-eye, qlora, lora, axolotl, smart-glasses, egocentric-vision]
9
  ---
10
 
11
+ # Trained Eye: watch skills for Muse Glimmer 30B (LoRA adapter)
12
 
13
+ **What this is.** A QLoRA adapter (PEFT) for `meta-models/Muse-Glimmer-30B` (revision `a4e59da52a7bc87ae7251dd5545c0dd437c44b68`), from
14
+ [Trained Eye](https://github.com/amaan784/trained-eye), which lets Meta glasses watch for something and say when it
15
+ happens. Given one first-person camera frame and a condition in the prompt, it answers
16
+ yes or no. It was trained on two skills at once (the training run is called
17
+ `product`): `burner_left_on` ("Tell me when a burner has been left on"), `fridge_left_open` ("Tell me when the fridge door is left open"). It is not a model on its own: it needs the base model's weights.
18
+
19
+ [Code](https://github.com/amaan784/trained-eye) | [Playground](https://aas2438--trained-eye-playground-web.us-east.modal.run) | [Training runs (W&B)](https://wandb.ai/amaan784-columbia-university/trained-eye) |
20
+ [How it works](https://aas2438--trained-eye-playground-web.us-east.modal.run/how-it-works)
21
+
22
+ ## What is in this repository
23
+
24
+ | File | What it is |
25
+ |---|---|
26
+ | `adapter_model.safetensors` | The LoRA weights: rank 32 on every attention and MLP projection of the language model's layers; the vision tower is unchanged. 767 MB. |
27
+ | `adapter_config.json` | PEFT's settings for those weights: the base model, the rank, alpha and the target modules. |
28
+ | `config.json` | The model configuration the training run saved with the adapter. |
29
+ | `processor_config.json` | The image processor's settings, saved with the adapter. |
30
+ | `tokenizer.json` | The tokenizer, saved with the adapter. |
31
+ | `tokenizer_config.json` | The tokenizer's settings, saved with the adapter. |
32
+ | `chat_template.jinja` | The chat template the prompts were built with. |
33
+ | `manifests/<skill>.jsonl` | One line per generated training image (300 for burner_left_on, 300 for fridge_left_open): Muse Image's edit prompt, the answer it was made for (yes, or no for a near-miss), and the SHA-256 of the frame it edited and of the image. The images themselves are not here. |
34
+ | `LICENSE` | The base model's license text (Apache-2.0). |
35
+ | `release.json` | Every file here with its size and SHA-256. |
36
+ | `README.md` | This card. |
37
+
38
+ Not in this repository:
39
+
40
+ - The base model's weights: get `meta-models/Muse-Glimmer-30B` at revision `a4e59da52a7bc87ae7251dd5545c0dd437c44b68` from Hugging Face, under its own terms.
41
+ - The training images. The generated images are never published (they keep Muse Image's
42
+ provenance and stay with the author), and neither are the teaching frames they were
43
+ edited from. `manifests/` says how each generated image was made.
44
+ - The test clips and their labels, and the training code, which is on [GitHub](https://github.com/amaan784/trained-eye).
45
+
46
+ ## How to use it
47
+
48
+ Send each frame the way the training examples were built:
49
+
50
+ - System message: `You watch first-person camera frames for one condition. Answer only yes or no.`
51
+ - User message: the frame, padded (not cropped) to 512 x 512 pixels with black
52
+ bars, then this text: `Condition: <what to watch for>. Not: <a near-miss>; <another>.
53
+ Is the condition true in this frame?`
54
+
55
+ The conditions it was trained with, word for word:
56
+
57
+ | Skill | Asked as | Condition | Not |
58
+ |---|---|---|---|
59
+ | burner_left_on | Tell me when a burner has been left on | a burner is visibly on with a blue gas flame or glowing red hot and no pot or pan on it | a burner is off, dark and unlit with no flame or glow; a burner is on but has a pot or pan sitting on it; an unlit neighbouring burner on the same cooktop; shiny foil burner liner or metal grate with no flame or red glow |
60
+ | fridge_left_open | Tell me when the fridge door is left open | the fridge door stands open with its brightly lit interior, food shelves, and door bins exposed | the fridge doors are fully closed, showing only the dark flat exterior with no interior light visible; the bottom freezer drawer is closed beneath the fridge compartment; a closed kitchen cabinet above the refrigerator; an open cabinet or pantry door that is not the refrigerator |
61
+
62
+ Glimmer writes a short reasoning before it answers, so read the last `yes` or `no` token it
63
+ generates, and take the chance of yes from that token's top logprobs (yes over yes plus
64
+ no). An alert should wait until that chance has stayed over a threshold, calibrated on
65
+ your own labelled clips, for the skill's hold (Trained Eye's watcher does this).
66
+
67
+ What ran on Nov 4: the adapter merged into the bf16 base with PEFT's
68
+ `merge_and_unload()` on one 80 GB H100, then served with vLLM's
69
+ `vllm/vllm-openai:muse-glimmer` image, each request with `logprobs` on, `top_logprobs`
70
+ 10, up to 512 new tokens and `chat_template_kwargs` `{"reasoning_strength": "low"}`.
71
+ Loading the adapter with vLLM's `--enable-lora` did not start for this model on that
72
+ image. The merge, as the project's `te export` runs it:
73
+
74
+ ```python
75
+ import torch
76
+ from peft import PeftModel
77
+ from transformers import AutoModelForImageTextToText, AutoProcessor
78
+
79
+ base, revision = "meta-models/Muse-Glimmer-30B", "a4e59da52a7bc87ae7251dd5545c0dd437c44b68"
80
+ model = AutoModelForImageTextToText.from_pretrained(
81
+ base, revision=revision, torch_dtype=torch.bfloat16, device_map="auto")
82
+ model = PeftModel.from_pretrained(model, "amaan784/trained-eye").merge_and_unload()
83
+ model.save_pretrained("trained-eye-merged")
84
+ AutoProcessor.from_pretrained(base, revision=revision).save_pretrained("trained-eye-merged")
85
+ ```
86
+
87
+ ## Results
88
+
89
+ In short: on other kitchens filmed first-person on phones, the fine-tuned model spotted the condition about as accurately as base Glimmer and less accurately than Muse Spark (frame F1 0.87, 0.88 and 0.94), answering in 1.64 s a frame against 2.53 s and 11.80 s, at $4.00 an hour against $16.53 for Spark.
90
+
91
+ | Skill | Model | Frame precision | Frame recall | Frame F1 | Frame accuracy | Seconds per frame | Dollars per hour |
92
+ |---|---|---|---|---|---|---|---|
93
+ | burner_left_on | this adapter | 1.00 | 0.47 | 0.64 | 0.70 | 1.69 | $4.10 |
94
+ | burner_left_on | base Muse Glimmer 30B | 1.00 | 0.65 | 0.79 | 0.80 | 3.22 | $4.26 |
95
+ | burner_left_on | Muse Spark (API) | 0.98 | 0.96 | 0.97 | 0.97 | 11.93 | $16.53 |
96
+ | fridge_left_open | this adapter | 0.93 | 0.96 | 0.95 | 0.95 | 1.58 | $3.95 |
97
+ | fridge_left_open | base Muse Glimmer 30B | 0.86 | 0.97 | 0.91 | 0.91 | 2.34 | $3.95 |
98
+ | fridge_left_open | Muse Spark (API) | 0.87 | 0.98 | 0.92 | 0.91 | 11.67 | $16.53 |
99
+
100
+ Test footage: other kitchens filmed first-person on phones (handheld; four fridges and two stoves the model was not taught on; labels drafted by an AI assistant, see docs/evaluation.md). From `te eval`'s `results.json` (SHA-256 `6704865a78632b3e1d28aa5b50c1f56ca68537b9307949ead80969b32ecb1d8a`); evaluations scored: 6, pending: 0. n/a means there was nothing to compute it from. Each skill alerts only once its condition has stayed true for its hold: event_recall_in_window counts an alert within the skill's window after the hold ends, and time_to_alert_median_s is counted from the end of the hold. Holds and windows: burner_left_on, a 10 s hold and a 5 s window; fridge_left_open, a 20 s hold and a 10 s window. Thresholds were calibrated for frame F1 (this footage has too few events past the hold to judge alerts).
101
+
102
+ <details><summary>Every scored evaluation</summary>
103
+
104
+ | evaluation | experiment | skill | variant | hours | precision | recall | f1 | event_recall_in_window | false_alarms_per_hour | time_to_alert_median_s | latency_median_s | usd_per_hour |
105
+ |---|---|---|---|---|---|---|---|---|---|---|---|---|
106
+ | phone-exp4-finetuned-fridge_left_open | 4 | fridge_left_open | finetuned | 0.1322 | 0.9328 | 0.9633 | 0.9478 | 0.6667 | 7.563 | 0.0 | 1.5845 | 3.95 |
107
+ | phone-exp4-base-fridge_left_open | 4 | fridge_left_open | base | 0.1322 | 0.8614 | 0.9746 | 0.9145 | 0.6667 | 7.563 | 0.0 | 2.341 | 3.95 |
108
+ | phone-exp4-spark-fridge_left_open | 4 | fridge_left_open | spark | 0.1322 | 0.8723 | 0.9755 | 0.921 | 0.6667 | 7.563 | 0.0 | 11.6665 | 16.5276 |
109
+ | phone-exp4-finetuned-burner_left_on | 4 | burner_left_on | finetuned | 0.0594 | 1.0 | 0.4667 | 0.6364 | 0.0 | 0.0 | 13.0 | 1.689 | 4.1045 |
110
+ | phone-exp4-base-burner_left_on | 4 | burner_left_on | base | 0.0594 | 1.0 | 0.65 | 0.7879 | 0.5 | 0.0 | 0.0 | 3.2215 | 4.2589 |
111
+ | phone-exp4-spark-burner_left_on | 4 | burner_left_on | spark | 0.0594 | 0.9829 | 0.9583 | 0.9705 | 0.5 | 16.8224 | 9.5 | 11.9315 | 16.5276 |
112
+
113
+ </details>
114
+
115
+ The full tables, the EPIC-KITCHENS-100 results and how it was measured are on GitHub:
116
+ [results](https://github.com/amaan784/trained-eye/blob/main/eval/results.md), [EPIC-KITCHENS](https://github.com/amaan784/trained-eye/blob/main/eval/epic/results.md),
117
+ [method](https://github.com/amaan784/trained-eye/blob/main/docs/evaluation.md).
118
 
119
  ## Training
120
 
 
157
 
158
  The generated images are not included. `manifests/` lists every edit prompt with the SHA-256 of its keyframe and of its image. For burner_left_on, fridge_left_open, `te regenerate` needs the original keyframes, which are not published.
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  ## Uses
161
 
162
  Intended: yes/no watch skills on first-person frames from smart glasses or a phone, each
 
187
  ## License
188
 
189
  `apache-2.0` as the base model's (meta-models/Muse-Glimmer-30B at revision `a4e59da52a7bc87ae7251dd5545c0dd437c44b68`; its license text is in `LICENSE`). These weights are a modification of that model: QLoRA fine-tuning on the data above (for a merged build, that adapter merged into the base). Any use is also subject to Meta's [Muse Glimmer Usage Policy](https://huggingface.co/meta-models/Muse-Glimmer-30B/blob/main/USAGE_POLICY.md).
190
+
191
+ ## Citation
192
+
193
+ ```bibtex
194
+ @software{sheikh2026trainedeye,
195
+ author = {Sheikh, Amaan},
196
+ title = {Trained Eye: Teach Your Glasses to Notice Anything},
197
+ year = {2026},
198
+ month = nov,
199
+ url = {https://github.com/amaan784/trained-eye}
200
+ }
201
+ ```
release.json CHANGED
@@ -11,8 +11,8 @@
11
  },
12
  {
13
  "path": "README.md",
14
- "bytes": 6421,
15
- "sha256": "5a94223f6ffc7b35c084a0054460dec6d83d4044fe91e8e5f1b418fcb560e044"
16
  },
17
  {
18
  "path": "adapter_config.json",
 
11
  },
12
  {
13
  "path": "README.md",
14
+ "bytes": 13141,
15
+ "sha256": "3d64879065af36515d76bc616b8ee7262c5dc3c1dea5abd95998f910ea504bf8"
16
  },
17
  {
18
  "path": "adapter_config.json",