DeepLabCut: A Deep Learning-Based Behavior Analysis Tool

This article was automatically translated from Japanese using AI. The Japanese version is the authoritative version.

(The image above links to the paper.)

Behavioral analysis is a crucial experimental approach in biology, and accurate quantification of behavior is especially indispensable for understanding the brain.

Traditionally, high-accuracy pose estimation has been achieved by attaching markers (such as sensors) to the subject (a person or a laboratory animal).
However, sensors get in the subject’s way, which can alter its behavior or restrict its movements.

One marker-free alternative is to fit a skeleton model, but developing such models is time-consuming and has to be done on a large scale.
There are also image-based pose estimation systems, but these generate enormous amounts of data, which again makes them very difficult for a single laboratory to run given the equipment required.

With DeepLabCut, anyone with a single computer can perform pose estimation very easily.
Using deep learning-based image recognition, you can track any body parts you choose without markers.

Because the labeling is learned by a deep network, you can analyze recorded videos without correcting them beforehand.
In other words, tracking works even if the lighting across the field of view is uneven or the image is somewhat distorted depending on the camera angle.

The page of the laboratory that developed DeepLabCut is here.
The GitHub repository is here.

From actually using DeepLabCut, I found that the computer used for analysis needs a GPU (graphics card) with at least 8 GB of memory.
In gaming PC terms, that means a mid- to high-end GPU, so comfortable analysis is not possible on an everyday laptop.

That said, even without such a high-spec machine, you can run the analysis on a virtual GPU using Google Colab.
I haven’t tried it yet, though…

In practice, I found the plotting accuracy to be very high.
However, analysis often fails when the background differs from that of the training data, so it is best to assume the exact setting you want to analyze and use training data recorded under conditions as close to it as possible.

The paper shows that plotting accuracy improves further when you label not only the few points you are interested in but the whole subject, including a rough skeleton, even for parts you will not use in the analysis.
In addition, if the results are unsatisfactory after training and analysis, you can remove the problematic frames or add new training data, allowing you to actively refine the model.

DeepLabCut itself is very user-friendly, and anyone can use it easily.
Why not give it a try in your own analyses?

I’d like to write about how to install and use DeepLabCut in future posts.


Previous
Next