diff --git a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_m.yaml b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_m.yaml index d2ed3ae52e..23424451e1 100644 --- a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_m.yaml +++ b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_m.yaml @@ -51,6 +51,8 @@ model: simcc_split_ratio: 2.0 sigma: [5.66, 5.66] decode_beta: 150.0 + apply_softmax: true + normalize_outputs: false input_size: [256, 256] in_channels: 768 out_channels: "num_bodyparts" diff --git a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_s.yaml b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_s.yaml index 463e104654..62c5fc1cac 100644 --- a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_s.yaml +++ b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_s.yaml @@ -51,6 +51,8 @@ model: simcc_split_ratio: 2.0 sigma: [5.66, 5.66] decode_beta: 150.0 + apply_softmax: true + normalize_outputs: false input_size: [256, 256] in_channels: 512 out_channels: "num_bodyparts" diff --git a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_x.yaml b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_x.yaml index f1d6f61e67..fde7a4da53 100644 --- a/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_x.yaml +++ b/deeplabcut/pose_estimation_pytorch/config/rtmpose/rtmpose_x.yaml @@ -51,6 +51,8 @@ model: simcc_split_ratio: 2.0 sigma: [6.93, 6.93] decode_beta: 150.0 + apply_softmax: true + normalize_outputs: false input_size: [384, 384] in_channels: 1280 out_channels: "num_bodyparts" diff --git a/deeplabcut/pose_estimation_pytorch/models/predictors/sim_cc.py b/deeplabcut/pose_estimation_pytorch/models/predictors/sim_cc.py index ad53061ccb..b32f2f45dc 100644 --- a/deeplabcut/pose_estimation_pytorch/models/predictors/sim_cc.py +++ b/deeplabcut/pose_estimation_pytorch/models/predictors/sim_cc.py @@ -138,7 +138,8 @@ def get_simcc_maximum( mask = max_val_x > max_val_y max_val_x[mask] = max_val_y[mask] vals = max_val_x - locs[vals <= 0.0] = -1 + threshold = 1.0 / simcc_x.shape[-1] if apply_softmax else 0.0 + locs[vals <= threshold] = -1 if N: locs = locs.reshape(N, K, 2)