Skeleton building single animal , is it possible ? (deeplabcut version 2.2b8)

Hi ,
I am working with a pre trained model . After doing the initial video analysis , i am trying to build a skeleton and display the overlaid skeleton. However I am unable to do so .I am using the google collab worksheet and modified the following . The location of the new video file is under sample_data

deeplabcut.analyze_videos('/content/t1-t1-2020-11-10/config.yaml','/content/sample_data/testvideo/horsecor1.mp4',videotype='.mp4')

and creating the labeled data as
deeplabcut.create_labeled_video('/content/t1-t1-2020-11-10/config.yaml', '/content/sample_data/testvideo/horsecor1.mp4')

And the config file content is as follows .

    # Project definitions (do not edit)
Task: t1
scorer: t1
date: Nov10
multianimalproject: false

    # Project path (change when moving around)
project_path: /content/t1-t1-2020-11-10

    # Annotation data set configuration (and individual video cropping parameters)
video_sets:
  /content/t1-t1-2020-11-10/videos/horsecor.mp4:
    crop: 0, 1920, 0, 1080
bodyparts:
- Nose
- Eye
- Nearknee
- Nearfrontfetlock
- Nearfrontfoot
- Offknee
- Offfrontfetlock
- Offfrontfoot
- Shoulder
- Midshoulder
- Elbow
- Girth
- Wither
- Nearhindhock
- Nearhindfetlock
- Nearhindfoot
- Hip
- Stifle
- Offhindhock
- Offhindfetlock
- Offhindfoot
- Ischium
start: 0
stop: 1
numframes2pick: 20

    # Plotting configuration
skeleton:
- - Nose
  - Eye
- - Nose
  - Shoulder
- - Elbow
  - Stifle
  
skeleton_color: rainbow_gist
pcutoff: 0.6
dotsize: 6
alphavalue: 0.7
colormap: plasma

    # Training,Evaluation and Analysis configuration
TrainingFraction:
- 0.95
iteration: 0
default_net_type: resnet_50
default_augmenter: imgaug
snapshotindex: -1
batch_size: 8

    # Cropping Parameters (for analysis and outlier frame detection)
cropping: false
croppedtraining: false
    #if cropping is true for analysis, then set the values here:
x1: 0
x2: 640
y1: 277
y2: 624

    # Refinement configuration (parameters from annotation dataset configuration also relevant in this stage)
corner2move2:
- 50
- 50
move2corner: true

I was wondering if there is something I am missing ? I am unable to see the skeleton with the above configuration on the labeled data.

Hi! deeplabcut.create_labeled_video takes an argument draw_skeleton, which is set to False by default. Set it to True and that will work. Also note that a list of videos should be given rather than a string alone: ['/content/sample_data/testvideo/horsecor1.mp4'].

1 Like

Thank you . It seems to work . Can i define a different color code for the skeleton between two joints ? Or it takes only one color code .

You define the color in skeleton_color in your config.yaml :slight_smile:

1 Like

Hi i understood that part but i was wondering if i can assign a specific color between two joints and another between two others .

for example green between nose and eyes and black between knee and shoulder ?