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
2 stars 0 forks source link

create_video function breaking with label = None #41

Closed vinicvaz closed 1 week ago

vinicvaz commented 1 week ago

When running the function gif with label = None the function create_video is breaking because this function expect the label to be a numpy ndarray here and for this case it is None. How should we handle this? Can we replace this line https://github.com/EthoML/VAME/blob/59d5d730d9c8f9ca048022bd3224ddfc58891863/src/vame/analysis/gif_creator.py#L71

with:

if clabel:
   ax1.scatter(embed[:num_points,0], embed[:num_points,1], c=clabel[:num_points], cmap='Spectral', s=1, alpha=0.4)
else:
   ax1.scatter(embed[:num_points,0], embed[:num_points,1], s=1, alpha=0.4)

With this, the cmap will be ignored for label=None

vinicvaz commented 1 week ago

@DrSRMiller @katiekly would love to hear your thoughts on that

katiekly commented 1 week ago

yes, please try replacing and can you let us know if the output is similar to the gif shown in here?