Skip to content

Commit 678192c

Browse files
committed
Small changes
1 parent d36a521 commit 678192c

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

evaluation/traffic_lights/main.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ def create_tests(num_tests, collect, experiments):
4242
destination_path = join(exp, "test_case_" + str(time()))
4343
if not exists(destination_path):
4444
mkdir(destination_path)
45-
test_case_dir = join(destination_path, "\\test_case")
45+
test_case_dir = join(destination_path, "test_case")
4646
if not exists(test_case_dir):
4747
mkdir(test_case_dir)
4848
if exp != "default":
4949
image_dir = join(destination_path, "images")
5050
if not exists(image_dir):
5151
mkdir(image_dir)
52-
move(str(dbe), join(getcwd(), test_case_dir))
53-
move(str(dbc), join(getcwd(), test_case_dir))
52+
move(str(dbe), join(getcwd(), test_case_dir, str(dbe).split("\\")[-1]))
53+
move(str(dbc), join(getcwd(), test_case_dir, str(dbc).split("\\")[-1]))
5454
if collect:
5555
collect_images(destination_path)
5656

@@ -129,7 +129,6 @@ def collect_images(destination_path, min_distance=None, max_distance=None):
129129

130130
# Angle between ego-car direction vector and traffic light.
131131
angle = get_angle(traffic_light_pos, p0, p1)
132-
print(distance_light, angle, label)
133132
if min_distance <= distance_light <= max_distance \
134133
and (0 <= angle <= fov / 2 or 360 - fov / 2 <= angle <= 360) and label is not None:
135134
# Is distance between ego-car and traffic light within the allowed range, the traffic light in the
@@ -375,9 +374,7 @@ def plot_confusion_matrix(prediction, expectation, experiment_name, save_path):
375374
experiment_names = ["15m", "45m", "cloudy", "daylight", "nighttime", "random"]
376375
# create_tests(1, True, experiment_names)
377376
for experiment in experiment_names:
378-
if experiment != "random":
379-
continue
380-
# collect_images_existing_tests(join(experiment, "test_case_*"))
377+
#collect_images_existing_tests(join(experiment, "test_case_*"))
381378
predict_all_images(join(experiment, "test_case_*"))
382379

383380
"""Example of how to generate a confusion matrix. You need to check manually, which test cases should have passed

0 commit comments

Comments
 (0)