Mick228 commited on
Commit
6d84eb5
·
verified ·
1 Parent(s): be08dff

Publish SideView_Pupil_2P_v1

Browse files
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: facemap
3
+ pipeline_tag: keypoint-detection
4
+ tags:
5
+ - labelforge
6
+ - labelforge-base-model
7
+ - facemap
8
+ - pose-estimation
9
+ - mouse
10
+ - side-view
11
+ - pupil
12
+ - eye
13
+ - 2p
14
+ ---
15
+
16
+ # SideView_Pupil_2P_v1
17
+
18
+ 2P side-view eye and pupil tracking. A LabelForge base model from the Musall Lab.
19
+
20
+ | | |
21
+ |---|---|
22
+ | View | Side View |
23
+ | Target | Pupil |
24
+ | Variant | 2P |
25
+ | Version | v1 |
26
+ | Status | final |
27
+ | Backend | Facemap |
28
+ | Keypoints | 12 |
29
+ | Source model | `Pupil_2P_v3_12kp` |
30
+
31
+ ## Keypoints
32
+
33
+ Listed in model-output order. **Do not reorder them**; groups, colours and shortcuts can be changed in LabelForge without affecting the model.
34
+
35
+ | # | Keypoint | Group |
36
+ |---|---|---|
37
+ | 1 | `eye_top` | Eye |
38
+ | 2 | `eye_bottom` | Eye |
39
+ | 3 | `eye_front` | Eye |
40
+ | 4 | `eye_back` | Eye |
41
+ | 5 | `pupil_top` | Pupil |
42
+ | 6 | `pupil_bottom` | Pupil |
43
+ | 7 | `pupil_front` | Pupil |
44
+ | 8 | `pupil_back` | Pupil |
45
+ | 9 | `nose_tip` | Nose |
46
+ | 10 | `nose_bottom` | Nose |
47
+ | 11 | `mouth` | Mouth |
48
+ | 12 | `lowerlip` | Mouth |
49
+
50
+ ## Training
51
+
52
+ | | |
53
+ |---|---|
54
+ | Facemap version | 1.0.8 |
55
+ | Training mode | finetune |
56
+ | Training frames | 43 |
57
+ | Epochs | 80 |
58
+ | Batch size | 1 |
59
+ | Learning rate | 0.0001 |
60
+ | Image size (H x W) | 1024x1280 |
61
+
62
+ General Facemap 12-keypoint trainer. NEW mode starts from the original Facemap pretrained network with fresh 12-keypoint heads. FINE-TUNE mode loads and verifies an existing 12-keypoint model before continuing training. Partially labeled frames are retained. Invisible, unset, missing, or invalid individual keypoints are stored as NaN and masked by Facemap during training.
63
+
64
+ ## Use in LabelForge
65
+
66
+ Download the model from LabelForge's **Model Library**, or select `SideView_Pupil_2P_v1.pt` directly. `labelforge_model.json` sets the version, keypoint groups, colours and locked keypoint order automatically.
67
+
68
+ To fetch it from Python:
69
+
70
+ ```python
71
+ from huggingface_hub import snapshot_download
72
+ path = snapshot_download("MusallLab/LabelForge-SideView_Pupil_2P_v1")
73
+ ```
74
+
75
+ ## Files
76
+
77
+ - `SideView_Pupil_2P_v1.pt`: Facemap model weights
78
+ - `labelforge_model.json`: LabelForge metadata (keypoint schema, version)
79
+ - `labels.csv`, `keypoints.txt`: keypoint order
80
+ - `training_model_info.json`: training statistics
SideView_Pupil_2P_v1.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6882550db0a5ee9d788458e9beafb45f148d5f1fc3633af938dd93bfcb52e225
3
+ size 8635350
keypoints.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ eye_top
2
+ eye_bottom
3
+ eye_front
4
+ eye_back
5
+ pupil_top
6
+ pupil_bottom
7
+ pupil_front
8
+ pupil_back
9
+ nose_tip
10
+ nose_bottom
11
+ mouth
12
+ lowerlip
labelforge_model.json ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": 1,
3
+ "model_name": "SideView_Pupil_2P_v1",
4
+ "model_family": "SideView_Pupil_2P",
5
+ "display_name": "Pupil",
6
+ "variant": "2P",
7
+ "version": 1,
8
+ "backend": "facemap",
9
+ "model_path": "SideView_Pupil_2P_v1.pt",
10
+ "parent_model": null,
11
+ "keypoint_schema": {
12
+ "locked": true,
13
+ "groups": [
14
+ {
15
+ "name": "Eye",
16
+ "palette": "Blue",
17
+ "keypoints": [
18
+ {
19
+ "name": "eye_top",
20
+ "color": "#5DA9E9",
21
+ "shortcut": ""
22
+ },
23
+ {
24
+ "name": "eye_bottom",
25
+ "color": "#4A98DD",
26
+ "shortcut": ""
27
+ },
28
+ {
29
+ "name": "eye_front",
30
+ "color": "#3787D1",
31
+ "shortcut": ""
32
+ },
33
+ {
34
+ "name": "eye_back",
35
+ "color": "#2476C5",
36
+ "shortcut": ""
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ "name": "Pupil",
42
+ "palette": "Green",
43
+ "keypoints": [
44
+ {
45
+ "name": "pupil_top",
46
+ "color": "#74D99B",
47
+ "shortcut": ""
48
+ },
49
+ {
50
+ "name": "pupil_bottom",
51
+ "color": "#60CE89",
52
+ "shortcut": ""
53
+ },
54
+ {
55
+ "name": "pupil_front",
56
+ "color": "#4CC377",
57
+ "shortcut": ""
58
+ },
59
+ {
60
+ "name": "pupil_back",
61
+ "color": "#38B865",
62
+ "shortcut": ""
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "Nose",
68
+ "palette": "Orange",
69
+ "keypoints": [
70
+ {
71
+ "name": "nose_tip",
72
+ "color": "#E7A15E",
73
+ "shortcut": ""
74
+ },
75
+ {
76
+ "name": "nose_bottom",
77
+ "color": "#DF9550",
78
+ "shortcut": ""
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "name": "Mouth",
84
+ "palette": "Red",
85
+ "keypoints": [
86
+ {
87
+ "name": "mouth",
88
+ "color": "#ED7A78",
89
+ "shortcut": ""
90
+ },
91
+ {
92
+ "name": "lowerlip",
93
+ "color": "#E86866",
94
+ "shortcut": ""
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ },
100
+ "training_dataset": null,
101
+ "keypoint_source": "labels.csv",
102
+ "training_settings": {},
103
+ "created_at": "2026-08-26T15:36:38.824818Z",
104
+ "imported_external_model": true,
105
+ "status": "final",
106
+ "purpose": "2P side-view eye and pupil tracking",
107
+ "original_model_path": "\\\\NASKAMPA\\lts\\Team\\Mick\\FM_Side_View\\Pupil_Model\\2P_Finetune\\Current_Model\\Pupil_2P_v3_12kp.pt",
108
+ "source_model_name": "Pupil_2P_v3_12kp"
109
+ }
labels.csv ADDED
@@ -0,0 +1 @@
 
 
1
+ eye_top_x,eye_top_y,eye_bottom_x,eye_bottom_y,eye_front_x,eye_front_y,eye_back_x,eye_back_y,pupil_top_x,pupil_top_y,pupil_bottom_x,pupil_bottom_y,pupil_front_x,pupil_front_y,pupil_back_x,pupil_back_y,nose_tip_x,nose_tip_y,nose_bottom_x,nose_bottom_y,mouth_x,mouth_y,lowerlip_x,lowerlip_y
training_model_info.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "Pupil_2P_v3_12kp",
3
+ "facemap_version": "1.0.8",
4
+ "training_mode": "finetune",
5
+ "view": "sideview",
6
+ "number_of_keypoints": 12,
7
+ "labels": [
8
+ "eye_top",
9
+ "eye_bottom",
10
+ "eye_front",
11
+ "eye_back",
12
+ "pupil_top",
13
+ "pupil_bottom",
14
+ "pupil_front",
15
+ "pupil_back",
16
+ "nose_tip",
17
+ "nose_bottom",
18
+ "mouth",
19
+ "lowerlip"
20
+ ],
21
+ "start_model": "\\\\NASKAMPA\\lts\\Team\\Mick\\FM_Side_View\\Pupil_Model\\2P_Finetune\\Current_Model\\Pupil_2P_v2_12kp_NEXT.pt",
22
+ "start_model_sha256": "1f1ddab274197187903f01c30032ccbdd01f2e6ee717f61a384d073c101cdf6f",
23
+ "output_model": "\\\\NASKAMPA\\lts\\Team\\Mick\\FM_Side_View\\Pupil_Model\\2P_Finetune\\Current_Model\\Pupil_2P_v3_12kp.pt",
24
+ "training_sets": [
25
+ {
26
+ "frame_dir": "\\\\NASKAMPA\\lts\\Team\\Mick\\FM_Side_View\\Pupil_Model\\2P_Finetune\\Training_Data\\Extracted_Frames\\Round_02",
27
+ "label_csv": "\\\\NASKAMPA\\lts\\Team\\Mick\\FM_Side_View\\Pupil_Model\\2P_Finetune\\Training_Data\\Labels\\Round_02_12kp_labels.csv"
28
+ }
29
+ ],
30
+ "training_frames_used": 43,
31
+ "training_frames_skipped": 0,
32
+ "visible_keypoints_used": 488,
33
+ "masked_keypoints": 28,
34
+ "skipped_frames": [],
35
+ "epochs": 80,
36
+ "batch_size": 1,
37
+ "learning_rate": 0.0001,
38
+ "weight_decay": 0.0,
39
+ "bbox": [
40
+ [
41
+ 0,
42
+ 1024,
43
+ 0,
44
+ 1280
45
+ ]
46
+ ],
47
+ "image_shape": [
48
+ 43,
49
+ 1024,
50
+ 1280
51
+ ],
52
+ "keypoints_shape": [
53
+ 43,
54
+ 12,
55
+ 2
56
+ ],
57
+ "initialization_video": "\\\\NASKAMPA\\lts\\Projects\\singleNeuronLearning\\2p_PuffyPenguin\\482\\PuffyPenguin\\Session Data\\20260528_153745\\482_PuffyPenguin_20260528_153745_cam1_20260527.avi",
58
+ "note": "General Facemap 12-keypoint trainer. NEW mode starts from the original Facemap pretrained network with fresh 12-keypoint heads. FINE-TUNE mode loads and verifies an existing 12-keypoint model before continuing training. Partially labeled frames are retained. Invisible, unset, missing, or invalid individual keypoints are stored as NaN and masked by Facemap during training."
59
+ }