Deeplabcut tutorial (1) Installation (GPU & CPU version) (only for newbies)

Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right.


Preface

This is the first time I used deeplabcut to encounter some problems and how to use them. I will quote some articles and video links written by others to help everyone solve the problem. I will not write if it is easy to solve the problem by reading other people's articles hhhhh I hope this article can be helpful
. To help everyone avoid pitfalls TWT, the pitfalls that have been stepped on here will be highlighted (will continue to be updated!
With (GPU)) is the part that will be used in the Deeplabcut-GPU version, and CPU users can skip it.

1. What is Deeplabcut?

—DLC focuses on 2D body point tracking of animals. It has pre-trained networks and optional training networks such as ResNet50 and 101. It supports custom body points and has a clear process.

2. Usage steps

1.Environment configuration

1.1Install anaconda

Personally, I think this video on site b is very, very, very detailed↓. After reading the package, you will
find the link: Installation and basic use of Python+Anaconda+PyCharm [Suitable for complete zero foundation]

1.2 Change source

Because the download addresses of many packages are abroad, changing the download source to the domestic Tsinghua mirror will make the download speed much faster!
Use win+R, enter cmd, open the console, enter the following three lines (remember to enter one line at a time

  conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

  conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

  conda config --set show_channel_urls yes

1.2 Install CUDA and CUdnn (GPU)

Link: Installation of CUDA and cudnn
alt
Attention! Here, you copy and paste the files in the downloaded folder to the specified location instead of replacing the entire folder! Attention please!

2.Deeplabcut installation

2.1 Download files

There are several ways to install it, but I personally think this installation method is the easiest.
Link: Official installation address
Insert image description here
. Click the blue HERE to download the file! After decompression, you will get a yaml file!

2.2 Import files

Here I borrow the link to the picture article from blogger SlOooow and delete it.


  1. Select Anaconda Navigator 2 under the Anaconda directoryInsert image description hereInsert image description here
  2. Import
    Insert image description here
    and wait for it to download! However, sometimes downloading may be interrupted due to poor network or something, and it can be solved by re-importing it. If problems occur multiple times, update pip!

3. Run Deeplabcut

Select the installed environment, select Open with IPython
Insert image description here
(continue to borrow the picture)
and enter

import deeplabcut
deeplabcut.launch_dlc()

After entering the first line of code:

There will be an error here without GPU, ignore it! (Continue to borrow the picture)
Insert image description here
Some GPUs will prompt this.
Insert image description here
Although the prompt says to enter pip install torch directly, in fact, I tried n times and this error occurred. This error means that the download has timed out. So at this
Insert image description here
time we have to Consider changing the source, Alibaba mirror↓

pip install 包名 -i  http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

Here, change the 'package name' to torch↑ according to our needs and you can download it smoothly! (The speed is quite fast)
Insert image description here
Then enter the second line of code deeplabcut.launch_dlc() and this interface will appear.
Insert image description here

The installation part is over here! The next article is a usage tutorial!
The usage tutorial has been updated↓
Deeplabcut tutorial (2) using
https://blog.csdn.net/Scabbards_/article/details/130386052?spm=1001.2014.3001.5501

Summarize

The above is what I will talk about today, a brief introduction to the installation of deeplabcut. Hope this helps everyone!

Guess you like

Origin blog.csdn.net/Scabbards_/article/details/125535035