Skip to content

Commit

Permalink
added loop over all thresholds to single, pairwise, and triplet simil…
Browse files Browse the repository at this point in the history
…arities
  • Loading branch information
bmmtstb committed Jun 6, 2024
1 parent 4a299ad commit d8bc51e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
4 changes: 2 additions & 2 deletions configs/DGS/eval_const_pairwise_similarities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ test:
dgs_rcnn:
module_name: "PoseTrack21_Image"
dataset_path: "./data/PoseTrack21/"
crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction/"
base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction/"
# crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction/"
# base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction/"
batch_size: 8
return_lists: true
# data_path: # will be set in python script
Expand Down
4 changes: 2 additions & 2 deletions configs/DGS/eval_const_single_similarities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ test:
dgs_rcnn:
module_name: "PoseTrack21_Image"
dataset_path: "./data/PoseTrack21/"
crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction/"
base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction/"
# crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction/"
# base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction/"
batch_size: 8
return_lists: true
# data_path: # will be set in python script
Expand Down
4 changes: 2 additions & 2 deletions configs/DGS/eval_const_triplet_similarities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ test:
dgs_rcnn:
module_name: "PoseTrack21_Image"
dataset_path: "./data/PoseTrack21/"
crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction/"
base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction/"
# crops_folder: "./data/PoseTrack21/crops/256x192/rcnn_prediction_XXX/"
# base_path: "./data/PoseTrack21/posetrack_data/rcnn_prediction_XXX/"
batch_size: 8
return_lists: true
# data_path: # will be set in python script
Expand Down
12 changes: 8 additions & 4 deletions scripts/own/eval_pair_similarities_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def run(config: Config, dl_key: str, paths: list[str]) -> None:
run(config=cfg, dl_key="dgs_gt", paths=data_paths)

print("Evaluating on the PT21 eval-dataset using KeypointRCNN as prediction backbone")
cfg = load_config(CONFIG_FILE)
base_path = cfg["dgs_rcnn"]["base_path"]
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)
for threshold in tqdm([0.85, 0.9, 0.95, 0.99], desc="thresholds"):
thresh_name = f"{int(threshold * 100):03d}"
cfg = load_config(CONFIG_FILE)
base_path = f"./data/PoseTrack21/posetrack_data/rcnn_prediction_{thresh_name}/"
cfg["dgs_rcnn"]["base_path"] = base_path
cfg["dgs_rcnn"]["crops_folder"] = f"./data/PoseTrack21/crops/256x192/rcnn_prediction_{thresh_name}/"
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)
12 changes: 8 additions & 4 deletions scripts/own/eval_single_similarity_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ def run(config: Config, dl_key: str, paths: list[str]) -> None:
run(config=cfg, dl_key="dgs_gt", paths=data_paths)

print("Evaluating on the PT21 eval-dataset using KeypointRCNN as prediction backbone")
cfg = load_config(CONFIG_FILE)
base_path = cfg["dgs_rcnn"]["base_path"]
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)
for threshold in tqdm([0.85, 0.9, 0.95, 0.99], desc="thresholds"):
thresh_name = f"{int(threshold * 100):03d}"
cfg = load_config(CONFIG_FILE)
base_path = f"./data/PoseTrack21/posetrack_data/rcnn_prediction_{thresh_name}/"
cfg["dgs_rcnn"]["base_path"] = base_path
cfg["dgs_rcnn"]["crops_folder"] = f"./data/PoseTrack21/crops/256x192/rcnn_prediction_{thresh_name}/"
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)
12 changes: 8 additions & 4 deletions scripts/own/eval_triplet_similarities_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def run(config: Config, dl_key: str, paths: list[str]) -> None:
run(config=cfg, dl_key="dgs_gt", paths=data_paths)

print("Evaluating on the PT21 eval-dataset using KeypointRCNN as prediction backbone")
cfg = load_config(CONFIG_FILE)
base_path = cfg["dgs_rcnn"]["base_path"]
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)
for threshold in tqdm([0.85, 0.9, 0.95, 0.99], desc="thresholds"):
thresh_name = f"{int(threshold * 100):03d}"
cfg = load_config(CONFIG_FILE)
base_path = f"./data/PoseTrack21/posetrack_data/rcnn_prediction_{thresh_name}/"
cfg["dgs_rcnn"]["base_path"] = base_path
cfg["dgs_rcnn"]["crops_folder"] = f"./data/PoseTrack21/crops/256x192/rcnn_prediction_{thresh_name}/"
data_paths = [f.path for f in os.scandir(base_path) if f.is_file()]
run(config=cfg, dl_key="dgs_rcnn", paths=data_paths)

0 comments on commit d8bc51e

Please sign in to comment.