I ran a 6 minute long video through the DeepLabCut program, Colab_TrainNetwork_VideoAnalysis.ipynb. Every step worked fine, until I got to the end and saw that the labeled video was only 1 second long, the first second of the original video. I noticed that during the analysis step, the number of frames went down from 23512 to 58, and I don’t know why this happened.
Below is the following code that was generated. Below that is my config file for any additional information that might be needed. I have never ran into this issue before, please let me know if there are any fixes for this.
Config:
{‘all_joints’: [[0], [1], [2], [3], [4], [5], [6], [7], [8]],
‘all_joints_names’: [‘nose’,
‘leftear’,
‘rightear’,
‘spine1’,
‘spine2’,
‘spine3’,
‘tailbase’,
‘tailmid’,
‘tailend’],
‘batch_size’: 1,
‘crop_pad’: 0,
‘dataset’: 'training-datasets/iteration-0/UnaugmentedDataSet_Cohort 5 ’
'Baseline Mouse INov22/Cohort 5 Baseline Mouse ’
‘I_Nicole95shuffle1.mat’,
‘dataset_type’: ‘imgaug’,
‘deterministic’: False,
‘fg_fraction’: 0.25,
‘global_scale’: 0.8,
‘init_weights’: ‘/usr/local/lib/python3.6/dist-packages/deeplabcut/pose_estimation_tensorflow/models/pretrained/resnet_v1_50.ckpt’,
‘intermediate_supervision’: False,
‘intermediate_supervision_layer’: 12,
‘location_refinement’: True,
‘locref_huber_loss’: True,
‘locref_loss_weight’: 1.0,
‘locref_stdev’: 7.2801,
‘log_dir’: ‘log’,
‘mean_pixel’: [123.68, 116.779, 103.939],
‘mirror’: False,
‘net_type’: ‘resnet_50’,
‘num_joints’: 9,
‘optimizer’: ‘sgd’,
‘pairwise_huber_loss’: True,
‘pairwise_predict’: False,
‘partaffinityfield_predict’: False,
‘regularize’: False,
‘scoremap_dir’: ‘test’,
‘shuffle’: True,
‘snapshot_prefix’: '/content/drive/My Drive/Cohort 5 Baseline Mouse ’
'I-Nicole-2020-11-22/dlc-models/iteration-0/Cohort 5 ’
‘Baseline Mouse INov22-trainset95shuffle1/test/snapshot’,
‘stride’: 8.0,
‘weigh_negatives’: False,
‘weigh_only_present_joints’: False,
‘weigh_part_predictions’: False,
‘weight_decay’: 0.0001}
Using snapshot-13500 for model /content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/dlc-models/iteration-0/Cohort 5 Baseline Mouse INov22-trainset95shuffle1
Initializing ResNet
Analyzing all the videos in the directory…
Starting to analyze % /content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/videos/GOPR1483.MP4
/content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/videos already exists!
Loading /content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/videos/GOPR1483.MP4
0%| | 0/23512 [00:00<?, ?it/s]Duration of video [s]: 392.26 , recorded with 59.94 fps!
Overall # of frames: 23512 found with (before cropping) frame dimensions: 1920 1080
Starting to extract posture
Detected frames: 58
1%| | 235/23512 [00:18<30:05, 12.90it/s]Saving results in /content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/videos…
The videos are analyzed. Now your research can truly start!
You can create labeled videos with ‘create_labeled_video’
If the tracking is not satisfactory for some videos, consider expanding the training set. You can use the function ‘extract_outlier_frames’ to extract a few representative outlier frames.
DLC_resnet50_Cohort 5 Baseline Mouse INov22shuffle1_13500
# Project path (change when moving around)
project_path: /content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22
# Annotation data set configuration (and individual video cropping parameters)
video_sets:
/content/drive/My Drive/Cohort 5 Baseline Mouse I-Nicole-2020-11-22/videos/GOPR1483.MP4:
crop: 0, 1920, 0, 1080
bodyparts:
- nose
- leftear
- rightear
- spine1
- spine2
- spine3
- tailbase
- tailmid
- tailend
start: 0
stop: 1
numframes2pick: 20
# Plotting configuration
skeleton:
-
- leftear
- spine1
-
- spine3
- tailbase
-
- rightear
- tailend
-
- nose
- rightear
-
- leftear
- tailbase
-
- rightear
- spine3
-
- nose
- spine1
-
- leftear
- rightear
-
- tailbase
- tailmid
-
- leftear
- spine3
-
- spine1
- spine2
-
- rightear
- tailbase
-
- spine2
- spine3
-
- leftear
- spine2
-
- rightear
- spine1
-
- nose
- leftear
-
- rightear
- tailmid
-
- leftear
- tailend
-
- leftear
- tailmid
-
- tailmid
- tailend
-
-
rightear
-
spine2
skeleton_color: cyan
pcutoff: 0.6
dotsize: 12
alphavalue: 0.7
colormap: plasmaTraining,Evaluation and Analysis configuration
-
TrainingFraction:
-
0.95
iteration: 0
default_net_type: resnet_50
default_augmenter: default
snapshotindex: -1
batch_size: 8Cropping 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