Generalizing trained network (one animal) to extract predictions for multiple animals


I’m trying to reproduce the results shown in figure 4 of the Nature methods paper on DeepLabCut (, but for freely moving rats. I have a network trained on a single rat and am trying to make predictions based for multiple animals from this network. But I not able to do this without applying different analysis methods to the scoremaps and having to build this into the package. Could you share your code on how you did this for the mice in the figure?

I am using DeepLabCut 2.0 at the moment.

Thank you in advance for your help! I look forward to hearing from you.

Best wishes,


The multi-animal detection alone is not sufficient for pose-estimation for multiple animals. This is why we have worked on an extended version that should come out soon.

Thank you for your quick reply!
I understand this, but I would still like to get similar results for my rats, just extracting all joints in an image. Then I can do postprocessing to get to pose estimation on this myself.
Is the code that got the results in figure 4 available online already? Would you be willing to share it?
Thank you very much.

Yes, see here

Thank you for again for your help and the link.
I’ve had a look at these issues before, some of the links to the functions you mention in these issues don’t work anymore. Still I think I found the functions (hopefully the right ones), but I am uncertain how to get to the results you showed, even after extracting the scoremaps I still have to get the right method to extract local maxima (I didn’t see this being done in any of the functions), I have found a way to do this, but I am still wondering which method you used, since your results in the paper were really good.
Would you mind sharing how you got to these?
Thank you very much!

Pretty much any local maxima extraction method works, e.g.

Here is the first version that can easily do this:

pip install deeplabcut==2.2b5

1 Like