CIGA Annotator is a subtitle-centric video annotation tool with an Aegisub-like layout and mouse and keyboard coding workflow, designed for annotating character interactions (Speaker, Listener, Target).
This tool is part of the CIGA (Character Interaction Graph Analysis) project suite. The CSV exported from this annotator can be directly used in the CIGA library or CIGA-GUI.
- Aegisub-like layout: Video + coding panel on top, clickable subtitle list at the bottom.
- Task-focused right panel: Current coding, character management and Manual review have separate tabs. Click the video to return to coding.
- Three-way coding: Code Speaker, Listener, and Target per subtitle line.
- Keyboard-first workflow:
Space: play/pause and continue line-by-lineUp/Down: previous / next subtitle lineN: jump to next uncoded subtitle unit; written but unreviewed units are skippedLeft/Right: rewind/forward 2 secondsCtrl+F: focus subtitle search boxF1: open shortcut helpCtrl+1 / 2 / 3: set active coding role to Speaker / Listener / TargetCtrl+Q: cycle active coding roleAlt + key: toggle character in active coding roleCtrl+N: edit the blank Name cell to add a characterCtrl+Shift+N: open Manual review and find the next unreviewed unitCtrl+Return: mark reviewed and next, available only in Manual review
- Mouse coding: Click Speaker/Listener/Target, then check characters. Use explicit N/A when a role does not apply.
- Character management: Add, rename and delete controls; immutable identities survive renaming. Referenced characters cannot be deleted.
- Clickable subtitle list: Click any row to jump to that line and restore its coding state.
- Passive review feedback: Whole subtitle rows show Uncoded, Unreviewed, Needs check/review, Reviewed or Excluded, using colors plus text and a status dot. Missing roles and inherited values never interrupt coding.
- Separate manual review: Code continuously with the existing shortcuts and Space advance, then inspect units in Manual review. Required-role and N/A rules are checked only when marking a unit reviewed. Coding edits or rule changes require review again.
- Separate progress: Coded and Reviewed counts are independent; recording coding does not imply validation. Only reviewed units enter the reviewed analysis export.
- Research records: Project-local coder ID, codebook version, material/unit identities and timestamped coding history.
- Coding undo/redo: Undo selections, notes, N/A, review states and adjudication.
- Independent coder comparison: Verify matching subtitle and video content and rules, inspect differences, and record an explicit resolution.
- Editable Note column: Fill per-line notes either from right panel Note input or directly in the table.
- Player controls: Built-in play/pause button, timeline slider, and current/total time display.
- Coding template options: Optional inheritance of Listener/Target from the previous line.
- Autosave + restore: Every 15 seconds unsaved work is copied to a hidden recovery file (
.<name>.autosave.vat) next to the project, or next to the subtitles before the first save. Your project file is only written when you save. After a crash, the next session offers to restore the recovery file. - Unsaved-change protection: Save/discard/cancel prompt when closing. Choosing not to save discards the changes and the recovery file.
- Safer writes: Manual save and autosave use atomic write replacement to reduce data corruption risk.
- CSV import/export: Save and load annotation progress in UTF-8 BOM CSV.
Repeated imports preserve a single set of table edit handlers, and bulk updates
do not trigger edit callbacks while cells are being replaced.
Exports include a numeric
positioncolumn containing the original subtitle order (starting at 1), alongside the existing subtitle time strings and role columns. CIGA GUI can select these columns automatically; skipped uncoded subtitles retain gaps in their position values. CSV import accepts both older exports and this schema.
Shown with synthetic subtitle material; video decoding is not part of this screenshot.
-
Clone the Repository
git clone https://github.com/MediaCompLab/ciga-annotator.git cd ciga-annotator -
Install Dependencies
pip install -r requirements.txt
-
Run the Application (from the repository root)
python run.pyIf you are on Windows and get a Qt DLL load error in a Conda terminal, run with your system Python explicitly, for example:
c:/python313/python.exe run.py -
Select Files
Select your video and SRT files. Character file is optional; seecharacters.example.txt. If provided, each line can be:CharacterNameCharacterName,ShortcutKey
Character names cannot contain commas, because commas separate characters in the exported CSV and in CIGA's input. Character files are starting templates; edits are kept in the project and do not overwrite a shared template. Use File → Export Character Template to reuse a list.
-
Start Annotation
Click "Start Annotation" to begin. The player auto-pauses at subtitle boundaries for coding. -
Manage Characters Open the Characters tab and use Add/Rename/Delete, or double-click a Name or Key cell. Press
Ctrl+Nto add a character in its blank Name row. Enter saves the name and continues to the next blank row. Click the video to finish editing and resume coding shortcuts; the character table will not take focus back. Clicking a read-only Speaker/Listener/Target summary also keeps coding shortcuts available. -
Save Progress
- Manual save:
Ctrl+S - Open an existing project: File → Open Project
- Autosave is performed periodically and can be restored automatically.
- Manual save:
See the research workflow and migration guide for completion rules, export choices, coder comparison and research record limits.
- Use
Up/Downto move between subtitle lines. - Click a role button, or use
Ctrl+1/2/3/Ctrl+Q. - Check characters or use
Alt + character key; mark N/A for inapplicable roles. - Press Space at the subtitle boundary to continue; missing roles and review status do not block navigation. Review colors remain visible in the subtitle list.
- Inheritance offers visible, unconfirmed Listener/Target suggestions. Verify them before confirming.
- Use
N/ Next Uncoded to find untouched units. After coding, open Manual review and inspect units with Mark reviewed & next or Ctrl+Return. Save with Ctrl+S; CSV export does not save the project.
pip install -r requirements-dev.txt
python -m pytest
To build the Windows executable: python build.py.
The executable is written to dist/CIGA-Annotator.exe; dist/build-info.json
records the CSV schema and Python/Qt versions used by the build.
Both applications' build scripts isolate DLL discovery from unrelated PATH tools
such as Conda or Poppler. Qt hooks collect the modules and multimedia plugins used
by the annotator.
Contributions are welcome! To contribute:
- Fork the Repository
- Create a New Branch
Run: git checkout -b feature/YourFeatureName - Make Your Changes
- Commit Your Changes
Run: git commit -m "Add Your Feature Description" - Push to Your Fork
Run: git push origin feature/YourFeatureName - Create a Pull Request
Please ensure your code follows the project's coding standards and includes appropriate documentation.
This project is licensed under the GPL-3.0 License.
