Skip to content

Commit

Permalink
Merge branch 'main' into feat/fastlabel_api
Browse files Browse the repository at this point in the history
# Conflicts:
#	poetry.lock
#	pyproject.toml
  • Loading branch information
miursh committed Nov 27, 2024
2 parents 8a44bb9 + f679586 commit 90344f7
Show file tree
Hide file tree
Showing 24 changed files with 2,219 additions and 309 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
run: |
apt update -yqq
apt install -yqq curl python3-venv python-is-python3 \
libgl1-mesa-dev ros-${ROS_DISTRO}-sensor-msgs-py ros-${ROS_DISTRO}-rosbag2-storage-mcap \
unzip tree
libgl1-mesa-dev libboost-dev ros-${ROS_DISTRO}-sensor-msgs-py ros-${ROS_DISTRO}-rosbag2-storage-mcap \
ros-${ROS_DISTRO}-radar-msgs unzip tree
- name: Download test data
uses: actions/download-artifact@v3
Expand All @@ -72,16 +72,9 @@ jobs:
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: autoware_auto_perception_msgs autoware_perception_msgs tier4_perception_msgs
target-packages: autoware_auto_perception_msgs autoware_perception_msgs tier4_perception_msgs oxts_msgs vehicle_msgs
build-depends-repos: build_depends.repos

- name: Install dependencies
run: |
apt update -yqq
apt install -yqq curl python3-venv python-is-python3 \
libgl1-mesa-dev ros-${ROS_DISTRO}-sensor-msgs-py \
ros-humble-radar-msgs
- name: Check python version
run: |
python -V
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ These tools facilitate the preparation and transformation of perception data for

## Table of Contents

