Skip to content

Commit 13a9205

Browse files
authored
Merge branch 'DeepLabCut:main' into main
2 parents 5527cbb + df58345 commit 13a9205

File tree

5 files changed

+105
-1
lines changed

5 files changed

+105
-1
lines changed

deeplabcut/core/metrics/bbox.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
from unittest.mock import Mock, patch
1919

20+
from datetime import datetime
21+
2022
import numpy as np
2123

2224
try:
@@ -66,6 +68,7 @@ def compute_bbox_metrics(
6668
coco.dataset["annotations"] = []
6769
coco.dataset["categories"] = [{"id": 1, "name": "animals", "supercategory": "obj"}]
6870
coco.dataset["images"] = []
71+
coco.dataset['info'] = {"description": "Generated by DeepLabCut","year": datetime.now().year,"date_created": datetime.now().strftime("%Y-%m-%d")}
6972
predictions = []
7073
for idx, (img, gt) in enumerate(ground_truth.items()):
7174
img_id = idx + 1
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
data:
2+
colormode: RGB
3+
inference:
4+
normalize_images: true
5+
train:
6+
affine:
7+
p: 0.5
8+
scaling: [1.0, 1.0]
9+
rotation: 30
10+
translation: 0
11+
gaussian_noise: 12.75
12+
normalize_images: true
13+
device: auto
14+
method: td
15+
model:
16+
backbone:
17+
type: CSPNeXt
18+
model_name: cspnext_s
19+
freeze_bn_stats: false
20+
freeze_bn_weights: false
21+
deepen_factor: 0.33
22+
widen_factor: 0.5
23+
backbone_output_channels: 512
24+
heads:
25+
bodypart:
26+
type: RTMCCHead
27+
weight_init: RTMPose
28+
target_generator:
29+
type: SimCCGenerator
30+
input_size:
31+
- 256
32+
- 256
33+
smoothing_type: gaussian
34+
sigma:
35+
- 5.66
36+
- 5.66
37+
simcc_split_ratio: 2.0
38+
label_smooth_weight: 0.0
39+
normalize: false
40+
criterion:
41+
x:
42+
type: KLDiscreteLoss
43+
use_target_weight: true
44+
beta: 10.0
45+
label_softmax: true
46+
y:
47+
type: KLDiscreteLoss
48+
use_target_weight: true
49+
beta: 10.0
50+
label_softmax: true
51+
predictor:
52+
type: SimCCPredictor
53+
simcc_split_ratio: 2.0
54+
input_size:
55+
- 256
56+
- 256
57+
in_channels: 512
58+
out_channels: 39
59+
in_featuremap_size:
60+
- 8
61+
- 8
62+
simcc_split_ratio: 2.0
63+
final_layer_kernel_size: 7
64+
gau_cfg:
65+
hidden_dims: 256
66+
s: 128
67+
expansion_factor: 2
68+
dropout_rate: 0
69+
drop_path: 0.0
70+
act_fn: SiLU
71+
use_rel_bias: false
72+
pos_enc: false
73+
net_type: rtmpose_s
74+
runner:
75+
type: PoseTrainingRunner
76+
key_metric: "test.mAP"
77+
key_metric_asc: true
78+
eval_interval: 10
79+
optimizer:
80+
type: AdamW
81+
params:
82+
lr: 1e-5
83+
scheduler:
84+
type: LRListScheduler
85+
params:
86+
lr_list: [ [ 1e-6 ], [ 1e-7 ] ]
87+
milestones: [ 160, 190 ]
88+
snapshots:
89+
max_snapshots: 5
90+
save_epochs: 25
91+
save_optimizer_state: false
92+
train_settings:
93+
batch_size: 1
94+
dataloader_workers: 0
95+
dataloader_pin_memory: false
96+
display_iters: 500
97+
epochs: 100
98+
seed: 42
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dlcrnet": "tensorflow",
33
"hrnet_w32": "pytorch",
4-
"resnet_50": "pytorch"
4+
"resnet_50": "pytorch",
5+
"rtmpose_s": "pytorch"
56
}

tests/core/inferenceutils/test_map_computation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ def eval_coco(
419419
coco.dataset["annotations"] = ground_truth["annotations"]
420420
coco.dataset["categories"] = ground_truth["categories"]
421421
coco.dataset["images"] = ground_truth["images"]
422+
coco.dataset["info"] = {"description": "Generated by DeepLabCut"}
422423
coco.createIndex()
423424

424425
coco_det = coco.loadRes(predictions)

tests/core/metrics/test_metrics_map_computation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def eval_coco(
394394
coco.dataset["annotations"] = ground_truth["annotations"]
395395
coco.dataset["categories"] = ground_truth["categories"]
396396
coco.dataset["images"] = ground_truth["images"]
397+
coco.dataset["info"] = {"description": "Generated by DeepLabCut"}
397398
coco.createIndex()
398399

399400
coco_det = coco.loadRes(predictions)

0 commit comments

Comments
 (0)