| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
hi @maximpavliv can you add a screen shot or short video of this? |
Sorry, something went wrong.
Yes, done! |
Sorry, something went wrong.
|
For training -- it should also link to the docs & recommendations. I'd also suggest to say that it's typically preferable to use generative sampling (so no predictions during training). |
Sorry, something went wrong.
There was a problem hiding this comment.
Adds support for selecting conditional top-down (CTD) model conditions in the DeepLabCut GUI’s Create Training Dataset tab.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file| File | Description |
|---|---|
| deeplabcut/pose_estimation_pytorch/config/utils.py | Added is_model_cond_top_down to detect CTD models. |
| deeplabcut/pose_estimation_pytorch/config/init.py | Exported new is_model_cond_top_down util. |
| deeplabcut/pose_estimation_pytorch/init.py | Exported new is_model_cond_top_down util. |
| deeplabcut/gui/tabs/create_training_dataset.py | Integrated CTD conditions widget, refactored combo updates, and added _build_ctd_conditions. |
| deeplabcut/gui/components.py | Added ConditionsSelectionWidget, set_combo_items, and shared message-box helpers. |
deeplabcut/gui/components.py:361
json_prediction_label = "Json predictions"
deeplabcut/gui/tabs/create_training_dataset.py:422
def _build_ctd_conditions(
Sorry, something went wrong.
| if conditions_path.suffix.lower() in [".h5", ".json"]: | ||
| return conditions_path | ||
| elif conditions_path.suffix.lower() == ".pt": | ||
| match = re.search(r"shuffle(\d+)", str(conditions_path)) |
There was a problem hiding this comment.
The regex is case-sensitive and won’t match filenames with uppercase "Shuffle"; consider using re.IGNORECASE or normalizing the string to lowercase before searching.
| match = re.search(r"shuffle(\d+)", str(conditions_path)) | |
| match = re.search(r"shuffle(\d+)", str(conditions_path), re.IGNORECASE) |
Sorry, something went wrong.
| try: | ||
| index = detectors.index(default_detector) | ||
| except ValueError: | ||
| try: | ||
| index = detectors.index("ssdlite") | ||
| except ValueError: | ||
| index = -1 |
There was a problem hiding this comment.
Using -1 will clear the combo box selection; consider defaulting to 0 or checking for an empty list to avoid no-selection states.
| try: | |
| index = detectors.index(default_detector) | |
| except ValueError: | |
| try: | |
| index = detectors.index("ssdlite") | |
| except ValueError: | |
| index = -1 | |
| if not detectors: | |
| index = 0 # Default to the first item if the list is empty | |
| else: | |
| try: | |
| index = detectors.index(default_detector) | |
| except ValueError: | |
| try: | |
| index = detectors.index("ssdlite") | |
| except ValueError: | |
| index = 0 # Default to the first item if no match is found |
Sorry, something went wrong.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
This Pull Request adds a widget to select conditions to the Create training dataset tab in the DeepLabCut GUI.
The widget is visible only when a CTD model is selected.
The conditions can be one of the following:
The user can choose the type of conditions they want to use in the QtWidgets.QFileDialog.getOpenFileName dialog using the filter (in the bottom-right corner of the window).
If a CTD model is selected but conditions are missing - the shuffle creation fails (a warning message is displayed).