Browse Source

Minor fix

v1
Teoge 5 years ago
parent
commit
4b6a1c2218
3 changed files with 4 additions and 2 deletions
  1. +1
    -1
      README.md
  2. +1
    -0
      config.py
  3. +2
    -1
      evaluate.py

+ 1
- 1
README.md 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.

+ 1
- 0
config.py 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',

+ 2
- 1
evaluate.py 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

Loading…
Cancel
Save