diff --git a/data/metadata/barrier_opening.csv b/data/metadata/barrier_opening.csv index a83ae77..e657e91 100644 --- a/data/metadata/barrier_opening.csv +++ b/data/metadata/barrier_opening.csv @@ -1,7 +1,28 @@ -machine_name,session_date,session_time,opening_s,trim_first_s,notes -ETHOSCOPE_076,2025-07-15,16-03-10,52.0,0,hand-annotated 2025-07-15 batch -ETHOSCOPE_076,2025-07-15,16-31-34,94.0,69,first ~66s misframed (arena partly out of frame) -ETHOSCOPE_145,2025-07-15,16-03-27,42.0,0,hand-annotated 2025-07-15 batch -ETHOSCOPE_145,2025-07-15,16-31-41,89.0,69,first ~60s misframed (arena partly out of frame) -ETHOSCOPE_268,2025-07-15,16-32-05,75.0,0,hand-annotated 2025-07-15 batch -ETHOSCOPE_076,2024-10-21,11-07-54,346.8,0, +machine_name,session_date,session_time,opening_s,trim_first_s,bad_rois,analyst,notes +ETHOSCOPE_076,2025-07-15,16-03-10,52.0,0,,GG,hand-annotated 2025-07-15 batch +ETHOSCOPE_076,2025-07-15,16-31-34,94.0,69,,GG,first ~66s misframed (arena partly out of frame) +ETHOSCOPE_145,2025-07-15,16-03-27,42.0,0,,GG,hand-annotated 2025-07-15 batch +ETHOSCOPE_145,2025-07-15,16-31-41,89.0,69,,GG,first ~60s misframed (arena partly out of frame) +ETHOSCOPE_268,2025-07-15,16-32-05,75.0,0,,GG,hand-annotated 2025-07-15 batch +ETHOSCOPE_076,2024-10-21,11-07-54,346.8,0,,GG, +ETHOSCOPE_181,2024-10-21,11-08-57,287.3,0,,GG, +ETHOSCOPE_225,2024-10-21,11-09-12,277.9,0,"1,3,5",GG, +ETHOSCOPE_082,2024-10-21,11-07-46,365.3,0,"1,3,5",GG, +ETHOSCOPE_140,2024-10-21,11-06-58,423.9,0,"1,3,5",GG, +ETHOSCOPE_083,2024-10-21,11-09-07,306.4,0,"1,3,5",GG, +ETHOSCOPE_145,2024-10-21,11-08-35,341.0,0,"1,3,5",GG, +ETHOSCOPE_076,2024-09-17,10-32-10,1875.8,0,"1,3,5",GG, +ETHOSCOPE_082,2024-09-17,10-53-16,646.8,0,"1,3,5",GG, +ETHOSCOPE_140,2024-09-17,11-03-05,86.2,0,"1,3,5",GG, +ETHOSCOPE_181,2024-09-17,10-33-12,1824.3,0,"1,3,5",GG, +ETHOSCOPE_225,2024-09-17,10-53-57,588.3,0,"1,3,5",GG, +ETHOSCOPE_082,2024-09-18,10-15-49,277.4,0,"1,3,5",GG, +ETHOSCOPE_140,2024-09-18,10-15-39,246.1,0,"1,3,5",GG, +ETHOSCOPE_181,2024-09-18,10-15-56,194.7,0,"1,3,5",GG, +ETHOSCOPE_225,2024-09-18,10-15-45,225.4,0,"1,3,5",GG, +ETHOSCOPE_076,2024-10-01,11-04-03,731.1,0,"1,3,5",GG, +ETHOSCOPE_082,2024-10-01,11-03-52,762.4,0,"1,3,5",GG, +ETHOSCOPE_083,2024-10-01,11-07-41,560.3,0,"1,3,5",GG, +ETHOSCOPE_113,2024-10-01,11-07-48,565.7,0,"2,4,6",GG, +ETHOSCOPE_140,2024-10-01,11-04-07,755.0,0,"1,3,5",GG, +ETHOSCOPE_167,2024-10-01,11-07-55,564.5,0,"1,3,5",GG, diff --git a/scripts/barrier_picker_app/app.py b/scripts/barrier_picker_app/app.py index d8988b7..17490fe 100644 --- a/scripts/barrier_picker_app/app.py +++ b/scripts/barrier_picker_app/app.py @@ -54,7 +54,7 @@ DB_NAME_RE = re.compile( ) OUT_COLS = ["machine_name", "session_date", "session_time", - "opening_s", "trim_first_s", "bad_rois", "notes"] + "opening_s", "trim_first_s", "bad_rois", "analyst", "notes"] # ROI numbering in the HD mating arena (verified via tracking_geometry): # upper row = ROIs 1, 3, 5 (y ≈ 0.125) @@ -275,6 +275,7 @@ class Submission(BaseModel): idx: int time_s: float | None # None when marking unusable mode: str # "all" | "upper" | "lower" | "unusable" | "skip" + analyst: str = "" # initials of the human picker (required, non-skip) notes: str = "" @@ -288,6 +289,10 @@ async def submit(payload: Submission) -> dict: if payload.mode == "skip": return {"status": "skipped"} + analyst = payload.analyst.strip().upper() + if not analyst: + raise HTTPException(status_code=400, detail="analyst initials required") + if payload.mode == "unusable": row = { "machine_name": item.machine_name, @@ -296,6 +301,7 @@ async def submit(payload: Submission) -> dict: "opening_s": float("nan"), "trim_first_s": 0, "bad_rois": "", + "analyst": analyst, "notes": payload.notes or "unusable", } else: @@ -315,6 +321,7 @@ async def submit(payload: Submission) -> dict: "opening_s": round(payload.time_s, 1), "trim_first_s": 0, "bad_rois": bad_rois, + "analyst": analyst, "notes": payload.notes, } diff --git a/scripts/barrier_picker_app/static/index.html b/scripts/barrier_picker_app/static/index.html index 04a67bf..9245077 100644 --- a/scripts/barrier_picker_app/static/index.html +++ b/scripts/barrier_picker_app/static/index.html @@ -76,6 +76,37 @@ border-radius: 4px; cursor: pointer; border: 1px solid #1a4; font-size: 0.95rem; } #modal-close:hover { background: #3e6; } + + /* User badge in header */ + #user-badge { background: #2a3; color: #042; font-weight: 700; + padding: 0.2rem 0.6rem; border-radius: 12px; + font-family: ui-monospace, monospace; font-size: 0.85rem; + cursor: pointer; user-select: none; } + #user-badge:hover { background: #3b4; } + #user-badge.empty { background: #d84; color: #311; } + + /* Login modal — narrower than the welcome modal */ + #login-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.85); + display: none; align-items: center; justify-content: center; + z-index: 200; } + #login-backdrop.show { display: flex; } + #login-box { background: #222; border: 1px solid #444; border-radius: 6px; + padding: 1.6rem 2rem; max-width: 380px; width: 90%; + color: #ddd; } + #login-box h2 { margin: 0 0 0.6rem; color: #fff; font-size: 1.1rem; } + #login-box p { margin: 0.4rem 0 1rem; color: #aab; font-size: 0.9rem; } + #login-input { width: 100%; padding: 0.6rem 0.8rem; font-size: 1.1rem; + background: #111; color: #fff; border: 1px solid #444; + border-radius: 4px; text-align: center; + font-family: ui-monospace, monospace; letter-spacing: 0.2em; + text-transform: uppercase; } + #login-input:focus { outline: none; border-color: #6c5; } + #login-submit { width: 100%; margin-top: 1rem; padding: 0.7rem; + background: #2d5; color: #053; font-weight: 600; + border-radius: 4px; cursor: pointer; border: 1px solid #1a4; + font-size: 0.95rem; } + #login-submit:hover { background: #3e6; } + #login-submit:disabled { background: #444; color: #888; cursor: not-allowed; } @@ -83,9 +114,20 @@

Cupido — barrier picker

loading… + +
+
+

Who are you?

+

Enter your initials so we can record who annotated each video. + (Just letters, e.g. GG.)

+ + +
+
+