39 Commits

Author SHA1 Message Date
32bca14661 Merge pull request 'changes-wrt-feedback' (#1) from changes-wrt-feedback into main
Reviewed-on: #1
2026-06-03 12:15:49 +02:00
281a5e104c config: update annotation questions for flow, lighting, weather and sediments 2026-06-03 12:13:21 +02:00
da53d6cd4a ui: show clip position counter in window title 2026-06-03 11:58:48 +02:00
8c793e4488 ui: maximize canvas area and compact side panels 2026-06-03 11:56:10 +02:00
16f891e6eb fix: corrected paths in config example 2026-06-03 11:50:14 +02:00
2820edc871 docs: add river annotation reference link to README 2026-06-03 11:47:45 +02:00
84f2b4e1e8 Added bash commands for windows 2026-06-02 14:35:44 +02:00
08513d643a Update git references for Sensima 2026-06-02 14:32:09 +02:00
6aed29ff9b Merge branch 'refactor-for-aimsight' into 'main'
Refactor for AimSight: modular architecture, S3 storage, and new annotation tools

See merge request industry/aimsight/river-annotation-tool!1
2026-06-02 09:53:59 +00:00
dc7bb8e7eb Address PR review comments: rename to __main__.py, improve config examples, document save freeze 2026-06-02 11:51:37 +02:00
69eab7514f Made project river-agnostic 2026-05-27 10:02:20 +02:00
23dbbc1555 Fix polygon canvas unzooming when mouse leaves axes
Disable matplotlib autoscale after imshow so polygon plot() calls
(rubber-band line, vertices) can't expand the view limits. Also reset
xlim/ylim explicitly in load_clip for clips with different resolutions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 17:39:49 +02:00
88c8f33dfc update readme link to github 2026-05-20 17:10:02 +02:00
4d0673ecb4 Add per-annotator clip lists and document multi-annotator setup
7 annotators, 5 days each, 11 of 24 days double-covered for inter-annotator agreement.
Removed annotator_summary.txt in favour of the README table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:56:11 +02:00
3036a93d04 Move questions and optical flow to separate config files; clean up config.example.yaml
- questions: extracted from config.yaml into config/questions.yaml (committed, like optical_flow_config.yaml)
- optical_flow_config_file and questions_config_file are now required fields
- data_dir and out_dir are now required (no defaults)
- filenames: trimmed to input-only in example; output filenames stay as code defaults
- annotator: remove optional guard around optical flow config loading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:30:59 +02:00
9e135ea28c Improve README clarity and onboarding flow
Add Quick start section, surface uv run throughout, fix repo URL
placeholder, and rename 'How it works' to 'Internals'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:19:54 +02:00
dc59b8affb Add S3 storage support via s3fs; make storage field required
- New filesystem.py: make_fs() factory (returns s3fs.S3FileSystem or None),
  plus fsjoin/fsstem/fsname path helpers
- config.py: storage field is now required ('local' or 's3'); load_config
  raises a clear ValueError when it is missing
- video_loader, clip_selector, annotator: thread fs through all file I/O;
  local paths unchanged, S3 paths use fs.open/fs.exists/fs.pipe
- annotation_script: load .env via python-dotenv at startup, create fs from
  config and pass to Annotator
- Add .env.example with SwitchEngines endpoint and AWS checksum env vars
- pyproject.toml: add s3fs and python-dotenv dependencies
- Reduce default mask alpha from 40% to 15%
- Update example clip names to colon-separated timestamps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:15:38 +02:00
8579bad2e2 Minor config changes 2026-05-20 15:22:25 +02:00
bc83e60910 Improve README clarity and add defaults to controls
- Expand Controls intro with two-panel layout description
- Add brush size range/default and mask alpha range/default to tables
- Split 'Starting-point shortcuts' (Load Prev Mask, Auto Segment) from mask editing table
- Trim 'How it works' mask drawing section to remove implementation internals
- Enable optical_flow_config_file in config.example.yaml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:18:10 +02:00
67c9a1152c Add optical flow Auto Segment button
Annotators can now press Auto Segment to replace the current mask with
an automatic river segmentation based on dense optical flow magnitude
and frame brightness. The result is pushed onto the undo stack, so it
can be refined or reverted like any other mask operation.

Parameters (norm_squared_threshold, gaussian_kernel, brightness_range)
live in a separate config/optical_flow_config.yaml; the button is only
enabled when optical_flow_config_file is set in config.yaml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:13:10 +02:00
47432cec4f Add polygon drawing and click-to-fill tools
Introduce two new drawing modes alongside the existing brush:

- Polygon mode: left-click to place vertices connected by lines; right-click
  removes the last vertex; clicking near the first vertex (red dot) when >= 3
  points are placed closes the shape (bold cyan outline). Multiple shapes can
  coexist as canvas overlays. Cancel Current Poly discards the in-progress
  polygon; Del Shape removes the last completed shape.

- Fill mode: left-click inside any closed polygon to rasterise it onto the
  mask. Selects the innermost shape containing the click (smallest area via
  cv2.contourArea). Polygons whose centroid lies inside the target are punched
  out as holes. Each fill is a single undoable step in the mask history.

Also renames the Alpha slider label to Mask Alpha and removes the stale
Reload Saved reference from the README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:02:46 +02:00
d13ad1743a Add image adjustment sliders, mask alpha, Load Prev Mask, and button state colours
- Three vertical sliders (Brightness, Contrast, Gamma) to the left of the
  canvas for display-only image adjustment; all use power/linear formulae
  applied on-the-fly without touching saved data
- Alpha slider controls mask overlay transparency
- Brush size slider moved to its own row
- Each slider has a reset (↺) button restoring its default value
- Hide Mask button turns red when active; Eraser button turns orange
- Load Prev Mask button copies the saved mask from the previous clip in
  the list onto the current clip; the action is pushed onto the undo stack
  so it can be reverted with Undo
- Right survey panel narrowed (stretch factor 2 → 1)
- README Controls section updated to document all new features

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 14:41:10 +02:00
d0f7cc64fc Update README controls table for latest UI changes
Adds brush preview, Undo×10, Redo, and Hide/Show Mask.
Removes Reload Saved (button was dropped).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 14:24:05 +02:00
a139a2e2bd Add redo, undo×10, brush preview, hide/show mask; drop Reload Saved
mask_canvas.py:
- Redo stack: new strokes clear it, undo pushes onto it, redo pops from it.
- undo10(): undoes up to 10 steps in one call with a single redraw.
- Brush circle preview: white Circle patch tracks mouse position and shows
  current brush radius; hidden when cursor leaves the axes.
- toggle_mask() / btn_mask: hides or shows the green mask overlay without
  affecting the underlying mask data.

annotator.py:
- Removed Reload Saved button and reload_saved() — clip already loads its
  saved state on navigation, making the button redundant.
- Added Undo×10 and Redo buttons wired to mc.undo10 / mc.redo.
- Added Hide Mask button (mc.btn_mask) to the toolbar row.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 14:22:58 +02:00
5b6efc7158 Add Previous button, remove Save button, warn before overwriting annotations
- Previous: saves current clip and navigates back through session history;
  disabled on the first clip, re-enabled automatically as you advance.
- Next: shows a dialog when a saved annotation already exists, letting the
  annotator choose to replace it or keep the existing save before advancing.
- Removed the standalone Save button; Next auto-saves on every advance.
- Skip already wrote nothing to disk; clarified in README.
- Refactored _advance_clip into _switch_ui_to_clip (shared with prev/next).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 14:17:45 +02:00
4aa1e32681 Add end-of-clips dialog and --no-skip flag
Show a modal dialog when all clips have been processed and quit cleanly.
Add --no-skip CLI flag to include already-annotated clips (default remains to skip them).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 14:08:47 +02:00
b4daa28354 All constants are in config 2026-05-20 14:00:11 +02:00
6a0259c6cf Update gitignore 2026-05-20 13:53:06 +02:00
cc115f6f3f Stop tracking gitignored files and remove them from remote
Remove .claude/, .github/workflows/, data/, and notebooks/ from git
tracking so they no longer appear in the remote repository.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 13:52:17 +02:00
263be51767 Removed old notebook 2026-05-20 13:47:17 +02:00
5468712a4a Replace hardcoded config and directory scan with YAML config and explicit clip list
- config.py constants -> config/config.yaml (user-editable, git-ignored)
- Questions and defaults now defined in the YAML, including per-question defaults
- ClipSelector no longer scans the data dir; reads a user-provided clips.txt instead
- Removed --daily / --time / --skip-existing-day args
- video_loader now samples frames evenly across the full clip
- pyyaml added as a dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 13:42:48 +02:00
5f8c579247 Splittend in several files 2026-05-20 13:26:03 +02:00
07aaac08ef Added --skip-existing-day to when using --daily to skip day already done 2026-05-08 13:37:26 +02:00
732fad9570 Title is now on top to avoid hiding image 2026-05-08 08:49:57 +02:00
41b6d06ca3 Gifs are now optionally save (--extras) 2026-05-08 08:48:43 +02:00
025889728d [FEAT]: add time and daily tags to select specific times on a daily basis 2026-05-07 15:35:47 +02:00
97d2896bfd First draft of readme (ty claude) 2026-05-01 10:28:48 +02:00
5c53dcad52 First implementation 2026-05-01 09:32:48 +02:00
9cee33c405 Initial commit 2026-05-01 09:24:14 +02:00