Commit Graph

6 Commits

Author SHA1 Message Date
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
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
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
5f8c579247 Splittend in several files 2026-05-20 13:26:03 +02:00