Strange values in the CSV file after novel video analysis

Hello, I faced a very strange problem with deeplabcut while analyzing the novel videos. I am analyzing the videos from two cameras (one from the top and another one from the side of a cage). After I trained the deeplabcut with sufficient training material, I run the tracking for 14hours of novel videos. The result of the training is very satisfying and it can perfectly track the animal with limited mistakes, but the CSV files that it gives are full of non-sense data. I have nearly 500000 frames but nearly 16000 of the frames have (either x or y) negative values. Also, there are a few thousand of the frames that their x or y value is exceeding the maximum values of the axis. For instance, for my side camera, I have a picture size of 640*480 pixels, it means that on the Y-axis I should not getting values beyond 480, However, I have a lot of frames that have values like 481, 484 or 488, they never exceed 489. I want to know how it is even possible to receive such data. Can you help me fix this problem?

Hi @Amirhossein_Azami so you mean when you create a video it looks good (i.e. you have a pcutoff set such that only dots > pcutoff are displayed, if that wasn’t clear). And the output files of deeplabcut.plot_trajectories look fine? Then it’s just if parts are occluded and cannot be detected, we “must” give you an estimation based on the heatmap, but that is why pcutoff is used :slight_smile: Does that make sense?

I see, so it means that I can delete any thing that have been considered as negative or greater than the maximum size of the axis right? I am asking it because I am trying to use it for making a heat map (a plot that shows the parts of the cage that the animal have resided mostly based on the coloring) and for that I do not think that I can use the negative values or the values that are exceeding the maximum. Also, I wanted to ask if it is possible to make the heat map plot by deeplabcut itself?

yep! you can ignore negative numbers.

You can make a heatmap during evaluation of the actual NN outputs now, as of about ~30 seconds ago :wink: Check it out: https://github.com/DeepLabCut/DeepLabCut

Thank you so much for letting me know, where is exactly on the deeplabcut’s github? I can not find it!

Another comment to add is that outputs can be slightly larger/smaller than the image bounds due to the locref predictions. Usually, this will indeed be accompanied with low likelihoods.

1 Like