Interactive tuning workspace for Wego tray inspection parameters, aligned with VisionRuntime detector logic.
wego-tray-tuner is a visual tuning tool built around detector logic synced from VisionRuntime. It focuses on parameter visibility, anchor editing, and overlay-based inspection review, so tuning can be done interactively instead of only through raw config files.
This project is intended for single-image detector tuning and review in a practical engineering workflow. It provides:
- visual parameter adjustment
- anchor placement and correction
- overlay-based inspection result review
- local working-config saveback after successful detection
Detector algorithm logic remains in the synced files under detect/, while this repository provides the UI shell and tuning workflow around that logic.
wego-tray-tuner exists to make detector tuning more maintainable and reviewable.
Instead of editing inspection parameters only in YAML and re-running the full runtime, this tool lets you:
- load an image directly
- move anchors visually
- adjust parameters interactively
- run detection and inspect the returned overlay immediately
- save the current working state for continued tuning
This makes it useful as a focused tuning workspace for detector recipes that will later be used with VisionRuntime.
This repository is not a separate detector implementation.
Its role is:
- UI and tuning workflow live here
- detector logic is synced from VisionRuntime under
detect/ - detector recipes are loaded from
config/wego_tray/
This structure helps keep tuning behavior aligned with the runtime behavior used in the main inspection project.
- Interactive anchor placement for Wego tray inspection
- Visual parameter adjustment in a dedicated tuning UI
- Overlay-based inspection review after each detection run
- Neighbor-image browsing with
Prev/Nextfor quick comparison - Working-config persistence after successful tuning
- Synced detector logic for consistency with VisionRuntime
The UI provides interactive anchor placement, parameter editing, and overlay-based inspection review in a single workspace. It is designed to make detector tuning easier to validate visually before syncing recipes back into a runtime workflow.
Manually copy from VisionRuntime:
VisionRuntime/config/wego_tray/*.yaml->wego-tray-tuner/config/wego_tray/*.yamlVisionRuntime/detect/*->wego-tray-tuner/detect/*VisionRuntime/utils/image_codec.py->wego-tray-tuner/utils/image_codec.py- optional samples ->
wego-tray-tuner/data/images/*
pip install -r requirements.txt
python main.pyBuild a folder-based package (onedir):
pip install pyinstaller
pyinstaller --noconfirm --clean --windowed --name wego-tray-tuner main.pyAfter build, copy the detector recipe folder to the generated output:
- source:
config/wego_tray/*.yaml - target:
dist/wego-tray-tuner/config/wego_tray/*.yaml
Run:
dist/wego-tray-tuner/wego-tray-tuner.exe
Notes:
- Keep the whole
dist/wego-tray-tuner/folder together (do not move only the exe). - The packaged app reads/writes
config/wego_tray/=@WORKING_+.yaml. - The packaged app expects recipe files under
config/wego_tray/. onediroutput includes runtime dependencies under_internal/(OpenCV / NumPy / Tk); this is normal.
- Click
Opento load an image. - Drag 6 anchors (
0/1/2xL/R) and adjust parameters. - Click
Detectto run inspection and update overlay. - Optional: use
Prev/Nextto browse images in the same folder.
After Detect, the displayed image is the detector overlay returned by detect/wego_tray.py.
config/wego_tray/=@WORKING_+.yaml(working config)- first lexicographically sorted recipe under
config/wego_tray/*.yaml, excluding_-prefixed files and=@WORKING_+.yaml
config/wego_tray/=@WORKING_+.yaml
- If params were not changed, no file write occurs.
main.py: thin application entrypointapp/__init__.py: app package export surfaceapp/controller.py: app workflow controllerui/control_panel.py: right parameter panelui/image_view.py: image canvas, overlays, anchors, nav hit areascore/slot_layout_utils.py: ROI grid generation helperscore/params.py: YAML load/merge/savecore/detector.py: adapter to synced detectordetect/: synced detector package from VisionRuntimeconfig/: synced detector configdata/: sample images
docs/app_design.md: wego-tray-tuner app design and runtime flowdocs/detect.md: detector reference and compatibility constraintsdocs/sync_contract.md: sync contract with VisionRuntimedocs/ui_param_mapping.md: UI label to detector key mapping
