23f1000805 commited on
Commit
5d9302b
·
verified ·
1 Parent(s): 3f27779

deploy face_expr_v3_frozen cv 0.6937

Browse files
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: scikit-learn
3
+ tags:
4
+ - facial-expression
5
+ - py-feat
6
+ - linear-model
7
+ ---
8
+
9
+ # Face expression matcher (linear-rank-v1)
10
+
11
+ A linear model over 78 Py-Feat 2.1.5 features and their 78 within person ranks (156 inputs, 10 expressions). The 10 photos of one person are matched one to one with the Hungarian algorithm.
12
+
13
+ Trained on 58 unique people (580 photos); 62 duplicate people across the ZIP files were removed before any split. Model: `ridge_a1000`.
14
+
15
+ Matching accuracy on unseen people: 0.6937 +- 0.0121 over 6 repeats of 5 fold person-grouped CV, 95 percent interval over people 0.643 to 0.748. Chance is 0.10.
16
+ The winner was picked among several candidates on the same splits, so this is slightly optimistic. Photos are not used by the final linear model.
17
+
18
+ | candidate | mean accuracy | std |
19
+ |---|---|---|
20
+ | ridge_a1000 | 0.6937 | 0.0121 |
21
+ | lr_C0.02 | 0.6888 | 0.0091 |
22
+ | lda_shrink0.5 | 0.6876 | 0.0161 |
23
+ | listwise_lam0.3_mix0.8 | 0.6856 | 0.0101 |
24
+ | lda_shrink0.7 | 0.6848 | 0.0146 |
25
+ | lr_C0.01 | 0.6848 | 0.0111 |
26
+ | lr_C0.005 | 0.6839 | 0.0135 |
27
+ | ridge_a3000 | 0.6825 | 0.0066 |
28
+ | lda_shrink0.85 | 0.6805 | 0.0079 |
29
+ | lr_C0.003 | 0.6753 | 0.0134 |
30
+ | lr_C0.05 | 0.6721 | 0.0097 |
31
+
32
+ | expression | accuracy |
33
+ |---|---|
34
+ | neutral | 0.750 |
35
+ | happy | 0.919 |
36
+ | sad | 0.428 |
37
+ | angry | 0.822 |
38
+ | surprised | 0.951 |
39
+ | contempt | 0.796 |
40
+ | restrained-amusement | 0.747 |
41
+ | scepticism | 0.557 |
42
+ | uncertainty | 0.503 |
43
+ | hopelessness | 0.463 |
44
+
45
+ Learning curve (tested on unseen people): 11 people: 0.565, 23 people: 0.653, 35 people: 0.677, 47 people: 0.700.
46
+
47
+ Labels are what people were asked to show, and the features are model predictions, so this is not a measure of true feelings.
48
+
49
+ ## Files
50
+
51
+ model.json is the grader format, model.safetensors holds the same weights in float64, config.json holds the column order, inference.py loads the model from a folder or the Hub, app.py is a Gradio demo, reports/ holds metrics.json and all tables and figures, run_info.json the settings and library versions, run_log.txt the full log, artifacts/ the out-of-fold predictions.
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ import pandas as pd
57
+ from inference import ExpressionMatcher
58
+ m = ExpressionMatcher("23f1000805/face-expression-v3")
59
+ print(m.predict(pd.read_csv("one_person_10_photos.csv")))
60
+ ```
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import gradio as gr
3
+ from inference import ExpressionMatcher
4
+
5
+ MODEL = ExpressionMatcher("23f1000805/face-expression-v3")
6
+
7
+
8
+ def run(path):
9
+ df = pd.read_csv(path)
10
+ return MODEL.predict_table(df)
11
+
12
+
13
+ demo = gr.Interface(
14
+ run,
15
+ gr.File(label="features.csv with 10 photos per person", type="filepath"),
16
+ gr.Dataframe(label="matched expressions"),
17
+ title="Face expression matcher",
18
+ description="Upload the Py-Feat feature csv of one or more people (10 photos each, with a person_id column if there are several people).",
19
+ )
20
+
21
+ if __name__ == "__main__":
22
+ demo.launch()
artifacts/oof_predictions_first_repeat.csv ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "linear-rank-v1",
3
+ "labels": [
4
+ "neutral",
5
+ "happy",
6
+ "sad",
7
+ "angry",
8
+ "surprised",
9
+ "contempt",
10
+ "restrained-amusement",
11
+ "scepticism",
12
+ "uncertainty",
13
+ "hopelessness"
14
+ ],
15
+ "feature_columns": [
16
+ "bs_browDownLeft",
17
+ "bs_browDownRight",
18
+ "bs_browInnerUp",
19
+ "bs_browOuterUpLeft",
20
+ "bs_browOuterUpRight",
21
+ "bs_cheekPuff",
22
+ "bs_cheekSquintLeft",
23
+ "bs_cheekSquintRight",
24
+ "bs_eyeBlinkLeft",
25
+ "bs_eyeBlinkRight",
26
+ "bs_eyeLookDownLeft",
27
+ "bs_eyeLookDownRight",
28
+ "bs_eyeLookInLeft",
29
+ "bs_eyeLookInRight",
30
+ "bs_eyeLookOutLeft",
31
+ "bs_eyeLookOutRight",
32
+ "bs_eyeLookUpLeft",
33
+ "bs_eyeLookUpRight",
34
+ "bs_eyeSquintLeft",
35
+ "bs_eyeSquintRight",
36
+ "bs_eyeWideLeft",
37
+ "bs_eyeWideRight",
38
+ "bs_jawForward",
39
+ "bs_jawLeft",
40
+ "bs_jawOpen",
41
+ "bs_jawRight",
42
+ "bs_mouthClose",
43
+ "bs_mouthDimpleLeft",
44
+ "bs_mouthDimpleRight",
45
+ "bs_mouthFrownLeft",
46
+ "bs_mouthFrownRight",
47
+ "bs_mouthFunnel",
48
+ "bs_mouthLeft",
49
+ "bs_mouthLowerDownLeft",
50
+ "bs_mouthLowerDownRight",
51
+ "bs_mouthPressLeft",
52
+ "bs_mouthPressRight",
53
+ "bs_mouthPucker",
54
+ "bs_mouthRight",
55
+ "bs_mouthRollLower",
56
+ "bs_mouthRollUpper",
57
+ "bs_mouthShrugLower",
58
+ "bs_mouthShrugUpper",
59
+ "bs_mouthSmileLeft",
60
+ "bs_mouthSmileRight",
61
+ "bs_mouthStretchLeft",
62
+ "bs_mouthStretchRight",
63
+ "bs_mouthUpperUpLeft",
64
+ "bs_mouthUpperUpRight",
65
+ "bs_noseSneerLeft",
66
+ "bs_noseSneerRight",
67
+ "au_AU01",
68
+ "au_AU02",
69
+ "au_AU04",
70
+ "au_AU05",
71
+ "au_AU06",
72
+ "au_AU07",
73
+ "au_AU09",
74
+ "au_AU10",
75
+ "au_AU11",
76
+ "au_AU12",
77
+ "au_AU14",
78
+ "au_AU15",
79
+ "au_AU17",
80
+ "au_AU20",
81
+ "au_AU23",
82
+ "au_AU24",
83
+ "au_AU25",
84
+ "au_AU26",
85
+ "au_AU28",
86
+ "au_AU43",
87
+ "emotion_Neutral",
88
+ "emotion_Happy",
89
+ "emotion_Sad",
90
+ "emotion_Surprise",
91
+ "emotion_Fear",
92
+ "emotion_Disgust",
93
+ "emotion_Anger"
94
+ ],
95
+ "rank_mode": "minmax",
96
+ "input_order": "78 raw features then 78 within person ranks",
97
+ "chosen": {
98
+ "name": "ridge_a1000",
99
+ "kind": "linear",
100
+ "cv": 0.6936781609195402,
101
+ "std": 0.012096301827499548,
102
+ "used_teacher": false
103
+ },
104
+ "candidate": {
105
+ "name": "ridge_a1000",
106
+ "kind": "ridge",
107
+ "alpha": 1000.0
108
+ },
109
+ "cv_accuracy": 0.6937,
110
+ "cv_std": 0.0121,
111
+ "n_people": 58,
112
+ "n_photos": 580,
113
+ "run": "face_expr_v3_frozen",
114
+ "platform": "colab"
115
+ }
inference.py ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ import numpy as np
6
+ import pandas as pd
7
+ from scipy.optimize import linear_sum_assignment
8
+ from safetensors.numpy import load_file
9
+
10
+
11
+ class ExpressionMatcher:
12
+ def __init__(self, src="."):
13
+ p = Path(src)
14
+ if not p.is_dir():
15
+ from huggingface_hub import snapshot_download
16
+ p = Path(snapshot_download(src))
17
+ self.cfg = json.load(open(p / "config.json"))
18
+ self.w = load_file(str(p / "model.safetensors"))["weights"].astype(np.float64)
19
+ self.cols = self.cfg["feature_columns"]
20
+ self.labels = self.cfg["labels"]
21
+
22
+ def inputs(self, df):
23
+ raw = df[self.cols].values.astype(float)
24
+ rk = df[self.cols].rank(method="average").values
25
+ if self.cfg["rank_mode"] == "minmax":
26
+ rk = (rk - 1) / (len(df) - 1)
27
+ else:
28
+ rk = rk / len(df)
29
+ return np.hstack([raw, rk])
30
+
31
+ def scores(self, df):
32
+ return self.inputs(df) @ self.w.T
33
+
34
+ def predict(self, df):
35
+ if len(df) != 10:
36
+ raise ValueError("need the 10 photos of one person, got %d" % len(df))
37
+ s = self.scores(df)
38
+ r, c = linear_sum_assignment(-s)
39
+ out = [None] * len(df)
40
+ for i in range(len(r)):
41
+ out[r[i]] = self.labels[c[i]]
42
+ return out
43
+
44
+ def predict_table(self, df):
45
+ df = df.reset_index(drop=True)
46
+ key = "person_id" if "person_id" in df.columns else None
47
+ parts = []
48
+ groups = df.groupby(key) if key else [(0, df)]
49
+ for pid, grp in groups:
50
+ res = grp.copy()
51
+ res["predicted_expression"] = self.predict(grp)
52
+ parts.append(res)
53
+ keep = [c for c in ("person_id", "photo_id", "predicted_expression") if c in parts[0].columns]
54
+ return pd.concat(parts)[keep]
55
+
56
+
57
+ if __name__ == "__main__":
58
+ csv = sys.argv[1]
59
+ src = sys.argv[2] if len(sys.argv) > 2 else "."
60
+ m = ExpressionMatcher(src)
61
+ print(m.predict_table(pd.read_csv(csv)).to_string(index=False))
model.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":"linear-rank-v1","weights":[[-0.0066232761,-0.0067006629,-0.011813977,-0.0090590119,-0.0051868042,16.885595,3694.108,3364.4803,0.0054331695,0.0088439326,-0.011012842,-0.0089898815,-0.020696076,0.0053639571,-0.010521284,-0.023804961,-0.00068019507,0.0059733405,-0.016258991,-0.013007639,-0.037303975,-0.034203078,2.0704992,-1.3937379,0.016120381,-1.844539,0.087465317,-0.10366903,-0.062842679,-0.12347758,-0.12528552,-0.02904913,-0.1151341,0.060416029,0.060364828,-0.007106256,-0.0082040602,0.0039983579,-0.030827491,-0.013292578,-0.023038158,0.0096527557,0.0093489834,-0.011210429,-0.010424045,-0.059177291,-0.082451344,0.021818358,0.019307822,493.23846,-1647.1759,-0.01327112,-0.010698893,-0.014990295,-0.018065032,0.00037974247,0.0034660027,0.035352486,-0.024064906,0.010919832,-0.0079176848,0.0053690523,-0.0077470169,-0.016526501,0.0073233658,0.0086126755,0.0072601065,-0.0063131162,-0.018419284,-0.0011389916,-0.01817845,0.05348106,-0.021503716,-0.021200453,-0.024409931,-0.019255043,-0.0020865345,-0.027295467,-0.005646374,-0.017530704,-0.0023686629,0.011012482,0.016345439,-0.024893884,-0.024476073,-0.02862512,-0.0066495461,-0.0074812131,-0.017197944,-0.017607812,-0.0030669866,-0.0049745021,0.00093393787,0.0013140856,0.0158024,0.018984534,-0.025094162,-0.013068267,0.0072459168,0.014204245,-0.013398835,-0.0082083053,-0.0058714772,-0.0045744555,-0.0040409769,0.005761142,-0.0040414628,0.00011452155,0.00021654767,0.016894904,0.0050264166,0.0055191524,-0.0015735136,0.014649792,0.0042272086,0.0088734066,0.0015765217,-0.019273614,-0.021379701,-0.010720107,-0.00032379027,-0.012652749,-0.014382002,-0.011863036,-0.021028346,-0.0078681611,-0.013441357,0.031064547,0.014712666,-0.026042491,-0.032661027,-0.023580856,-0.010117072,-0.019507024,-0.0086230529,-0.011371949,-0.052328435,0.00027870887,-0.017398803,0.011030757,0.0050684087,-0.031756421,-0.015549922,0.0025214097,-0.0054949717,0.0070205739,-0.031800342,0.023798649,-0.033182727,0.072823764,0.006881713,-0.01088678,-0.023171754,-0.04097542,-0.050619739,0.0070591472],[-0.020985681,-0.019786901,-0.010785483,-0.0072580584,-0.0065150324,4.4394026,5062.5878,11311.123,0.0098184338,0.012838717,-0.0049258489,-0.0045758547,-0.0016577382,-0.024103662,-0.0069551963,0.013559365,0.011136981,0.010762518,-0.020201963,-0.0060370536,-0.049650549,-0.052011206,20.671547,-1.3573854,-0.05471819,-0.25785072,0.042376241,-0.19060705,-0.21685286,0.02679181,0.032051111,0.017802022,-0.18222163,-0.016932499,0.011344336,0.0081713565,0.010183811,0.0071658567,-0.043738425,0.016406701,-0.0011532681,-0.035658884,-0.086553305,0.045109145,0.047109189,-0.046734293,-0.015078424,0.07953285,0.07968426,-451.56059,1925.7538,-0.0049861248,-0.012361413,-0.0077949111,0.0014311512,0.044669627,0.0087994428,-0.095459247,0.023581939,-0.012684067,0.053170481,-0.0073663926,-0.014482242,0.0034730528,-0.11438287,0.0044307508,-0.0089465788,0.0047123596,-0.036468904,-0.0024232812,-0.02628544,-0.022908485,0.044014413,-0.0030973598,-0.027689446,0.0060202787,-0.056989914,0.0050813969,0.0099815795,0.0085872677,-0.00037914478,-0.013149854,-0.010735432,0.0075042415,0.0044442106,0.0079526336,0.018629785,0.01307251,0.0053009452,0.0053251102,0.0011871326,0.0087788237,0.0087056091,-0.0014602616,0.0069662964,0.0015195985,-0.0020335633,0.013911788,-0.0042933534,-0.00096444151,0.011971825,-0.0019944327,-0.0017968201,-0.015464298,-0.010216656,0.0068901586,0.00059214657,-0.01944098,-0.017171704,0.018695205,0.0025659619,0.00084010928,0.016679028,0.014051626,0.0063402005,0.0039001598,-0.0021881783,-0.0062058143,0.020880017,-0.014211976,-0.012038503,0.010649294,0.012084184,0.013470625,0.011202003,0.013415008,0.010494758,0.0045614141,0.01609156,-0.028540291,-0.015447515,-0.032046651,-0.0089718189,0.015404435,0.010215896,-0.0073069457,0.028797467,-0.0029206806,0.010613976,-0.0064989871,-0.029792639,-0.019925576,-0.024696657,-0.012843358,-0.00888294,0.020057491,-0.022348766,-0.0044450077,-0.010480067,-0.036740057,0.016959918,-0.026509108,-0.02189247,-0.029478333,-0.044282014,-0.039394829],[-0.0091538305,0.00046810334,-0.0018152398,0.00083813367,-0.0053088886,5.1525186,1611.9134,-385.21355,0.014521507,0.013043151,-0.010540179,-0.012642891,-0.010645649,-0.02482752,0.0011941973,-0.017258418,0.0026514201,0.000282158,0.0042971093,0.0097638823,-0.00063649326,0.011203298,-0.33522935,-0.13544493,0.01553505,1.3405219,0.0092987917,-0.07958781,-0.035086601,0.074902188,0.18341964,0.048689746,-0.18616291,-0.034135381,-0.025976762,-0.026995634,-0.021981391,-0.013959269,-0.012784687,0.002309964,0.013696933,0.014844042,0.15935689,-0.0042863506,-0.0043170844,0.085582634,0.12649,0.022641691,0.022478519,1192.7084,1411.3254,0.0035044944,-0.012619644,-0.00036882384,0.00029898051,-0.0095183315,0.0033964929,-0.01963872,-0.006438254,0.00081772226,-0.012003629,-0.011819243,0.041920005,0.03305472,-0.013299531,-0.0074010697,0.00098566116,-0.0018714247,0.010338503,-0.019732433,0.01302711,-7.3832134e-05,-0.011145457,0.037351867,0.00093269308,-0.0027845221,0.031680557,-0.029020712,-0.013291417,-0.013881723,0.02013747,0.014373299,0.0045677712,-0.020386106,0.011257852,-0.004128015,0.011993893,0.0094708924,0.0051256495,0.0043665549,0.010006373,-0.012376971,-0.00030027854,0.011198378,-0.0012221631,-0.008512569,-0.015554336,-0.0142523,-0.0051671379,-0.017688029,-0.020851107,0.023534272,-0.001060625,-0.0060283298,0.00083264479,-0.0079014513,-0.011774598,0.023461274,0.02247968,-0.012936631,0.025875298,-0.018205678,-0.0050318719,-0.010858205,0.0039055006,0.0038851174,-0.023288616,0.0031450005,-0.0005194846,0.012067171,0.0059474162,0.0047407617,0.001828766,0.017653687,0.011313978,0.0058354234,0.0040702674,0.0088707866,0.014520261,-0.00097639449,-0.013909148,0.014795598,0.0042401806,-0.0058467069,-0.020134495,-0.0053136544,-0.010530833,-0.0088331182,0.0082160652,-0.018745689,0.038215585,0.02032952,0.022356194,-0.024777244,0.011762285,-0.019156972,-0.012614819,-0.010288591,0.029030193,-0.01497845,-0.013104141,0.047105921,-0.044631327,-0.0185978,0.0073815964,-0.02005347],[0.057499875,0.060295372,0.0028863748,-0.0051153038,-0.0084678099,36.53292,3690.4413,909.78655,-0.041971578,-0.052685201,0.007044901,0.0048010219,-0.12545493,-0.084854099,-0.052370138,-0.079026392,-0.0032699891,-0.0069010882,-0.020347862,-0.017995571,-0.053062888,-0.024907805,0.078354001,-2.8576795,0.010030778,-0.48398016,0.26755517,-0.052070776,-0.14425028,-0.16945134,-0.15675656,-0.11929112,-0.069665379,0.13595291,0.15448473,-0.025507229,-0.015229316,0.00040755138,-0.060853946,-0.013652472,-0.052387304,0.0025169516,-0.018511847,0.0016815555,0.0016848359,-0.012234949,0.019699805,-0.00076586365,-0.0013232,-544.7024,-1434.1603,-0.022081559,-0.0069270257,0.043956903,0.029385072,-0.010761503,-0.012378896,0.17157246,0.0047431975,0.0519875,-0.010881615,0.0069979702,0.013043539,0.0032061334,0.017007329,0.00073630474,0.0019376936,0.0026058332,-0.023391567,-0.020722127,-0.018243639,-0.020786129,-0.007598076,-0.02934654,-0.0080489237,0.037943582,-0.01342133,0.11522938,0.034136124,0.038904681,-0.041092695,-0.029269822,-0.036274104,-0.0039555886,-0.0064125566,0.00085954874,-0.016810878,-0.02532718,-0.016528039,-0.016411699,-0.0027703468,-0.022586042,0.0018659569,0.0030547798,0.013801715,0.015308538,-0.0052841826,0.0047700108,0.018883641,0.020082684,0.004683335,0.0011258915,0.0067836401,0.004901071,0.0064870378,0.0056671704,-0.0092622795,0.014315552,0.0079893919,0.016837588,-0.0085247978,-0.0093213311,0.00055163002,0.0091674691,0.0002264774,-0.00042249371,0.0086711788,0.0023093203,-0.0069904507,-0.0042792575,0.00525018,-0.0040013909,-0.0059851062,-0.00053842255,0.0083738232,-0.0071419908,-0.0068080386,-0.012547779,-0.0065122709,-0.014052798,-0.020652976,0.020173906,0.016271291,-0.0020096126,0.020126278,0.025500305,0.010032896,0.02078693,-0.002210968,0.001448436,0.033717823,0.0040134027,0.0025633201,0.024193505,0.015670435,-0.0068903926,-0.031711657,-0.01593005,-0.028208699,-0.029239885,-0.028456554,-0.0081841535,0.0080496921,0.05962009,0.024134232,0.053331713],[-0.0051074011,7.3873242e-05,-0.0038357614,0.0059337494,-0.00062686147,-4.3098229,-3584.4091,-4563.0867,-0.026973925,-0.016942653,0.015987204,0.018298812,-0.021297448,-0.013884175,-0.012580165,-0.032024646,-0.037040461,-0.037592746,-0.020921805,-0.024833986,0.21322825,0.23594375,-7.4997026,5.4659566,0.13277015,-3.2999521,-0.1303205,-0.0077434538,0.02279026,-0.016368866,-0.019388947,0.51475841,-0.014425682,0.059152561,-0.015807542,-0.018989874,-0.026673538,0.029582005,-0.024025681,-0.034936435,-0.024673378,-0.0059940221,0.042609582,-0.010630353,-0.0094027886,0.018978439,-0.0028544693,-0.030620482,-0.02928901,-801.98995,-1169.6427,0.0085672645,-0.0030500646,-0.0014525028,0.029041637,-0.00057389393,0.0022578253,-0.033948056,0.0079735281,-0.026861283,-0.0055004337,-0.0093161364,0.010315861,-0.0081504786,-0.020238212,0.0056233401,-0.01323129,0.021451027,0.099079623,-0.019384934,-0.0093322451,-0.02299134,-0.012803917,-0.0052868688,0.10271234,-0.010273853,-0.0072252841,-0.013163974,-0.0066336825,-0.011649557,0.011649115,0.016887546,0.017305253,0.020806616,0.013316256,0.018951095,-0.021950632,-0.022206028,-0.0016878156,-0.0017954242,0.0053793846,0.001952484,-0.010699719,-0.011925356,-0.012523702,-0.0076094807,-0.017406851,-0.022844082,0.014547145,0.013713042,0.010698745,0.022094023,0.017409273,0.018920179,0.010634229,-0.0010794039,0.019869823,-0.0099244578,-0.015545066,0.028648089,0.015172191,0.013414287,0.014424381,-0.024394003,-0.013812623,0.014058872,-0.00605808,-0.00065277751,0.003942325,-0.024533808,0.0010434391,-0.022369837,-0.014865814,-0.0032692902,-0.0039038651,0.0088187565,0.014913562,-0.007635767,-0.013524438,0.015327528,0.0082207075,-0.014993131,0.026582288,0.010205831,0.0032617278,-0.00020934531,0.0054010899,-0.026619365,0.011005091,-0.0019533928,0.0048359431,-0.010354519,-0.00061524428,0.0053073802,-0.0073604004,0.015398811,0.020645903,-0.018128999,-0.019432129,-0.030736046,-0.018407037,-0.033658803,0.01576784,0.014025128,-0.014218686,-0.028456917],[-0.0093377593,-0.0043403106,0.0061765936,0.0047466479,-0.0018327808,-1.8646888,-1677.4347,-3191.5064,-0.0073611716,0.0060770168,0.0051012219,0.0062022701,0.051351005,0.0076130837,0.013258478,0.052764842,0.028977425,0.02073336,-0.0036960029,-0.020547816,0.02142978,-0.032649955,-3.5199231,2.1697929,0.0031039351,5.4210843,0.10511378,0.43986934,0.45251486,-0.11889399,-0.12536653,0.032168524,1.048956,-0.0069839442,-0.018438212,-0.06711021,-0.03777199,-0.0089066362,0.4454972,-0.053620212,-0.072226948,-0.0027910871,0.015867024,-0.0014806006,-0.00032887856,0.0812704,0.13739728,-0.016004338,-0.01447113,-1630.4493,-712.06622,-0.0012289091,0.004513124,-0.01286636,-0.008888376,-0.019495093,-0.022666568,-0.0088295012,0.0091919763,0.0035467327,-0.0017673205,0.025668894,-0.0038438005,-0.017912231,-0.011674739,-0.012414129,0.023338309,-0.013711719,-0.000727755,-0.0087742677,-0.0033435864,0.010784974,9.158697e-05,-0.023826674,-0.0025322928,-0.0071289224,0.012106844,-0.00073424557,-0.015176034,0.0053197933,-0.014140247,0.01132245,-0.0089577513,0.021202043,0.01728552,-0.0098882145,-0.010033541,0.016321677,-0.013243653,-0.0021445262,-0.010955261,0.0059783286,0.0066192492,-0.0023713775,0.0054278105,0.013444198,0.0054292949,-0.012420919,-0.011577535,-0.0090855836,0.016297292,-0.023484191,-0.032604197,0.0019784215,-0.022148519,-0.020653632,0.015095452,-0.018115333,-0.01841444,-0.023493539,-0.0021928899,-0.0052135243,-0.033122531,-0.025872708,-0.0052076878,-0.01083602,0.0063177901,-0.014877522,-0.015014086,-0.012403003,-0.011064838,0.012982209,0.015271831,0.026873811,0.011648721,-0.0038671311,0.010872556,-0.013363794,-0.0023528995,0.0032255399,0.010351633,0.0078826534,-0.00012985933,0.0014944446,-0.03362914,0.022656011,0.0034331631,0.03098809,0.017880413,0.023751897,-0.0013399866,-0.015637013,-0.01185261,-0.01447704,0.0046945313,-0.0054251733,0.0062287695,0.035341129,0.025503042,0.013877789,0.041336634,-0.019492495,0.023476526,-0.0072702095,0.06642291,0.011001913],[-0.012773399,-0.0035296652,0.011502881,0.0048871346,0.0092904455,-40.227466,-3168.1117,-4338.1581,-0.0077231757,-0.025295866,0.0024254071,0.0018195047,-0.013415282,0.065340323,0.038218145,-0.023692479,-0.0096085169,-0.015344094,0.033844496,0.023487197,0.0035233487,-0.010542185,-12.208892,-1.1618798,-0.016527978,-1.1540371,-0.11321262,0.15241675,0.058320337,0.051571472,0.057505233,-0.082825866,-0.26741522,-0.052833292,-0.050422496,0.060139462,0.040052842,0.0063078855,-0.16222512,0.069421976,0.15880427,0.010471943,0.010281491,0.011852869,0.0037672842,-0.024669958,-0.032588175,-0.05222012,-0.052807814,-291.61382,-41.947513,-0.021050208,-0.013057896,-0.024617316,-0.011243643,-0.010704486,-0.00073050441,0.031184468,-0.0032188799,0.041175326,0.0017860296,0.021851836,0.011258457,-0.0049311844,0.055570072,0.022921775,0.0043429397,-0.0072917213,0.0079475799,0.049432946,-0.013174998,-0.0085031436,0.039078083,-0.024860642,-0.0052507997,-0.010842044,0.011791207,-0.045151971,-0.005833525,-0.0086416081,0.010425727,0.0098521836,0.0017592253,0.021688477,0.0042620739,0.0041643288,-0.0031708485,-0.0089780537,-0.0014841367,-0.0055420633,0.0039367199,0.0025420949,-0.0021372261,0.00058705519,0.00052080463,0.00050372331,0.029857932,0.0170754,0.0019294674,-0.00052808851,-0.0057730841,0.0048053367,-0.004682856,-0.011028147,0.0018327042,0.025795739,0.019115213,-0.015044149,-0.013450052,-0.031001001,-0.01353928,-0.009495256,-0.010337247,0.011457746,0.016500522,-0.01409218,-0.0075732874,0.017218126,0.0092337248,0.020414173,-0.0021845936,0.020964951,0.01774397,-0.01263022,-0.0049083064,-0.0073451428,-0.0079178649,-0.022964151,-0.016385137,-0.016187322,0.0073087869,-0.007787415,-0.023543836,0.028946424,0.021794687,-0.0080933272,0.0054301237,0.0091662018,0.029627441,0.012483041,0.0188634,0.024683654,0.0031377744,0.032635328,-0.00056474555,-0.0046826607,0.0048865897,0.0018214103,-0.014142821,0.0023582613,0.033151833,-0.02299387,0.027556985,-0.012485518,-0.013826675,-0.036133146],[0.020311341,-0.012651035,-0.0020217446,0.0079646282,0.014481594,0.097593791,-5172.9687,-2126.9877,0.0070137827,0.013010483,-0.0043598198,-0.0039020958,0.090140117,0.073525421,0.057159107,0.055582095,0.0097783655,0.024040815,0.020892392,0.014104725,-0.054023724,-0.016061899,1.8206944,0.75287275,-0.042037055,-0.75458625,-0.090560433,-0.14551121,-0.10072404,-0.056705259,-0.018167504,-0.21101164,-0.049375345,-0.017596734,-0.019098673,0.02642614,-0.028875923,-0.028499146,-0.01818118,0.0046158083,-0.042270765,-0.0085517999,-0.057343295,-0.0087786025,-0.0038800565,0.084757957,-0.029974728,0.013184594,0.0097897327,-41.546832,-1159.0868,0.040239281,0.060843851,0.028415913,-0.020442708,0.0021832372,0.014152791,-0.014949391,-0.0029900436,-0.014860963,-0.00066517635,-0.012610666,-0.0067367018,0.0088456889,0.10256794,-0.0022729868,0.023469408,-0.020816881,-0.030453957,0.016652037,0.020375815,-0.0020033582,-0.012113128,0.029799294,-0.026066457,-0.029351063,0.0052864538,0.03886561,-0.0088822539,-0.012148759,0.010927341,-0.0016239419,0.015203481,-0.0037720817,-0.0011711997,0.0075856007,-0.00016490668,0.0030967891,0.0055487473,0.0038817916,-0.0061846234,0.021255278,0.0083978402,-0.007118803,-0.0043389471,-0.0047766475,0.021441712,0.01477978,-0.010255314,0.003387023,-0.0087153015,-0.020055771,0.012134038,0.0085171806,0.0054896911,0.014792428,-0.015335777,0.00061649891,-0.001730105,-0.014677736,-0.0091058811,0.0057607871,0.019812136,0.031029908,0.0053009091,-0.014968736,0.011870353,0.014128543,0.014559778,0.017307624,-0.0049722343,0.0010248248,-0.011751071,-0.001219309,-0.0021951053,-0.0094554141,-0.017665229,-0.016333404,-0.021558875,0.049388369,0.058721812,0.028298375,0.0068293359,0.0054096188,-0.00083309398,0.016534921,-0.0060217132,0.012065246,-0.0049263328,0.0016321859,-0.021226942,0.0086123582,-0.0063230786,-0.0048769893,0.022871475,-0.0043638913,0.041760474,0.014384248,-0.0049894316,-0.01394974,-0.009175451,0.018223071,0.01421365,0.023050274,0.0070781822,0.026088421],[0.0057834424,0.0053520457,0.0078344693,0.0040248397,0.0075089271,-16.226406,-1770.3615,-3542.9091,-0.002802092,0.0056403259,-0.0097638556,-0.01034812,0.028994854,0.018124516,0.028363727,0.029216192,-0.016281397,-0.011317611,0.0047001621,0.012150505,-0.099223525,-0.11998567,-0.0067698207,-3.7011849,-0.067456187,0.96184898,-0.046871814,-0.030779525,0.05488826,0.41236873,0.31125412,-0.19432621,-0.051203541,-0.095577615,-0.07369141,0.025740263,0.08226175,0.0045604136,-0.084676685,0.026425878,0.042242623,0.0049036714,-0.078890525,-0.01015836,-0.011610772,-0.129397,-0.11107575,-0.019023313,-0.014892172,699.65508,-213.13208,0.018600392,0.0018832325,0.00074190071,-0.0090821931,0.0061700323,0.029501475,-0.037684415,-0.0004251762,-0.036845686,-0.0043396046,-0.020455118,-0.048523684,0.012513173,0.01674208,-0.0156562,-0.029425673,0.020758431,-0.0003728786,0.0070942703,0.015796013,0.0083233974,-0.00072910248,0.0023957173,-0.019293539,0.042630648,0.027462642,-0.025067644,0.0074967196,0.0077647045,0.010645606,-0.0094564858,-0.003485469,-0.016739734,-0.020545683,-0.0022719471,-0.0044411337,0.0019422807,0.013294172,0.012802543,-0.01087112,0.0067763069,0.008531693,0.00097257108,-0.0040299867,-0.0084292331,-0.0090953729,-0.0099446947,0.017721559,0.0036716881,0.0019521396,-0.017369135,0.004663073,-0.00047924778,0.0099499644,-0.014154477,0.0023224046,-0.0030080371,0.0051442317,0.0019691227,-0.027908316,0.010678526,0.001780275,-0.012761604,-0.0066581905,-0.0046847434,0.0034318791,-0.0020224479,-0.004920475,-0.008256143,-0.015952176,-0.0085021727,-0.0013215888,-0.022725126,-0.016528083,0.0044122019,0.0093759851,0.018194163,0.0037477936,0.02058807,0.0054621,0.014703149,0.0041385614,-0.017314235,0.011469336,-0.0064714042,0.026357043,-0.0082940797,-0.036677497,-0.019796146,-0.041435599,0.023603094,0.023740082,0.0058495193,-0.01795152,0.016466147,0.043327896,-0.010285466,0.026348294,0.021281769,0.00027799731,0.024956846,0.015079999,0.025848338,0.020890398,0.0078423532],[-0.019613312,-0.01918082,0.0018718865,-0.0069627593,-0.0033427894,-0.47964568,1314.2352,2562.4713,0.05004505,0.035470095,0.010043811,0.0093372345,0.022681143,-0.022297845,-0.055766872,0.024684401,0.014336368,0.009363346,0.017692465,0.022915756,0.055719781,0.043214752,-1.0705779,2.2186902,0.003179113,0.071490176,-0.13084392,0.017682761,-0.028757245,-0.080737166,-0.13926505,0.023085257,-0.11335223,-0.031462034,-0.022758802,0.02523198,0.0062378155,-0.00065701871,-0.0081839864,-0.00367863,0.0010059912,0.010606429,0.0038350018,-0.012098874,-0.012597684,0.0016240589,-0.0095641882,-0.018543376,-0.018477007,1376.2609,3040.1323,-0.008293512,-0.0085252706,-0.011024508,0.0075651114,-0.0023493321,-0.025798061,-0.027600083,-0.0083533806,-0.017195114,-0.011881047,0.0016798036,0.0047955826,-0.013572373,-0.039615433,-0.0045804606,-0.009730577,0.0004772116,-0.0075313606,-0.0010032182,0.039359421,0.004676857,-0.017290687,0.038071659,0.0096463558,-0.0069590626,-0.0086046414,-0.018742373,0.003848863,0.0032759053,-0.0058045099,-0.0099478582,0.0042715878,-0.0014539828,0.0020395995,0.0054000893,0.032597808,0.020088325,0.020872074,0.017125525,0.013338728,-0.0073458005,-0.021917063,0.0057489277,-0.020404228,-0.020432662,0.017739529,0.021993285,-0.029034388,-0.026792539,0.0031349908,0.019552312,0.0050259513,0.0032576253,0.0011798799,-0.015117673,-0.016580922,0.027025111,0.030481516,-0.00093600113,0.012631297,0.0060229279,-0.0031822867,-0.0064700208,-0.010822317,0.014286617,0.0072404386,0.0062311869,0.00020835282,0.024615328,0.034295101,-0.002835891,0.0013768314,-0.0057527193,0.0060251802,0.0031964506,-0.0038946386,0.010153985,0.011261341,-0.0027302107,-0.0073943734,-0.0074456277,-0.01529907,-0.016783176,-0.0036481426,-0.025924612,-0.010570802,-0.026617933,-0.016129385,-0.003352102,-0.0069059927,-0.0035685009,0.007240141,-0.013532511,-0.014744149,-0.018423934,-0.018374049,-0.016267323,0.029554346,0.015302596,-0.029464913,0.031439372,-0.014449141,-0.013736548,-0.0029602045,0.018714815]]}
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b58a059d1e60e33bd0967d972bcbeb87c0cc0b34dc1680136bbd6bc27e42822
3
+ size 12560
reports/confusion_matrix.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ,pred neutral,pred happy,pred sad,pred angry,pred surprised,pred contempt,pred restraine,pred scepticis,pred uncertain,pred hopelessn
2
+ true neutral,43.5,0.0,3.0,0.0,0.0,1.17,1.0,1.33,3.83,4.17
3
+ true happy,0.0,53.33,0.0,0.0,1.0,0.0,3.67,0.0,0.0,0.0
4
+ true sad,2.83,0.0,24.83,2.33,0.33,0.83,1.0,4.5,2.33,19.0
5
+ true angry,2.5,0.0,0.83,47.67,0.33,1.0,0.0,2.17,3.17,0.33
6
+ true surprised,0.83,0.0,0.0,0.0,55.17,0.0,0.33,0.0,1.67,0.0
7
+ true contempt,1.0,0.33,0.0,0.0,0.0,46.17,4.33,2.33,3.83,0.0
8
+ true restrained-amusement,1.17,3.5,0.33,0.33,0.0,4.5,43.33,3.83,0.33,0.67
9
+ true scepticism,0.33,0.0,4.33,4.83,1.17,1.0,1.67,32.33,10.17,2.17
10
+ true uncertainty,3.33,0.83,5.83,1.0,0.0,3.0,1.33,8.67,29.17,4.83
11
+ true hopelessness,2.5,0.0,18.83,1.83,0.0,0.33,1.33,2.83,3.5,26.83
reports/confusion_matrix.png ADDED
reports/duplicate_people.csv ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dropped,same_as,matching_photos
2
+ s1_1,s0_1,10
3
+ s1_2,s0_26,10
4
+ s1_3,s0_2,10
5
+ s1_4,s0_14,10
6
+ s1_5,s0_15,10
7
+ s1_6,s0_29,10
8
+ s1_7,s0_23,10
9
+ s1_9,s0_11,10
10
+ s1_14,s0_27,10
11
+ s1_16,s0_5,10
12
+ s1_18,s0_4,10
13
+ s1_19,s0_19,10
14
+ s1_21,s0_10,10
15
+ s1_23,s0_20,10
16
+ s2_1,s0_22,10
17
+ s2_3,s0_25,10
18
+ s2_4,s1_11,10
19
+ s2_5,s0_14,10
20
+ s2_6,s0_26,10
21
+ s2_9,s0_27,10
22
+ s2_10,s0_6,10
23
+ s2_11,s0_7,10
24
+ s2_12,s0_1,10
25
+ s2_15,s0_29,10
26
+ s2_16,s0_30,10
27
+ s2_17,s0_24,10
28
+ s2_19,s0_11,10
29
+ s2_20,s1_27,10
30
+ s2_21,s0_10,10
31
+ s2_22,s0_8,10
32
+ s2_23,s1_30,10
33
+ s2_25,s1_25,10
34
+ s2_26,s0_12,10
35
+ s2_29,s0_9,10
36
+ s2_30,s1_15,10
37
+ s3_1,s1_27,10
38
+ s3_2,s1_13,10
39
+ s3_3,s1_17,10
40
+ s3_4,s0_28,10
41
+ s3_5,s1_29,10
42
+ s3_6,s0_1,10
43
+ s3_7,s2_8,10
44
+ s3_8,s0_12,10
45
+ s3_9,s1_28,10
46
+ s3_11,s0_26,10
47
+ s3_12,s0_24,10
48
+ s3_13,s1_20,10
49
+ s3_14,s2_24,10
50
+ s3_15,s0_15,10
51
+ s3_16,s1_22,10
52
+ s3_17,s0_25,10
53
+ s3_19,s0_29,10
54
+ s3_20,s0_5,10
55
+ s3_21,s0_4,10
56
+ s3_22,s0_20,10
57
+ s3_23,s0_3,10
58
+ s3_24,s1_24,10
59
+ s3_25,s1_30,10
60
+ s3_27,s0_21,10
61
+ s3_28,s1_8,10
62
+ s3_29,s0_13,10
63
+ s3_30,s1_26,10
reports/leaderboard_frozen.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ model,C,mean,std
2
+ clip_b16,0.001,0.5362068965517242,0.009231251956441951
3
+ clip_b16,0.003,0.5339080459770115,0.010565963397040362
4
+ clip_b16,0.01,0.5258620689655172,0.005631010902949846
reports/leaderboard_linear.csv ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name,kind,mean,std,min,max,sec
2
+ ridge_a1000,ridge,0.6936781609195402,0.012096301827499548,0.6741379310344827,0.7086206896551724,0.8
3
+ lr_C0.02,lr,0.6887931034482758,0.009055144400338352,0.6741379310344827,0.7,12.2
4
+ lda_shrink0.5,lda,0.6876436781609194,0.016063706734912267,0.6655172413793103,0.7068965517241379,2.0
5
+ listwise_lam0.3_mix0.8,list,0.685632183908046,0.010135167866981843,0.6655172413793103,0.6982758620689655,15.4
6
+ lda_shrink0.7,lda,0.6847701149425287,0.014610027378030065,0.6603448275862069,0.7,1.6
7
+ lr_C0.01,lr,0.6847701149425287,0.011103263842736574,0.6689655172413793,0.7017241379310345,8.2
8
+ lr_C0.005,lr,0.6839080459770116,0.013490453556672987,0.6586206896551724,0.6982758620689655,11.5
9
+ ridge_a3000,ridge,0.6824712643678161,0.006634135850928292,0.6706896551724137,0.6913793103448276,0.7
10
+ lda_shrink0.85,lda,0.6804597701149425,0.007880062759081685,0.6706896551724137,0.6931034482758621,4.7
11
+ lr_C0.003,lr,0.6752873563218391,0.013416801758538804,0.6482758620689655,0.6913793103448276,9.4
12
+ lr_C0.05,lr,0.6721264367816092,0.009723519721660134,0.6586206896551724,0.6862068965517242,14.9
reports/leaderboard_linear.png ADDED
reports/leaderboard_students.csv ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ name,alpha,temp,mean,std
2
+ student_a0.5_t1.0,0.5,1.0,0.6862068965517242,0.008147957976297604
3
+ student_a0.5_t2.0,0.5,2.0,0.685632183908046,0.007292285942787105
4
+ student_a0.25_t2.0,0.25,2.0,0.6827586206896553,0.008025425312510893
5
+ student_a0.0_t2.0,0.0,2.0,0.6456896551724138,0.010236501799170628
reports/learning_curve.png ADDED
reports/metrics.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "candidate": "ridge_a1000",
3
+ "unique_people": 58,
4
+ "photos": 580,
5
+ "repeats": 6,
6
+ "folds": 5,
7
+ "matching_accuracy_mean": 0.6936781609195402,
8
+ "matching_accuracy_std": 0.012096301827499548,
9
+ "matching_accuracy_min": 0.6741379310344827,
10
+ "matching_accuracy_max": 0.7086206896551724,
11
+ "bootstrap_ci95_low": 0.642808908045977,
12
+ "bootstrap_ci95_high": 0.7477083333333332,
13
+ "fold_accuracy_mean": 0.6932323232323232,
14
+ "fold_accuracy_std": 0.06909017070903214,
15
+ "fold_accuracy_min": 0.5272727272727272,
16
+ "fold_accuracy_max": 0.8333333333333334,
17
+ "argmax_top1_accuracy_no_matching": 0.46005747126436786,
18
+ "argmax_top3_accuracy_no_matching": 0.7761494252873563,
19
+ "chance_matching_accuracy": 0.1,
20
+ "per_person_min": 0.21666666666666667,
21
+ "per_person_p25": 0.5375,
22
+ "per_person_median": 0.6833333333333332,
23
+ "per_person_p75": 0.825,
24
+ "per_person_max": 1.0,
25
+ "people_with_8_or_more_of_10": 15,
26
+ "people_with_5_or_fewer_of_10": 12,
27
+ "best_class": "surprised",
28
+ "worst_class": "sad",
29
+ "duplicate_people_removed": 62,
30
+ "learning_curve": [
31
+ {
32
+ "people": 11,
33
+ "accuracy": 0.5651515151515151,
34
+ "std": 0.06394226620002787
35
+ },
36
+ {
37
+ "people": 23,
38
+ "accuracy": 0.6530303030303031,
39
+ "std": 0.0813821151636108
40
+ },
41
+ {
42
+ "people": 35,
43
+ "accuracy": 0.6772727272727272,
44
+ "std": 0.057436034609166235
45
+ },
46
+ {
47
+ "people": 47,
48
+ "accuracy": 0.7000000000000001,
49
+ "std": 0.07080800876089652
50
+ }
51
+ ],
52
+ "leaky_reference_not_real": 0.7908333333333332
53
+ }
reports/per_class.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ expression,accuracy,correct_per_100
2
+ neutral,0.75,75.0
3
+ happy,0.9195,92.0
4
+ sad,0.4282,42.8
5
+ angry,0.8218,82.2
6
+ surprised,0.9511,95.1
7
+ contempt,0.796,79.6
8
+ restrained-amusement,0.7471,74.7
9
+ scepticism,0.5575,55.7
10
+ uncertainty,0.5029,50.3
11
+ hopelessness,0.4626,46.3
reports/per_person.csv ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ person,accuracy
2
+ s0_1,0.683
3
+ s0_10,1.0
4
+ s0_11,0.483
5
+ s0_12,0.517
6
+ s0_13,1.0
7
+ s0_14,0.633
8
+ s0_15,0.933
9
+ s0_16,0.667
10
+ s0_17,0.533
11
+ s0_18,0.833
12
+ s0_19,0.8
13
+ s0_2,0.8
14
+ s0_20,0.567
15
+ s0_21,1.0
16
+ s0_22,0.5
17
+ s0_23,0.683
18
+ s0_24,0.217
19
+ s0_25,0.667
20
+ s0_26,0.567
21
+ s0_27,0.4
22
+ s0_28,1.0
23
+ s0_29,0.733
24
+ s0_3,0.683
25
+ s0_30,0.6
26
+ s0_4,0.733
27
+ s0_5,1.0
28
+ s0_6,0.783
29
+ s0_7,0.55
30
+ s0_8,0.4
31
+ s0_9,1.0
32
+ s1_10,0.767
33
+ s1_11,0.467
34
+ s1_12,0.6
35
+ s1_13,1.0
36
+ s1_15,0.7
37
+ s1_17,0.833
38
+ s1_20,0.733
39
+ s1_22,0.767
40
+ s1_24,0.6
41
+ s1_25,0.583
42
+ s1_26,0.717
43
+ s1_27,0.4
44
+ s1_28,0.467
45
+ s1_29,0.433
46
+ s1_30,0.567
47
+ s1_8,0.483
48
+ s2_13,1.0
49
+ s2_14,1.0
50
+ s2_18,0.833
51
+ s2_2,0.517
52
+ s2_24,0.483
53
+ s2_27,0.767
54
+ s2_28,0.5
55
+ s2_7,1.0
56
+ s2_8,0.95
57
+ s3_10,0.75
58
+ s3_18,0.6
59
+ s3_26,0.75
reports/per_person_and_class.png ADDED
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ numpy
2
+ scipy
3
+ pandas
4
+ safetensors
5
+ huggingface_hub
6
+ gradio
run_info.json ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "run_name": "face_expr_v3_frozen",
4
+ "seed": 42,
5
+ "n_folds": 5,
6
+ "cv_repeats": 6,
7
+ "rank_mode": "minmax",
8
+ "crop_box": {
9
+ "cx": 0.5,
10
+ "cy": 0.38,
11
+ "side": 0.78
12
+ },
13
+ "crop_px": 288,
14
+ "pretrained": true,
15
+ "base_C": 0.02,
16
+ "min_gain": 0.01,
17
+ "use_teacher": false,
18
+ "use_frozen": true,
19
+ "frozen_models": [
20
+ {
21
+ "name": "dinov2_b",
22
+ "id": "vit_base_patch14_dinov2.lvd142m",
23
+ "px": 224
24
+ },
25
+ {
26
+ "name": "clip_b16",
27
+ "id": "vit_base_patch16_clip_224.openai",
28
+ "px": 224
29
+ },
30
+ {
31
+ "name": "hsemotion_b0",
32
+ "id": "hsemotion:enet_b0_8_best_vgaf",
33
+ "px": 224
34
+ }
35
+ ],
36
+ "frozen_C": [
37
+ 0.001,
38
+ 0.003,
39
+ 0.01
40
+ ],
41
+ "frozen_pca": 64,
42
+ "dedup_cos": 0.9995,
43
+ "dedup_min_photos": 5,
44
+ "cand_lr": [
45
+ 0.003,
46
+ 0.005,
47
+ 0.01,
48
+ 0.02,
49
+ 0.05
50
+ ],
51
+ "cand_lda": [
52
+ 0.5,
53
+ 0.7,
54
+ 0.85
55
+ ],
56
+ "cand_ridge": [
57
+ 1000.0,
58
+ 3000.0
59
+ ],
60
+ "cand_list": [
61
+ [
62
+ 0.3,
63
+ 0.8
64
+ ]
65
+ ],
66
+ "boot_n": 2000,
67
+ "curve_fracs": [
68
+ 0.25,
69
+ 0.5,
70
+ 0.75,
71
+ 1.0
72
+ ],
73
+ "guard_frac": 0.6,
74
+ "guard_loss": 2.28,
75
+ "guard_retries": 2,
76
+ "student_grid": [
77
+ {
78
+ "alpha": 0.5,
79
+ "temp": 1.0
80
+ },
81
+ {
82
+ "alpha": 0.5,
83
+ "temp": 2.0
84
+ },
85
+ {
86
+ "alpha": 0.25,
87
+ "temp": 2.0
88
+ },
89
+ {
90
+ "alpha": 0.0,
91
+ "temp": 2.0
92
+ }
93
+ ],
94
+ "hf_secrets": [
95
+ "HF_TOKEN"
96
+ ],
97
+ "wandb_secrets": [
98
+ "WANDB_API_KEY"
99
+ ],
100
+ "use_hf": true,
101
+ "hf_repo": null,
102
+ "hf_private": true,
103
+ "upload_teacher": true,
104
+ "upload_extras": true,
105
+ "upload_features": false,
106
+ "hf_restore": true,
107
+ "sync_each_model": true,
108
+ "hf_create_space": false,
109
+ "use_wandb": true,
110
+ "wandb_project": "face-expression-v3"
111
+ },
112
+ "versions": {
113
+ "torch": "2.14.1+cpu",
114
+ "timm": "1.0.31",
115
+ "scikit-learn": "1.6.1",
116
+ "numpy": "2.4.6",
117
+ "scipy": "1.16.3",
118
+ "pandas": "2.2.3",
119
+ "safetensors": "0.8.0",
120
+ "huggingface_hub": "1.33.0",
121
+ "wandb": "0.28.1"
122
+ },
123
+ "platform": "colab",
124
+ "device": "cpu",
125
+ "chosen": {
126
+ "name": "ridge_a1000",
127
+ "kind": "linear",
128
+ "spec": {
129
+ "name": "ridge_a1000",
130
+ "kind": "ridge",
131
+ "alpha": 1000.0
132
+ },
133
+ "cv": 0.6936781609195402,
134
+ "std": 0.012096301827499548,
135
+ "used_teacher": false
136
+ },
137
+ "metrics": {
138
+ "candidate": "ridge_a1000",
139
+ "unique_people": 58,
140
+ "photos": 580,
141
+ "repeats": 6,
142
+ "folds": 5,
143
+ "matching_accuracy_mean": 0.6936781609195402,
144
+ "matching_accuracy_std": 0.012096301827499548,
145
+ "matching_accuracy_min": 0.6741379310344827,
146
+ "matching_accuracy_max": 0.7086206896551724,
147
+ "bootstrap_ci95_low": 0.642808908045977,
148
+ "bootstrap_ci95_high": 0.7477083333333332,
149
+ "fold_accuracy_mean": 0.6932323232323232,
150
+ "fold_accuracy_std": 0.06909017070903214,
151
+ "fold_accuracy_min": 0.5272727272727272,
152
+ "fold_accuracy_max": 0.8333333333333334,
153
+ "argmax_top1_accuracy_no_matching": 0.46005747126436786,
154
+ "argmax_top3_accuracy_no_matching": 0.7761494252873563,
155
+ "chance_matching_accuracy": 0.1,
156
+ "per_person_min": 0.21666666666666667,
157
+ "per_person_p25": 0.5375,
158
+ "per_person_median": 0.6833333333333332,
159
+ "per_person_p75": 0.825,
160
+ "per_person_max": 1.0,
161
+ "people_with_8_or_more_of_10": 15,
162
+ "people_with_5_or_fewer_of_10": 12,
163
+ "best_class": "surprised",
164
+ "worst_class": "sad",
165
+ "duplicate_people_removed": 62,
166
+ "learning_curve": [
167
+ {
168
+ "people": 11,
169
+ "accuracy": 0.5651515151515151,
170
+ "std": 0.06394226620002787
171
+ },
172
+ {
173
+ "people": 23,
174
+ "accuracy": 0.6530303030303031,
175
+ "std": 0.0813821151636108
176
+ },
177
+ {
178
+ "people": 35,
179
+ "accuracy": 0.6772727272727272,
180
+ "std": 0.057436034609166235
181
+ },
182
+ {
183
+ "people": 47,
184
+ "accuracy": 0.7000000000000001,
185
+ "std": 0.07080800876089652
186
+ }
187
+ ],
188
+ "leaky_reference_not_real": 0.7908333333333332
189
+ },
190
+ "minutes": 15.9,
191
+ "finished": "2026-11-12 12:48:56"
192
+ }
run_log.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [ 0.0 min] platform colab, device cpu, output face_expr_v3_run
2
+ [ 0.0 min] WARNING: running on colab. The course asks you not to upload classmates' photos to outside services. Check this before using the course photos here.
3
+ [ 0.0 min] hugging face token from HF_TOKEN, wandb key from WANDB_API_KEY
4
+ [ 0.0 min] hugging face: repo 23f1000805/face-expression-v3
5
+ [ 0.0 min] hugging face: restored 0 teacher model folder(s) from 23f1000805/face-expression-v3
6
+ [ 0.1 min] wandb: online https://wandb.ai/23f1000805-indian-institute-of-technology-madras/face-expression-v3/runs/dlgsdk05
7
+ [ 0.2 min] loaded face_expr_v3_run/scratch/zip_b71b4caa/features.csv: 30 people
8
+ [ 0.2 min] loaded face_expr_v3_run/scratch/zip_c3e60fe8/features.csv: 30 people
9
+ [ 0.2 min] loaded face_expr_v3_run/scratch/zip_071daa78/features.csv: 30 people
10
+ [ 0.2 min] loaded face_expr_v3_run/scratch/zip_86632485/features.csv: 30 people
11
+ [ 0.2 min] 1200 photos, 120 people, 78 features
12
+ [ 0.3 min] duplicate people removed: 62 (620 photos); labels that disagree between copies: 0
13
+ [ 0.3 min] unique people: 58 (from 120 listed), photos 580
14
+ [ 0.4 min] crops (580, 3, 288, 288)
15
+ [ 0.5 min] lr_C0.003: 0.6753 +- 0.0134 (min 0.6483, max 0.6914)
16
+ [ 0.7 min] lr_C0.005: 0.6839 +- 0.0135 (min 0.6586, max 0.6983)
17
+ [ 0.9 min] lr_C0.01: 0.6848 +- 0.0111 (min 0.6690, max 0.7017)
18
+ [ 1.1 min] lr_C0.02: 0.6888 +- 0.0091 (min 0.6741, max 0.7000)
19
+ [ 1.3 min] lr_C0.05: 0.6721 +- 0.0097 (min 0.6586, max 0.6862)
20
+ [ 1.4 min] lda_shrink0.5: 0.6876 +- 0.0161 (min 0.6655, max 0.7069)
21
+ [ 1.4 min] lda_shrink0.7: 0.6848 +- 0.0146 (min 0.6603, max 0.7000)
22
+ [ 1.5 min] lda_shrink0.85: 0.6805 +- 0.0079 (min 0.6707, max 0.6931)
23
+ [ 1.5 min] ridge_a1000: 0.6937 +- 0.0121 (min 0.6741, max 0.7086)
24
+ [ 1.5 min] ridge_a3000: 0.6825 +- 0.0066 (min 0.6707, max 0.6914)
25
+ [ 1.7 min] listwise_lam0.3_mix0.8: 0.6856 +- 0.0101 (min 0.6655, max 0.6983)
26
+ [ 1.8 min] best linear candidate: ridge_a1000 with 0.6937 +- 0.0121 on unseen unique people
27
+ [ 1.8 min] teacher stage is off (use_teacher=False)
28
+ [ 1.9 min] frozen dinov2_b: skipped (AssertionError: Input height (224) doesn't match model (518).)
29
+ [ 14.8 min] frozen clip_b16 C=0.001: matching accuracy 0.5362 +- 0.0092
30
+ [ 14.9 min] frozen clip_b16 C=0.003: matching accuracy 0.5339 +- 0.0106
31
+ [ 14.9 min] frozen clip_b16 C=0.01: matching accuracy 0.5259 +- 0.0056
32
+ [ 14.9 min] frozen hsemotion_b0: skipped (ModuleNotFoundError: No module named 'hsemotion')
33
+ [ 14.9 min] frozen teacher ensemble ['clip_b16']: matching accuracy on unseen people 0.5241
34
+ [ 15.2 min] student_a0.5_t1.0: 0.6862 +- 0.0081
35
+ [ 15.5 min] student_a0.5_t2.0: 0.6856 +- 0.0073
36
+ [ 15.7 min] student_a0.25_t2.0: 0.6828 +- 0.0080
37
+ [ 15.8 min] student_a0.0_t2.0: 0.6457 +- 0.0102
38
+ [ 15.8 min] best student gains only -0.0075 (needs 0.01), keeping ridge_a1000
39
+ [ 15.9 min] accuracy on the training people (not the real number): 0.821
40
+ [ 15.9 min] model.json is valid, 19.4 KiB, 8 significant digits
41
+ [ 15.9 min] matching from the saved JSON agrees with the in-memory weights on 100.0% of photos