Skip to content

Commit aa61e42

Browse files
author
spencer@primus
committed
Move around metrics
1 parent 4187a2b commit aa61e42

11 files changed

Lines changed: 1119 additions & 1164 deletions

File tree

avapi/_dataset.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,24 +277,25 @@ def get_objects(
277277
timestamp = self.get_timestamp(frame=frame, sensor=sensor, agent=agent)
278278
if max_occ is not None:
279279
objs = [
280-
obj
281-
for obj in objs
282-
if (obj.occlusion <= max_occ)
283-
or (obj.occlusion == Occlusion.UNKNOWN)
280+
obj
281+
for obj in objs
282+
if (obj.occlusion <= max_occ) or (obj.occlusion == Occlusion.UNKNOWN)
284283
]
285284
if max_dist is not None:
286285
if sensor == "ego":
287286
calib = calibration.Calibration(reference)
288287
else:
289288
calib = self.get_calibration(frame, sensor, agent=agent)
290289
objs = [
291-
obj
292-
for obj in objs
293-
if obj.position.distance(calib.reference) < max_dist
290+
obj for obj in objs if obj.position.distance(calib.reference) < max_dist
294291
]
295-
objs = DataContainer(source_identifier=sensor, frame=frame, timestamp=timestamp, data=objs)
292+
objs = DataContainer(
293+
source_identifier=sensor, frame=frame, timestamp=timestamp, data=objs
294+
)
296295
if in_global:
297-
objs = objs.apply_and_return("change_reference", GlobalOrigin3D, inplace=False)
296+
objs = objs.apply_and_return(
297+
"change_reference", GlobalOrigin3D, inplace=False
298+
)
298299
return objs
299300

300301
def get_objects_global(

avapi/carla/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def get_sensor_file(self, frame, timestamp, sensor, agent, file_type):
277277
def get_sensor_name(self, sensor, agent):
278278
return sensor
279279

280-
def get_agents(self, frame: int):
280+
def get_agents(self, frame: int) -> "DataContainer":
281281
return self._load_agents(frame)
282282

283283
def get_agent(self, frame: int, agent: int):

avapi/evaluation/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from . import metrics
21
from .base import ResultManager
32
from .perception import (
43
get_percep_results_from_folder,
@@ -7,5 +6,3 @@
76
from .prediction import get_predict_results_from_folder
87
from .tracking import get_track_results_from_folder, get_track_results_from_multi_folder
98
from .trades import run_trades
10-
11-

avapi/evaluation/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
from avapi.utils import color_from_object_type, get_indices_filenames_in_folder
1717

1818
from ..visualize import snapshot
19-
from .metrics import precision, recall
19+
20+
21+
# from .metrics.assignment import precision, recall
2022

2123

2224
# =============================================

0 commit comments

Comments
 (0)