1. [Dataset Overview](#dataset-overview)
2. [Usage of T4 dataset](#usage-of-t4-format-dataset)
3. [Usage of Conversion Tools](#usage-of-conversion-tools)
- [Conversion Tools Overview](#conversion-tools-overview)
- [Setup](#setup)
- [Test](#test)
- [Pre Commit](#pre-commit)
- [TIER IV Perception Dataset Conversion Tools](#tier-iv-perception-dataset-conversion-tools)
- [Table of Contents](#table-of-contents)
- [Dataset Overview](#dataset-overview)
- [Usage of T4 format dataset](#usage-of-t4-format-dataset)
- [Usage of Conversion Tools](#usage-of-conversion-tools)
- [Conversion Tools Overview](#conversion-tools-overview)
- [Setup](#setup)
- [Test](#test)
- [Download test data](#download-test-data)
- [Run tests](#run-tests)
- [Pre commit](#pre-commit)

## Dataset Overview

Expand Down Expand Up @@ -45,7 +49,7 @@ source /opt/ros/${ROS_DISTRO}/setup.sh
sudo apt install -y ros-${ROS_DISTRO}-sensor-msgs-py ros-${ROS_DISTRO}-rosbag2-storage-mcap ros-${ROS_DISTRO}-radar-msgs

mkdir src -p && vcs import src < build_depends.repos
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to autoware_auto_perception_msgs autoware_perception_msgs tier4_perception_msgs
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to autoware_auto_perception_msgs autoware_perception_msgs tier4_perception_msgs oxts_msgs vehicle_msgs
source ./install/setup.bash
```

Expand Down
14 changes: 14 additions & 0 deletions build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,17 @@ repositories:
type: git
url: https://github.com/tier4/autoware_auto_msgs.git
version: tier4/main

# for Co-MLOps features
oxts_ros2_driver:
type: git
url: https://github.com/tier4/oxts_ros2_driver.git
version: feat/data_recording_system
pacmod3_msgs:
type: git
url: https://github.com/astuff/pacmod3_msgs.git
version: 1.0.0
pacmod_interface:
type: git
url: https://github.com/tier4/pacmod_interface.git
version: feat/comlops_drs
36 changes: 36 additions & 0 deletions config/convert_comlops_rosbag2_to_non_annotated_t4_sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
task: convert_rosbag2_to_non_annotated_t4
description:
scene: ""
conversion:
input_base: ./data/rosbag2
output_base: ./data/non_annotated_t4_format
world_frame_id: "map"
start_timestamp_sec: 0 # Enter here if there is a timestamp for the start time. If not used, enter 0.
skip_timestamp: 2.0 # Do not load data for the first point cloud timestamp for skip_timestamp seconds.
num_load_frames: 0 # Maximum number of frames to save as t4 data. Set to 0 to automatically set it based on the number of lidar topics.
accept_frame_drop: False # If true, the conversion will continue even if the LiDAR frame is dropped.
with_ins: true # whether to use INS messages as a ego state instead of `/tf`
with_vehicle_status: true # whether to generate `vehicle_state.json`
# The following configuration is generally not modified unless there are changes to the vehicle sensor configuration.
lidar_sensor:
topic: /sensing/lidar/concatenated/pointcloud
channel: LIDAR_CONCAT
camera_sensors: # Keep the same order as each camera exposure timing
- topic: /sensing/camera/camera3/image_raw/compressed
channel: CAM_BACK_LEFT
delay_msec: 48.33
- topic: /sensing/camera/camera2/image_raw/compressed
channel: CAM_FRONT_LEFT
delay_msec: 65.0
- topic: /sensing/camera/camera0/image_raw/compressed
channel: CAM_FRONT
delay_msec: 81.67
- topic: /sensing/camera/camera4/image_raw/compressed
channel: CAM_FRONT_RIGHT
delay_msec: 98.33
- topic: /sensing/camera/camera5/image_raw/compressed
channel: CAM_BACK_RIGHT
delay_msec: 115.0
- topic: /sensing/camera/camera1/image_raw/compressed
channel: CAM_BACK
delay_msec: 131.67
31 changes: 31 additions & 0 deletions config/convert_deepen_to_t4_segmentation_painting_sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
task: convert_deepen_to_t4
description:
visibility:
full: "No occlusion of the object."
most: "Object is occluded, but by less than 50%."
partial: "The object is occluded by more than 50% (but not completely)."
none: "The object is 90-100% occluded and no points/pixels are visible in the label."
camera_index:
CAM_BACK_RIGHT: 0
CAM_BACK: 1
CAM_BACK_LEFT: 2
CAM_FRONT: 3
CAM_FRONT_LEFT: 4
CAM_FRONT_NARROW: 5
CAM_FRONT_RIGHT: 6
CAM_FRONT_WIDE: 7
with_lidar: false
surface_categories: ./config/label/surface.yaml

conversion:
label_info: # for 3D/2D box only annotations, it is OK to skip specifying this field
label_type: 2d_segmentation
label_format: painting
input_base: ./data/non_annotated_dataset
input_anno_file: ./data/deepen_format.zip
input_bag_base: ./data/rosbag2
output_base: ./data/t4_format
topic_list: ./config/topic_list_tlr.yaml
ignore_interpolate_label: True
dataset_corresponding:
Dataset_name: dataset_id_in_Deepen_AI
31 changes: 31 additions & 0 deletions config/convert_deepen_to_t4_segmentation_polygon_sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
task: convert_deepen_to_t4
description:
visibility:
full: "No occlusion of the object."
most: "Object is occluded, but by less than 50%."
partial: "The object is occluded by more than 50% (but not completely)."
none: "The object is 90-100% occluded and no points/pixels are visible in the label."
camera_index:
CAM_BACK_RIGHT: 0
CAM_BACK: 1
CAM_BACK_LEFT: 2
CAM_FRONT: 3
CAM_FRONT_LEFT: 4
CAM_FRONT_NARROW: 5
CAM_FRONT_RIGHT: 6
CAM_FRONT_WIDE: 7
with_lidar: false
surface_categories: ./config/label/surface.yaml

conversion:
label_info: # for 3D/2D box only annotations, it is OK to skip specifying this field
label_type: 2d_segmentation
label_format: polygon
input_base: ./data/non_annotated_t4_format
input_anno_file: ./data/deepen_format/lidar_annotations_accepted_deepen.json
input_bag_base: ./data/rosbag2
output_base: ./data/t4_format
topic_list: ./config/topic_list_sample.yaml
ignore_interpolate_label: True
dataset_corresponding:
Dataset_name: dataset_id_in_Deepen_AI
11 changes: 11 additions & 0 deletions config/label/surface.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Category list of surfaces. Each category does not have "instance ID".
# Reference(TIER IV INTERNAL LINK): https://drive.google.com/file/d/132nKnXc7vq9Bjj0quoXDFGi9q5jtrXuY/view?usp=drive_link
- road
- sidewalk
- building
- wall_fence
- pole
- vegetation_terrain
- sky
- road_paint_lane_solid_white
- road_paint_lane_dash_white
7 changes: 7 additions & 0 deletions perception_dataset/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def main():
)

elif task == "convert_deepen_to_t4":
from perception_dataset.deepen.deepen_annotation import LabelInfo
from perception_dataset.deepen.deepen_to_t4_converter import DeepenToT4Converter

input_base = config_dict["conversion"]["input_base"]
Expand All @@ -164,6 +165,11 @@ def main():
ignore_interpolate_label = config_dict["conversion"]["ignore_interpolate_label"]
with open(topic_list_yaml_path) as f:
topic_list_yaml = yaml.safe_load(f)
label_info = (
LabelInfo(**config_dict["conversion"]["label_info"])
if config_dict["conversion"].get("label_info")
else None
)

converter = DeepenToT4Converter(
input_base=input_base,
Expand All @@ -175,6 +181,7 @@ def main():
input_bag_base=input_bag_base,
topic_list=topic_list_yaml,
ignore_interpolate_label=ignore_interpolate_label,
label_info=label_info,
)

logger.info(f"[BEGIN] Converting Deepen data ({input_base}) to T4 data ({output_base})")
Expand Down
Loading

0 comments on commit 90344f7

Please sign in to comment.