FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Avoid redundant superanimal colormap calls during pytorch inference by juan-cobos · Pull Request #3159 · DeepLabCut/DeepLabCut · GitHub

Avoid redundant superanimal colormap calls during pytorch inference - #3159

Merged
MMathisLab merged 2 commits into
DeepLabCut:mainfrom
juan-cobos:avoid-redundant-colormap-calls
Jan 9, 2026
Merged

Avoid redundant superanimal colormap calls during pytorch inference#3159
MMathisLab merged 2 commits into
DeepLabCut:mainfrom
juan-cobos:avoid-redundant-colormap-calls

Conversation

Copy link
Copy Markdown
Contributor

Simply placing colormap calls outside the for loop of video paths and create output_video when create_labeled_video is True.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

This PR optimizes the superanimal video inference by eliminating redundant colormap lookups. Previously, the colormap was fetched once per video in the loop, but now it's fetched only once before processing all videos.

  • Moved colormap initialization outside the video processing loop to avoid redundant calls
  • Reorganized output_video path creation to only occur when create_labeled_video is True

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

deruyter92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@juan-cobos, thanks for changing this. Looks good.

MMathisLab added enhancement New feature or request ModelZoo related to models/code for modezoo.deeplabcut.org DLC3.0🔥 labels Jan 9, 2026
MMathisLab merged commit ced1ab6 into DeepLabCut:main Jan 9, 2026
juan-cobos deleted the avoid-redundant-colormap-calls branch January 9, 2026 19:24
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

Labels

DLC3.0🔥 enhancement New feature or request ModelZoo related to models/code for modezoo.deeplabcut.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL