EthoML / VAME

Variational Animal Motion Embedding - A tool for time series embedding and clustering
https://ethoml.github.io/VAME/
GNU General Public License v3.0
7 stars 0 forks source link

Belly index hardcoded #83

Open luiztauffer opened 2 weeks ago

luiztauffer commented 2 weeks ago

the belly indexes for X and Y seems to be hardcoded, even though the DLC data sometimes puts them into different columns than those

https://github.com/EthoML/VAME/blob/70ba4301cb2d1655e6b8693b0399ed6578b5e855/src/vame/util/align_egocentrical.py#L366-L367

For example, in the sample dataset, Session001.csv, the order of body parts is:

This is probably assuming the wrong belly positions over the DLC data and therefore probably doing the wrong shifting operation here:

https://github.com/EthoML/VAME/blob/70ba4301cb2d1655e6b8693b0399ed6578b5e855/src/vame/util/align_egocentrical.py#L379-L384

how does that look to you, @katiekly @DrSRMiller ?

DrSRMiller commented 1 week ago

Yes, this would be a major error. The two body parts and associated DLC coordinate CSV columns used for egocentric alignment (usually belly and tail base), and the one body used to set the stable center to (0,0) (usually belly), should not be hardcoded, but instead specified as an argument to the egocentric alignment function.