Skip to content

Commit 0f2e9a5

Browse files
authored
change dark_w32_384x288 batchsize to 32; modify np.pad to support lower numpy version (#3788)
1 parent 40436c8 commit 0f2e9a5

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

configs/keypoint/hrnet/dark_hrnet_w32_384x288.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ TrainReader:
111111
std: *global_std
112112
is_scale: true
113113
- Permute: {}
114-
batch_size: 64
114+
batch_size: 32
115115
shuffle: true
116116
drop_last: false
117117

deploy/python/keypoint_postprocess.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def __call__(self, heatmap, tagmap, heat_k, inds_k, original_height,
106106
# pad the cost matrix, otherwise new pose are ignored
107107
if num_valid > num_clusters:
108108
cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)),
109+
'constant',
109110
constant_values=((0, 0), (0, 1e-10)))
110111
rows, cols = linear_sum_assignment(cost)
111112
for y, x in zip(rows, cols):

ppdet/modeling/architectures/keypoint_hrhrnet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class HigherHRNet(BaseArch):
3535

3636
def __init__(self,
3737
backbone='HRNet',
38-
hrhrnet_head='HigherHRNetHead',
38+
hrhrnet_head='HrHRNetHead',
3939
post_process='HrHRNetPostProcess',
4040
eval_flip=True,
4141
flip_perm=None,
@@ -224,6 +224,7 @@ def __call__(self, heatmap, tagmap, heat_k, inds_k, original_height,
224224
# pad the cost matrix, otherwise new pose are ignored
225225
if num_valid > num_clusters:
226226
cost = np.pad(cost, ((0, 0), (0, num_valid - num_clusters)),
227+
'constant',
227228
constant_values=((0, 0), (0, 1e-10)))
228229
rows, cols = linear_sum_assignment(cost)
229230
for y, x in zip(rows, cols):

0 commit comments

Comments
 (0)