Skip to content

Commit 8caf357

Browse files
committed
change num workers and visualization
1 parent 96f2e72 commit 8caf357

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

experiments/infinity_coco/hrnet/w48_384x288_adam_lr1e-3.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ CUDNN:
44
DETERMINISTIC: false
55
ENABLED: true
66
DATA_DIR: ""
7-
GPUS: (0,)
7+
GPUS: (0, 1)
88
OUTPUT_DIR: "output_infinity_coco"
99
LOG_DIR: "log_infinity_coco"
10-
WORKERS: 1
10+
WORKERS: 12
1111
PRINT_FREQ: 10
1212

1313
DATASET:
@@ -91,7 +91,7 @@ MODEL:
9191
LOSS:
9292
USE_TARGET_WEIGHT: true
9393
TRAIN:
94-
BATCH_SIZE_PER_GPU: 40
94+
BATCH_SIZE_PER_GPU: 20
9595
SHUFFLE: true
9696
BEGIN_EPOCH: 0
9797
END_EPOCH: 200

lib/utils/vis.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,11 @@ def save_batch_image_with_joints(
4343
for joint, joint_vis in zip(joints, joints_vis):
4444
joint[0] = x * width + padding + joint[0]
4545
joint[1] = y * height + padding + joint[1]
46-
if joint_vis[0]:
47-
if i_joint < 17:
48-
cv2.circle(
49-
ndarr, (int(joint[0]), int(joint[1])), 2, [255, 0, 0], 2
50-
)
51-
else:
52-
cv2.circle(
53-
ndarr, (int(joint[0]), int(joint[1])), 2, [0, 0, 255], 2
54-
)
46+
# if joint_vis[0]:
47+
if i_joint < 17:
48+
cv2.circle(ndarr, (int(joint[0]), int(joint[1])), 2, [255, 0, 0], 2)
49+
else:
50+
cv2.circle(ndarr, (int(joint[0]), int(joint[1])), 2, [0, 0, 255], 2)
5551
i_joint += 1
5652
k = k + 1
5753
img = cv2.cvtColor(ndarr, cv2.COLOR_BGR2RGB)

0 commit comments

Comments
 (0)