Saving joint trajectory data as csv for a whole video

Hello,

I would like to save the positions of the joints during analysis (I have pulled a fresh deeplabcut from github on Friday, 14th Dec. 2018).

Unfortunately, calling analyze_videos(…,save_as_csv=True) does not seem to lead to the trajectory data being saved to a csv file. Instead, there is a csv file in the video directory only containing the positional data of the joints, but only -as it would appear- from one single frame.

I have had a look at the source code of auxiliaryfunctions.py, where the csv should be created at this point here utils/auxiliaryfunctions.py#L49, but I thought, I’d rather ask for some help at this point than to edge myself along the source code any further :wink:

If anyone can give any help/guidance/pointer/documentation how to save the trajectory data, this would be great!
Thanks very much.

Hello,

So if you load the csv into whatever program you want to use next, i.e. MATLAB, then you can just plot x, y for each body part in time through the video. Check out the plot_trajectories fxn, and also here:
DeepLabCut/deeplabcut/utils/plotting.py

Dear Broekai,

Typically the csv file contains an array with

  • frame index times body parts (x, y, and likelihood). So the posture is contained for all frames of a video.

Thus, I am surprised your output contains only one frame. Does the h5 file contain all the poses per frame, or is this consistent for multiple videos? If you plot the data, does it only contain one frame?

Best,
Alexander