vidhimudaliar commited on
Commit
756ea93
·
verified ·
1 Parent(s): 74eec79

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -10
README.md CHANGED
@@ -1,10 +1,89 @@
1
- ---
2
- title: Codebook
3
- emoji: 📚
4
- colorFrom: pink
5
- colorTo: indigo
6
- sdk: static
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Human-Robot Collaboration Failure Codebook
2
+
3
+ - browse all failure categories
4
+ - open a category detail page with its definition and representative example
5
+ - inspect every coded segment attached to that category
6
+ - search all coded segments across the dataset
7
+
8
+ ## Project Structure
9
+
10
+ ```text
11
+ .
12
+ |-- index.html # Homepage with failure category cards
13
+ |-- category.html # Detail page for one failure category
14
+ |-- all_videos.html # Searchable table of all coded segments
15
+ |-- assets/
16
+ | |-- css/ # Shared and page-specific styles
17
+ | `-- js/
18
+ | |-- failures.js # Failure definitions and metadata
19
+ | |-- homepage.js # Homepage search + category stats
20
+ | |-- category.js # Category page rendering
21
+ | |-- all_videos.js # All-videos table rendering
22
+ | `-- video_segment.js # Video loop/playback behavior
23
+ |-- raw_data.csv # Original Label Studio export
24
+ |-- cleaned_data.csv # Flattened CSV used by the web app
25
+ |-- clean.py # Converts raw_data.csv -> cleaned_data.csv
26
+ `-- videos/ # Source MP4 files referenced by the app
27
+ ```
28
+
29
+
30
+ ## Data Files
31
+
32
+ ### `raw_data.csv`
33
+
34
+ This is the original annotation export. It contains:
35
+
36
+ - `id`
37
+ - `participant`
38
+ - `condition`
39
+ - `run`
40
+ - `filename`
41
+ - `videoLabels`
42
+
43
+ The `videoLabels` column stores Label Studio timeline annotations as JSON.
44
+
45
+ ### `cleaned_data.csv`
46
+
47
+ This is the flattened file the app actually uses. It contains one row per coded label occurrence:
48
+
49
+ - `filename`
50
+ - `video_id`
51
+ - `video_path`
52
+ - `label`
53
+ - `start`
54
+ - `end`
55
+
56
+
57
+ ## Video Playback Rules
58
+
59
+ Segment playback behavior is implemented in `assets/js/video_segment.js`.
60
+
61
+ Each embedded video:
62
+
63
+ - lazy-loads when it gets near the viewport
64
+ - starts from a computed frame-based window
65
+ - loops only within the relevant segment
66
+ - respects manual pause and scrubbing
67
+
68
+ Some labels have custom playback behavior. For example:
69
+
70
+ - `Success` and `Failure` play the full video
71
+ - `Safety Avoidance` and `Redundant Retrieval` play from the annotated start to the end of the video
72
+ - `Missed Grab` and `Slippage` expand the playback window around the annotation
73
+
74
+ Default FPS is set to `30`.
75
+
76
+ ## Typical Update Workflow
77
+
78
+ 1. Replace or update `raw_data.csv`.
79
+ 2. Run `python3 clean.py`.
80
+ 3. Confirm `cleaned_data.csv` was regenerated correctly.
81
+ 4. Add or update files in `videos/` if needed.
82
+ 5. Start a local server and verify `index.html`, `category.html`, and `all_videos.html`.
83
+
84
+ ## Current Dataset Snapshot
85
+
86
+ At the time of this README update, the repository contains:
87
+
88
+ - `288` data rows in `raw_data.csv` excluding the header
89
+ - `657` data rows in `cleaned_data.csv` excluding the header