Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/config/fixtures/pose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `pytorch_config.yaml` fixtures

Frozen: never regenerated. A config DeepLabCut wrote must keep reading, so a fixture is only ever added, never rewritten.

| Folder | Holds |
| --- | --- |
| `generated/` | `<project>-<model>.yaml`, as DeepLabCut `dev` at `d2bbe028` (3.0.3) wrote them with `PoseConfig.build(..., save=False)` then `to_yaml`, from DeepLabCut's `tests/pose_estimation_pytorch/config/fixtures/` projects at that commit, with `project_path: project` and `pose_config_path: pytorch_config.yaml`. `multi_no_unique` is the multi-animal project with `uniquebodyparts: []`, since DeepLabCut refuses top-down models otherwise |
| `legacy/` | Configs as older releases wrote them, each derived by hand from a generated one; see below |

`generated/` holds at least one config for each distinct set of typed fields DeepLabCut writes across the models it offers, ignoring `model.backbone`, `model.heads` and `detector.model`, which are untyped; the others are the sources of `legacy/` and of the top-down crop test. Its paths contain no separator, so the fixtures are byte-identical on every OS.

| File in `legacy/` | Source | Changed |
| --- | --- | --- |
| `dlcrnet_ms5_alias.yaml` | `multi-dlcrnet_stride16_ms5.yaml` | `net_type: dlcrnet_ms5`, the legacy name |
| `top_down_prefix.yaml` | `single-top_down_resnet_50.yaml` | `net_type: top_down_resnet_50`, as written before the prefix moved to `method` |
| `top_down_crop_mismatch.yaml` | `single-rtmpose_s.yaml` | `data.{train,inference}.top_down_crop` 192x256 against a 256x256 head, as DeepLabCut 3.0.1 to 3.0.3 wrote some RTMPose configs (DeepLabCut issue 3592) |
| `weight_init_before_3.0.0rc5.yaml` | `single-resnet_50.yaml` | `train_settings.weight_init` without `snapshot_path`, as written before 3.0.0rc5 |
224 changes: 224 additions & 0 deletions tests/config/fixtures/pose/generated/multi-dekr_w32.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# Config schema version. Do not edit manually.
config_version: 0
model:
backbone:
type: HRNet
model_name: hrnet_w32
freeze_bn_stats: false
freeze_bn_weights: false
interpolate_branches: true
increased_channel_count: false
heads:
bodypart:
type: DEKRHead
weight_init: dekr
target_generator:
type: DEKRGenerator
num_joints: 2
pos_dist_thresh: 17
bg_weight: 0.1
criterion:
heatmap:
type: DEKRHeatmapLoss
weight: 1
offset:
type: DEKROffsetLoss
weight: 0.03
predictor:
type: DEKRPredictor
apply_sigmoid: false
use_heatmap: false
clip_scores: true
num_animals: 2
keypoint_score_type: combined
max_absorb_distance: 75
nms_threshold: 0.05
apply_pose_nms: true
heatmap_config:
channels:
- 480
- 32
- 3
num_blocks: 1
dilation_rate: 1
final_conv_kernel: 1
offset_config:
channels:
- 480
- 30
- 2
num_offset_per_kpt: 15
num_blocks: 2
dilation_rate: 1
final_conv_kernel: 1
unique_bodypart:
type: HeatmapHead
weight_init: normal
predictor:
type: HeatmapPredictor
apply_sigmoid: false
clip_scores: true
location_refinement: true
locref_std: 7.2801
target_generator:
type: HeatmapGaussianGenerator
num_heatmaps: 2
pos_dist_thresh: 17
heatmap_mode: KEYPOINT
gradient_masking: false
generate_locref: true
locref_std: 7.2801
label_keypoint_key: keypoints_unique
criterion:
heatmap:
type: WeightedMSECriterion
weight: 1.0
locref:
type: WeightedHuberCriterion
weight: 0.05
heatmap_config:
channels:
- 480
- 2
kernel_size:
- 3
strides:
- 2
locref_config:
channels:
- 480
- 4
kernel_size:
- 3
strides:
- 2
backbone_output_channels: 480
neck:
pose_model:
net_type: dekr_w32
method: bu
device: auto
metadata:
project_path: project
pose_config_path: pytorch_config.yaml
bodyparts:
- nose
- tail
unique_bodyparts:
- corner1
- corner2
individuals:
- mouse1
- mouse2
with_identity: false
data:
bbox_margin: 20
colormode: RGB
gen_sampling:
inference:
resize:
longest_max_size:
hflip:
affine:
random_bbox_transform:
crop_sampling:
hist_eq: false
motion_blur: false
covering:
elastic_transform:
grayscale:
gaussian_noise:
auto_padding:
pad_width_divisor: 32
pad_height_divisor: 32
normalize_images: true
scale_to_unit_range: false
top_down_crop:
collate:
train:
resize:
longest_max_size:
hflip:
affine:
p: 0.5
rotation: 30
scaling:
- 0.5
- 1.25
translation: 0
random_bbox_transform:
crop_sampling:
width: 448
height: 448
max_shift: 0.1
method: hybrid
hist_eq: false
motion_blur: true
covering:
elastic_transform:
grayscale:
gaussian_noise: 12.75
auto_padding:
normalize_images: true
scale_to_unit_range: false
top_down_crop:
collate:
loader:
runner:
type: PoseTrainingRunner
gpus:
device: auto
key_metric: test.mAP
key_metric_asc: true
eval_interval: 10
optimizer:
type: AdamW
params:
lr: 0.0005
scheduler:
type: LRListScheduler
params:
lr_list:
- - 0.0001
- - 1e-05
milestones:
- 90
- 120
snapshots:
max_snapshots: 5
save_epochs: 25
save_optimizer_state: false
snapshot_prefix:
load_scheduler_state_dict: true
load_weights_only:
train_settings:
batch_size: 8
dataloader_workers: 0
dataloader_pin_memory: false
display_iters: 500
epochs: 200
seed: 42
weight_init:
inference:
multithreading:
enabled: true
queue_length: 4
timeout: 30.0
compile:
enabled: false
backend: inductor
autocast:
enabled: false
conditions:
snapshot:
eval:
mode: all
pcutoff: 0.6
comparison_bodyparts: all
per_keypoint_evaluation: false
force_multi_animal: false
output_dir:
logger:
with_center_keypoints: true
detector:
resume_training_from:
Loading
Loading