diff --git a/configs/DGS/eval_const_pairwise_similarities.yaml b/configs/DGS/eval_const_pairwise_similarities.yaml index e594c7b..137780a 100644 --- a/configs/DGS/eval_const_pairwise_similarities.yaml +++ b/configs/DGS/eval_const_pairwise_similarities.yaml @@ -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 diff --git a/configs/DGS/eval_const_single_similarities.yaml b/configs/DGS/eval_const_single_similarities.yaml index 96301f4..2fe6050 100644 --- a/configs/DGS/eval_const_single_similarities.yaml +++ b/configs/DGS/eval_const_single_similarities.yaml @@ -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 diff --git a/configs/DGS/eval_const_triplet_similarities.yaml b/configs/DGS/eval_const_triplet_similarities.yaml index 23c073f..034fa11 100644 --- a/configs/DGS/eval_const_triplet_similarities.yaml +++ b/configs/DGS/eval_const_triplet_similarities.yaml @@ -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 diff --git a/scripts/own/eval_pair_similarities_const.py b/scripts/own/eval_pair_similarities_const.py index dfa31be..e906428 100644 --- a/scripts/own/eval_pair_similarities_const.py +++ b/scripts/own/eval_pair_similarities_const.py @@ -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) diff --git a/scripts/own/eval_single_similarity_const.py b/scripts/own/eval_single_similarity_const.py index c65f825..29ef9c0 100644 --- a/scripts/own/eval_single_similarity_const.py +++ b/scripts/own/eval_single_similarity_const.py @@ -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) diff --git a/scripts/own/eval_triplet_similarities_const.py b/scripts/own/eval_triplet_similarities_const.py index cf5912d..125909a 100644 --- a/scripts/own/eval_triplet_similarities_const.py +++ b/scripts/own/eval_triplet_similarities_const.py @@ -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)