From 4b6a1c2218bcc7adc1944eeaa191bfa85b8e0867 Mon Sep 17 00:00:00 2001 From: Teoge Date: Fri, 5 Jul 2019 12:16:44 +0800 Subject: [PATCH] Minor fix --- README.md | 2 +- config.py | 1 + evaluate.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d36f01..ae44110 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ View `config.py` for more argument details (batch size, learning rate, etc). * Evaluate parking-slot detection ```(shell) - python evaluate.py --label_directory $LABEL_DIRECTORY --image_directory $IMAGE_DIRECTORY --detector_weights $DETECTOR_WEIGHTS + python ps_evaluate.py --label_directory $LABEL_DIRECTORY --image_directory $IMAGE_DIRECTORY --detector_weights $DETECTOR_WEIGHTS ``` `LABEL_DIRECTORY` is the directory containing testing json labels. diff --git a/config.py b/config.py index 1c58571..712def7 100644 --- a/config.py +++ b/config.py @@ -33,6 +33,7 @@ SLOT_SUPPRESSION_DOT_PRODUCT_THRESH = 0.8 # precision = 0.995585, recall = 0.995805 CONFID_THRESH_FOR_POINT = 0.11676871 + def add_common_arguments(parser): """Add common arguments for training and inference.""" parser.add_argument('--detector_weights', diff --git a/evaluate.py b/evaluate.py index 53eafc6..3f4f14f 100644 --- a/evaluate.py +++ b/evaluate.py @@ -34,7 +34,8 @@ def collect_error(ground_truths, predictions, thresh): if idx >= 0: detected_point = predictions[idx][1] dists.append(calc_point_squre_dist(detected_point, ground_truth)) - angles.append(calc_point_direction_angle(detected_point, ground_truth)) + angles.append(calc_point_direction_angle( + detected_point, ground_truth)) else: continue return dists, angles