How nitr098/surgery-phase-explorer works
Surgery Phase Explorer loads surgical phase annotations into a shared representation, then supports dataset inventory, timeline inspection, boundary-frame review, interactive playback, and annotation-convention reports. The main workflow is dataset selection → loader → normalized annotations → an inspection or analysis result. The README documents all three dataset formats and the major tools. Source excerpts show loader and visualization behavior; some CLI-to-library wiring is supported only by the SOURCE INDEX, so unsampled implementation details are not expanded.
Main entry points: datasets.py Dataset registry · schema.py Annotation model · timeline.py Timeline ribbons · montage.py Boundary strips
Components 19
Dataset access
- Dataset registry
phase_atlas/datasets.py - Cholec80 loader
phase_atlas/loaders/cholec80.py - Cataract-1K loader
phase_atlas/loaders/cataract1k.py - CI in-house loader
phase_atlas/loaders/ci_inhouse.py - Dataset inventory
scripts/list_videos.py
Annotation model
- Annotation model
phase_atlas/schema.py - Label colors
phase_atlas/colors.py
Visual inspection
- Timeline command
scripts/plot_timelines.py - Timeline ribbons
phase_atlas/timeline.py - Boundary export
scripts/export_boundaries.py - Boundary strips
phase_atlas/montage.py - Player command
scripts/play.py - Interactive player
phase_atlas/player.py - Figures and strips
Convention analysis
- Report command
scripts/report_conventions.py - Convention report
phase_atlas/analysis.py - Report and matrix
Other components
- Analyst
- Dataset files
Connections 32
- Analyst → Dataset inventory: lists videos
README.md - Analyst → Timeline command: plots timelines
README.md - Analyst → Boundary export: exports boundaries
README.md - Analyst → Player command: plays video
README.md - Analyst → Report command: requests report
README.md - Dataset inventory → Dataset registry: loads datasets
scripts/list_videos.py - Timeline command → Dataset registry: loads dataset
scripts/plot_timelines.py - Boundary export → Dataset registry: loads dataset
scripts/export_boundaries.py - Player command → Dataset registry: gets video
scripts/play.py - Report command → Dataset registry: loads dataset
scripts/report_conventions.py - Dataset registry → Dataset files: reads config and data
phase_atlas/datasets.py - Dataset registry → Cholec80 loader: dispatches
phase_atlas/datasets.py - Dataset registry → Cataract-1K loader: dispatches
phase_atlas/datasets.py - Dataset registry → CI in-house loader: dispatches
phase_atlas/datasets.py - Cholec80 loader → Annotation model: builds annotations
phase_atlas/loaders/cholec80.py - Cataract-1K loader → Annotation model: builds annotations
phase_atlas/loaders/cataract1k.py - CI in-house loader → Annotation model: builds annotations
phase_atlas/loaders/ci_inhouse.py - Timeline ribbons → Annotation model: plots spans
phase_atlas/timeline.py - Boundary strips → Annotation model: reads transitions
phase_atlas/montage.py - Interactive player → Annotation model: renders annotation
phase_atlas/player.py - Convention report → Annotation model: computes conventions
phase_atlas/analysis.py - Timeline ribbons → Label colors: gets label colors
phase_atlas/timeline.py - Boundary strips → Label colors: gets label colors
phase_atlas/montage.py - Interactive player → Label colors: gets label colors
phase_atlas/player.py - Convention report → Label colors: gets label colors
phase_atlas/analysis.py - Timeline command → Timeline ribbons: renders
scripts/plot_timelines.py - Boundary export → Boundary strips: exports strips
scripts/export_boundaries.py - Player command → Interactive player: runs player
scripts/play.py - Report command → Convention report: writes report
scripts/report_conventions.py - Timeline ribbons → Figures and strips: writes ribbons
README.md - Boundary strips → Figures and strips: writes strips
README.md - Convention report → Report and matrix: writes report and matrix
phase_atlas/analysis.py