Skip to content

vis compare flag + uv environment change + fixing Github workflow - #73

Merged
kvaikunthan merged 6 commits into
masterfrom
revamp
Aug 18, 2026
Merged

vis compare flag + uv environment change + fixing Github workflow#73
kvaikunthan merged 6 commits into
masterfrom
revamp

Conversation

@harshi-puli

@harshi-puli harshi-puli commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

vis.py --compare mode, uv migration, CI re-enable

Summary

  • vis.py: new --compare <algo> flag. Runs a second registered algo for the same --task on identical frames and stacks its debug-frame grid below the primary algo's in one "Debug Frames" window (not beside it, so neither pane's width shrinks). Each half is corner-labeled with its algo name; sliders for both algos share the window, prefixed by algo name (e.g. center: canny_low) so they don't collide. You can opt to hide labels using the --hide_labels flag
  • Switched from conda to uv for environment/Python-version management. setup.py replaced with pyproject.toml; README installation instructions rewritten accordingly.
  • Re-enabled CI (.github/workflows/ci.yml): restored push/pull_request triggers. The error before was that it was breaking on the old slot machine test file so that was renamed. Also got rid of the lint error error check due too there being too many to fix at the moment.
  • Added a default algo feature within registration that allows you to default to a specific algo for a task. The terminal will output a red error if you fail to specify an algo when there is no default + will also output what algo is being used as default in yellow to avoid any confusion.
Screenshot 2026-08-16 at 6 49 26 PM

How to test --compare

source .venv/bin/activate   # see uv setup below if you don't have this yet

# Two gate algos, stacked in one window, on real course footage
python -m perception.vis.vis --task gate --algo center --compare segmentation_a \
  --data course_footage/GOPR1142.MP4 --resize 0.3

# Try other pairs
python -m perception.vis.vis --task gate --algo segmentation_a --compare segmentation_b \
  --data course_footage/GOPR1142.MP4 --resize 0.3

# Bad --compare value exits with the available-algos list instead of a traceback
python -m perception.vis.vis --task gate --algo center --compare nope \
  --data course_footage/GOPR1142.MP4

# Save the combined, labeled view to vis_rec.mp4
python -m perception.vis.vis --task gate --algo center --compare segmentation_a \
  --data course_footage/GOPR1142.MP4 --resize 0.3 --save_video

q/Esc quits, p pauses, i/o slow down/speed up playback. slalom only has one registered algo (classical) right now, so there's nothing to compare it against yet.

uv setup vs. the old conda flow

Step Old (conda) New (uv)
One-time tool install Install Miniconda curl -LsSf https://astral.sh/uv/install.sh | sh (or brew install uv)
Get Python 3.11 conda create -n urobotics python=3.11 uv venv --python 3.11 (downloads 3.11 automatically if missing, creates .venv/ in the repo)
Activate conda activate urobotics source .venv/bin/activate
Install the package pip3 install -e ./ uv pip install -e .
Install deps pip3 install -r requirements-classical.txt uv pip install -r requirements-classical.txt
Torch/YOLO extras pip3 install -r requirements-torch.txt uv pip install -r requirements-torch.txt

Everything downstream (Cython build, python -m perception.vis.vis ..., pytest) is unchanged once the venv is activated. Env is now per-repo (.venv/ inside perception/, gitignored) rather than one shared named conda env.

CI workflow change

Before: on: workflow_dispatch only (manual-trigger-only, lint + test-classical jobs, both effectively dead since nothing ran automatically).

After: on: push / pull_request / workflow_dispatch (runs automatically again), lint job removed, test-classical job unchanged. Verified locally end-to-end (submodule fetch, dependency install, Cython rebuild, pytest -v --tb=short) — 20 passed, 0 failed, only expected torch-not-installed skip warnings.

@harshi-puli
harshi-puli marked this pull request as ready for review August 17, 2026 01:47

@kvaikunthan kvaikunthan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kvaikunthan
kvaikunthan merged commit 8be52cc into master Aug 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants