Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ RUN python3 -m pip --no-cache-dir install \
RUN python3 -m pip install git+https://github.com/tier4/t4-devkit@v0.5.1

# Install autoware-perception-evaluation
RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@9d8c9773d35177bb0b7f2606f429f58a5fb708ca
RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@3c9577dc23fd76a049559b42656ca46c1c32fa66

# Need to dowgrade setuptools to 60.2.0 to fix setup
RUN python3 -m pip --no-cache-dir install \
setuptools==60.2.0 \
transformers==4.51.3 \
polars==1.37.1
polars==1.37.1 \
onnx_graphsurgeon==0.5.8 \
spconv-cu126==2.3.8

# NOTE(knzo25): this patch is needed to use numpy versions over 1.23.5 (version used in mmdet3d 1.4.0)
# It can be safely deleted when mmdet3d updates the numpy version
Expand Down
17 changes: 7 additions & 10 deletions autoware_ml/configs/detection3d/dataset/t4dataset/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"movable_object.barrier": "barrier",
"movable_object.debris": "debris",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.debris": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.trafficcone": "traffic_cone",
"movable_object.traffic_cone": "traffic_cone",
"animal": "animal",
Expand All @@ -113,7 +113,7 @@
# DBv2.0 and DBv3.0
"animal": "animal",
"movable_object.barrier": "barrier",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.pushable_pullable": "barrier",
"movable_object.traffic_cone": "traffic_cone",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
Expand Down Expand Up @@ -143,15 +143,12 @@
"semi_trailer": "trailer",
"tractor_unit": "truck",
"construction_vehicle": "truck",
"traffic_cone": "traffic_cone",
"trafficcone": "traffic_cone",
"barrier": "barrier",
}

class_names = [
"car",
"truck",
"bus",
"bicycle",
"pedestrian",
]
class_names = ["car", "truck", "bus", "bicycle", "pedestrian", "traffic_cone", "barrier"]
num_class = len(class_names)
metainfo = dict(classes=class_names)

Expand Down
11 changes: 8 additions & 3 deletions autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"movable_object.barrier": "barrier",
"movable_object.debris": "debris",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.debris": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.trafficcone": "traffic_cone",
"movable_object.traffic_cone": "traffic_cone",
"animal": "animal",
Expand All @@ -94,7 +94,7 @@
# DBv2.0 and DBv3.0
"animal": "animal",
"movable_object.barrier": "barrier",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.pushable_pullable": "barrier",
"movable_object.traffic_cone": "traffic_cone",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
Expand Down Expand Up @@ -124,6 +124,9 @@
"semi_trailer": "trailer",
"tractor_unit": "truck",
"construction_vehicle": "truck",
"traffic_cone": "traffic_cone",
"trafficcone": "traffic_cone",
"barrier": "barrier",
}

class_names = [
Expand All @@ -132,6 +135,8 @@
"bus",
"bicycle",
"pedestrian",
"traffic_cone",
"barrier",
]
num_class = len(class_names)
metainfo = dict(classes=class_names)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"movable_object.barrier": "barrier",
"movable_object.debris": "debris",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.debris": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.trafficcone": "traffic_cone",
"movable_object.traffic_cone": "traffic_cone",
"animal": "animal",
Expand All @@ -100,7 +100,7 @@
# DBv2.0 and DBv3.0
"animal": "animal",
"movable_object.barrier": "barrier",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.pushable_pullable": "barrier",
"movable_object.traffic_cone": "traffic_cone",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
Expand Down Expand Up @@ -130,14 +130,20 @@
"semi_trailer": "trailer",
"tractor_unit": "truck",
"construction_vehicle": "truck",
"traffic_cone": "traffic_cone",
"trafficcone": "traffic_cone",
"barrier": "barrier",
}


class_names = [
"car",
"truck",
"bus",
"bicycle",
"pedestrian",
"traffic_cone",
"barrier",
]
num_class = len(class_names)
metainfo = dict(classes=class_names)
Expand Down
194 changes: 194 additions & 0 deletions autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
custom_imports = dict(
imports=[
"autoware_ml.detection3d.datasets.t4dataset",
"autoware_ml.detection3d.evaluation.t4metric.t4metric",
"autoware_ml.detection3d.evaluation.t4metric.t4metric_v2",
]
)

# dataset type setting
dataset_type = "T4Dataset"
info_train_file_name = "t4dataset_j6gen2_v2_infos_train.pkl"
info_val_file_name = "t4dataset_j6gen2_v2_infos_val.pkl"
info_test_file_name = "t4dataset_j6gen2_v2_infos_test.pkl"

info_train_statistics_file_name = "t4dataset_j6gen2_v2_statistics_train.parquet"
info_val_statistics_file_name = "t4dataset_j6gen2_v2_statistics_val.parquet"
info_test_statistics_file_name = "t4dataset_j6gen2_v2_statistics_test.parquet"

# dataset scene setting
dataset_version_list = [
"db_j6gen2_v2",
]

dataset_test_groups = {
"j6gen2_v2": ("t4dataset_j6gen2_v2_infos_test.pkl", True),
}

# dataset format setting
data_prefix = dict(
pts="",
CAM_FRONT="",
CAM_FRONT_LEFT="",
CAM_FRONT_RIGHT="",
CAM_BACK="",
CAM_BACK_RIGHT="",
CAM_BACK_LEFT="",
sweeps="",
)
camera_types = {
"CAM_FRONT",
"CAM_FRONT_RIGHT",
"CAM_FRONT_LEFT",
"CAM_BACK",
"CAM_BACK_LEFT",
"CAM_BACK_RIGHT",
}

# class setting
name_mapping = {
# DBv1.0
"vehicle.car": "car",
"vehicle.construction": "truck",
"vehicle.emergency (ambulance & police)": "car",
"vehicle.motorcycle": "bicycle",
"vehicle.trailer": "trailer",
"vehicle.truck": "truck",
"vehicle.bicycle": "bicycle",
"vehicle.bus (bendy & rigid)": "bus",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
"pedestrian.construction_worker": "pedestrian",
"pedestrian.personal_mobility": "pedestrian",
"pedestrian.police_officer": "pedestrian",
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"movable_object.barrier": "barrier",
"movable_object.debris": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.trafficcone": "traffic_cone",
"movable_object.traffic_cone": "traffic_cone",
"animal": "animal",
"static_object.bicycle_rack": "bicycle_rack",
# DBv1.1 and UCv2.0
"car": "car",
"truck": "truck",
"bus": "bus",
"trailer": "trailer",
"motorcycle": "bicycle",
"bicycle": "bicycle",
"police_car": "car",
"pedestrian": "pedestrian",
"police_officer": "pedestrian",
"forklift": "car",
"construction_worker": "pedestrian",
"stroller": "pedestrian",
# DBv2.0 and DBv3.0
"animal": "animal",
"movable_object.barrier": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.traffic_cone": "traffic_cone",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
"pedestrian.construction_worker": "pedestrian",
"pedestrian.personal_mobility": "pedestrian",
"pedestrian.police_officer": "pedestrian",
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"static_object.bicycle rack": "bicycle rack",
"static_object.bollard": "bollard",
"vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car
"vehicle.bicycle": "bicycle",
"vehicle.bus": "bus",
"vehicle.car": "car",
"vehicle.construction": "truck",
"vehicle.fire": "truck",
"vehicle.motorcycle": "bicycle",
"vehicle.police": "car",
"vehicle.trailer": "trailer",
"vehicle.truck": "truck",
# DBv1.3
"ambulance": "car",
"kart": "car",
"wheelchair": "pedestrian",
"personal_mobility": "pedestrian",
"fire_truck": "truck",
"semi_trailer": "trailer",
"tractor_unit": "truck",
"construction_vehicle": "truck",
"traffic_cone": "traffic_cone",
"trafficcone": "traffic_cone",
"barrier": "barrier",
}

class_names = [
"car",
"truck",
"bus",
"bicycle",
"pedestrian",
"traffic_cone",
"barrier",
]
num_class = len(class_names)
metainfo = dict(classes=class_names)

merge_objects = [
("truck", ["truck", "trailer"]),
]
merge_type = "extend_longer" # One of ["extend_longer","union", None]

# visualization
class_colors = {
"car": (30, 144, 255),
"truck": (140, 0, 255),
"construction_vehicle": (255, 255, 0),
"bus": (111, 255, 111),
"trailer": (0, 255, 255),
"barrier": (0, 0, 0),
"motorcycle": (100, 0, 30),
"bicycle": (255, 0, 30),
"pedestrian": (255, 200, 200),
"traffic_cone": (120, 120, 120),
}
camera_panels = [
"data/CAM_FRONT_LEFT",
"data/CAM_FRONT",
"data/CAM_FRONT_RIGHT",
"data/CAM_BACK_LEFT",
"data/CAM_BACK",
"data/CAM_BACK_RIGHT",
]

filter_attributes = [
("vehicle.bicycle", "vehicle_state.parked"),
("vehicle.bicycle", "cycle_state.without_rider"),
("vehicle.bicycle", "motorcycle_state.without_rider"),
("vehicle.motorcycle", "vehicle_state.parked"),
("vehicle.motorcycle", "cycle_state.without_rider"),
("vehicle.motorcycle", "motorcycle_state.without_rider"),
("bicycle", "vehicle_state.parked"),
("bicycle", "cycle_state.without_rider"),
("bicycle", "motorcycle_state.without_rider"),
("motorcycle", "vehicle_state.parked"),
("motorcycle", "cycle_state.without_rider"),
("motorcycle", "motorcycle_state.without_rider"),
]

evaluator_metric_configs = dict(
evaluation_task="detection",
target_labels=class_names,
center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0],
# plane_distance_thresholds is required for the pass fail evaluation
plane_distance_thresholds=[2.0, 4.0],
iou_2d_thresholds=None,
iou_3d_thresholds=None,
label_prefix="autoware",
# bev minimum distance ranges for each range bucket, must be the same length as max_distance,
# they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering
min_distance=[0.0, 50.0, 90.0, 0.0],
# bev maximum distance ranges for each range bucket, must be the same length as min_distance
max_distance=[50.0, 90.0, 121.0, 121.0],
min_point_numbers=0,
matching_class_agnostic_fps=False,
)
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"pedestrian.stroller": "pedestrian",
"pedestrian.wheelchair": "pedestrian",
"movable_object.barrier": "barrier",
"movable_object.debris": "debris",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.debris": "barrier",
"movable_object.pushable_pullable": "barrier",
"movable_object.trafficcone": "traffic_cone",
"movable_object.traffic_cone": "traffic_cone",
"animal": "animal",
Expand All @@ -90,7 +90,7 @@
# DBv2.0 and DBv3.0
"animal": "animal",
"movable_object.barrier": "barrier",
"movable_object.pushable_pullable": "pushable_pullable",
"movable_object.pushable_pullable": "barrier",
"movable_object.traffic_cone": "traffic_cone",
"pedestrian.adult": "pedestrian",
"pedestrian.child": "pedestrian",
Expand Down Expand Up @@ -120,6 +120,9 @@
"semi_trailer": "trailer",
"tractor_unit": "truck",
"construction_vehicle": "truck",
"traffic_cone": "traffic_cone",
"trafficcone": "traffic_cone",
"barrier": "barrier",
}

class_names = [
Expand All @@ -128,7 +131,10 @@
"bus",
"bicycle",
"pedestrian",
"traffic_cone",
"barrier",
]

num_class = len(class_names)
metainfo = dict(classes=class_names)

Expand Down
Loading