Added manual file path selection option for coco#511
Open
shardulmahamulkar wants to merge 2 commits intoJdeRobot:masterfrom
Open
Added manual file path selection option for coco#511shardulmahamulkar wants to merge 2 commits intoJdeRobot:masterfrom
shardulmahamulkar wants to merge 2 commits intoJdeRobot:masterfrom
Conversation
Author
|
Updated: YOLO manual path selection is now implemented in the latest commit (4c96108). Both COCO and YOLO manual paths are working. Ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #465
Summary
The Streamlit app auto-detects image directories and annotation files based on a fixed COCO folder convention (images/{split}/ + annotations/instances_{split}.json). When users have datasets organised differently, the app failed silently with a generic error and no guidance.
This PR adds an optional "Use manual paths" checkbox in the sidebar (COCO mode only) that lets users override auto-detection by specifying the image directory and annotation file directly.
Changes
perceptionmetrics/utils/gui.py
Added
browse_file(filetypes=None)A cross-platform native file-picker dialog (Windows / WSL / macOS / Linux via zenity or kdialog), analogous to the existing
browse_folder()
.
app.py
Imports
browse_file
alongside
browse_folder
.
Dataset Viewer (
tabs/dataset_viewer.py)manual_img_dirmanual_ann_filemanual_paths_enableddataset_viewer_tab():dataset_pathvalidation when valid manual paths are provided.manual_{img_dir}_{ann_file}_{split}when manual paths are active to prevent stale cache usage.FileNotFoundErrorand generic exceptions).Evaluator (
tabs/evaluator.py)dataset_pathdirectory exists.
Error messages updated with expected structure hints.
Expected COCO Structure (auto-detection)
Testing
.jsonUpdate: YOLO Manual Path Selection
The YOLO mode currently does not correctly detect datasets when using manual path selection. Additionally, Streamlit caching is causing inconsistent behavior in some cases.
I am actively working on resolving these issues.
In the meantime, please feel free to review the current changes and let me know if there are any suggestions or improvements.