Skip to content

Commit 80d1956

Browse files
committed
set args as required
1 parent 768652c commit 80d1956

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

experiments/aifi/hrnet/mpii_w32_256x256_adam_lr1e-3.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DATASET:
1717
FLIP: true
1818
NUM_JOINTS_HALF_BODY: 8
1919
PROB_HALF_BODY: -1.0
20-
ROOT: '/media/longc/LSSD/Public/PILSNU'
20+
ROOT: '/data/MCMTT/Public/PETS2009.S2.L1'
2121
ROT_FACTOR: 30
2222
SCALE_FACTOR: 0.25
2323
TEST_SET: valid
@@ -112,7 +112,7 @@ TEST:
112112
FLIP_TEST: true
113113
POST_PROCESS: true
114114
SHIFT_HEATMAP: true
115-
COCO_BBOX_FILE: '/extra/code/maskrcnn-benchmark/inference/PILSNU/bbox.json'
115+
COCO_BBOX_FILE: '/extra/code/maskrcnn-benchmark/inference/coco_PETS2009.S2.L1/bbox.json'
116116
DEBUG:
117117
DEBUG: true
118118
SAVE_BATCH_IMAGES_GT: true

tools/tracking/convert_pose_to_tracking.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ def parse_args():
8585
parser = argparse.ArgumentParser(description='Convert dataset')
8686
parser.add_argument(
8787
'--outdir', help="output dir for json files",
88-
default='/media/longc/LSSD/Public/PILSNU/detections_keypoints', type=str)
88+
required=True, type=str)
8989
parser.add_argument(
9090
'--datadir', help="keypoint file",
91-
default='/data/MCMTT/Public/PILSNU', type=str)
91+
required=True, type=str)
9292
parser.add_argument(
9393
'--keypoint-file', help="keypoint file",
94-
default='/extra/code/deep-high-resolution-net.pytorch/output/aifi/pose_hrnet/mpii_w32_256x256_adam_lr1e-3/box_keypoints.json', type=str)
94+
required=True, type=str)
9595

9696
return parser.parse_args()
9797

@@ -135,15 +135,13 @@ def convert_tracking(data_dir, out_dir, keypoint_file, min_score=0.4):
135135

136136
# index images
137137
image_names = load_images(image_root)
138-
image_wh = None
139138
for image_filename in tqdm(image_names, total=len(image_names)):
140139
name = os.path.splitext(image_filename)[0]
141140
camera_id, timestamp = os.path.split(name)
142141
camera_id = os.path.basename(camera_id)
143142

144-
if image_wh is None:
145-
image = cv2.imread(os.path.join(image_root, image_filename))
146-
image_wh = (image.shape[1], image.shape[0])
143+
image = cv2.imread(os.path.join(image_root, image_filename))
144+
image_wh = (image.shape[1], image.shape[0])
147145

148146
file_data = {
149147
'camera_id': int(camera_id),

0 commit comments

Comments
 (0)