Minor fix

This commit is contained in:
Teoge 2019-07-05 12:16:44 +08:00
parent 96ba10819c
commit 4b6a1c2218
3 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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',

View File

@ -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