Skip to content

Added functionality: linear transformation and scaling of DLC data.#24

Merged
MMathisLab merged 1 commit intoDeepLabCut:masterfrom
MSchellenberger:transform_and_scale
Jul 1, 2025
Merged

Added functionality: linear transformation and scaling of DLC data.#24
MMathisLab merged 1 commit intoDeepLabCut:masterfrom
MSchellenberger:transform_and_scale

Conversation

@MSchellenberger
Copy link
Copy Markdown
Contributor

Also fixed outdated email in code of conduct.

@MMathisLab
Copy link
Copy Markdown
Member

Super! thanks for your contribution! To make it easy for someone to "see" what it does, could you have a small amount of demo data and an image? i.e., what is the output of your code? 😀

@MMathisLab MMathisLab self-requested a review October 26, 2023 10:42
@MMathisLab MMathisLab added the enhancement New feature or request label Oct 26, 2023
@MSchellenberger
Copy link
Copy Markdown
Contributor Author

MSchellenberger commented Oct 26, 2023

Hi, thank you for the quick feedback!

I´ve already uploaded a demo data csv and there´s a 'tutorial' jupyter notebook which is a run through the code. Furthermore, there´s a README where I explain what the code does and what inputs it needs. In terms of example pictures, I could plot the trajectory of DLC markers, or add a frame of the video with DLC markers & real distances overlayed. If you have any other ideas for visualizing the functionality let me know :)

The code outputs a df with the same shape as the input DLC df.
This code just changes the reference coordinate system of DLC to a reference coordinate system that is based on the behavioral context. Meaning that if you for example run Open Field, and you track the corners with DLC, you can transform the coordinates of DLC tracking (which depict the px distance of the marker from a corner of the field of view in the recorded video) into coordinates that depict the cm distance from a corner of the behavioral context.

I could also add a concrete use cases that highlight the need for this (e.g. having different sized camera field of views between recording days and thus different speed(px/s) values even though the speed is the same, or explain what I used it for in this preprint).

I´m super excited to contribute to the amazing DLC ecosystem!

@MMathisLab MMathisLab merged commit 324d843 into DeepLabCut:master Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants