Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deepen_to_t4): add paint label downloader #107

Open
wants to merge 64 commits into
base: main
Choose a base branch
from

Conversation

nanoshimarobot
Copy link

Description

Add a feature to download 3D semantic painting labels and write them to pcd files located in non_annotated_t4_format.
This feature enables the local storage of annotation information for 3D point clouds.
I used this api for downloading label data.

How to test

test data

  • Any 3D painted deepen dataset
  • non_annotated_t4_format

test command

  • Edit convert_deepen_to_t4_paint_sample.yaml
    Modify input_base and dataset corresponding as necessary.
    image
  • Run
      python3 -m perception_dataset.deepen.download_paint_annotations_to_pcd --config config/convert_deepen_to_t4_paint_sample.yaml

Notes for reviewer

@nanoshimarobot nanoshimarobot requested a review from miursh May 24, 2024 03:33
Copy link
Contributor

@ktro2828 ktro2828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanoshimarobot Thanks for your PR 🚀 I left some comments, please check this out.

ktro2828 and others added 30 commits November 24, 2024 16:02
* fix: remove unexpected normalization

Signed-off-by: ktro2828 <[email protected]>

* refactor: unpack `D` to specific variables

Signed-off-by: ktro2828 <[email protected]>

* fix: stack z values

Signed-off-by: ktro2828 <[email protected]>

* test: add unit testings for `view_points`

Signed-off-by: ktro2828 <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
* update README

Signed-off-by: Shunsuke Miura <[email protected]>

* remove unintended items from calibrated sensor data

Signed-off-by: Shunsuke Miura <[email protected]>

* update ego_pose

Signed-off-by: Shunsuke Miura <[email protected]>

* describe co-mlops format

Signed-off-by: Shunsuke Miura <[email protected]>

* fix typo

Signed-off-by: Shunsuke Miura <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Shunsuke Miura <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…4#132)

* feat: remove `SensorChannel` and replace it with `str`

Signed-off-by: ktro2828 <[email protected]>

* docs: update documents

Signed-off-by: ktro2828 <[email protected]>

* fix: invalid method access

Signed-off-by: ktro2828 <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
Signed-off-by: Shunsuke Miura <[email protected]>
* fix decoding pointcloud2 msg

Signed-off-by: Shunsuke Miura <[email protected]>

* fix comments

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
* fix decoding pointcloud2 msg

Signed-off-by: Shunsuke Miura <[email protected]>

* fix comments

Signed-off-by: Shunsuke Miura <[email protected]>

* support uint8

Signed-off-by: Shunsuke Miura <[email protected]>

* remove ros2-numpy from poetry

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
* update pydantic version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shunsuke Miura <[email protected]>
updates:
- [github.com/igorshubovych/markdownlint-cli: v0.39.0 → v0.41.0](igorshubovych/markdownlint-cli@v0.39.0...v0.41.0)
- [github.com/psf/black: 24.4.2 → 24.8.0](psf/black@24.4.2...24.8.0)
- [github.com/PyCQA/flake8: 7.0.0 → 7.1.1](PyCQA/flake8@7.0.0...7.1.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: kminoda <[email protected]>
Co-authored-by: Kenzo Lobos Tsunekawa <[email protected]>
…n no label on TLR (tier4#140)

* fix init value

Signed-off-by: MasatoSaeki <[email protected]>

* add delay_mseg value

Signed-off-by: MasatoSaeki <[email protected]>

* fix *_base in yaml

Signed-off-by: MasatoSaeki <[email protected]>

* add _convert_image for tlr (closed revert tier4#82)

Signed-off-by: MasatoSaeki <[email protected]>

* add skip method when we do not have label

Signed-off-by: MasatoSaeki <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* delete no necessary parameter  in tlr

Signed-off-by: MasatoSaeki <[email protected]>

* get back path in config

Signed-off-by: MasatoSaeki <[email protected]>

* change the way to initialize delay_msec in camera_sensors

Signed-off-by: MasatoSaeki <[email protected]>

* change comment

Signed-off-by: MasatoSaeki <[email protected]>

* add method if sensormode != no_lidar

Signed-off-by: MasatoSaeki <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix data table

Signed-off-by: MasatoSaeki <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: MasatoSaeki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat(non_annotated_t4_tlr_to_deepen): add conversion tool

Signed-off-by: kminoda <[email protected]>

* update version

Signed-off-by: kminoda <[email protected]>

* remove camera_channels

Signed-off-by: kminoda <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update tests

Signed-off-by: kminoda <[email protected]>

* update test

Signed-off-by: kminoda <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update

Signed-off-by: kminoda <[email protected]>

* dummy fix

Signed-off-by: kminoda <[email protected]>

* dummy commit

Signed-off-by: kminoda <[email protected]>

* update pyproject.toml

Signed-off-by: kminoda <[email protected]>

---------

Signed-off-by: kminoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…er4#146)

* fix: entity path of radar points

Signed-off-by: ktro2828 <[email protected]>

* feat: add support of saving recording result

Signed-off-by: ktro2828 <[email protected]>

* chore: fix rerun version to `0.17.0`

Signed-off-by: ktro2828 <[email protected]>

* feat: update to make directory if the corresponding directory does not exist

Signed-off-by: ktro2828 <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
* fix skip frame logic

Signed-off-by: Shunsuke Miura <[email protected]>

* increment the version number

Signed-off-by: Shunsuke Miura <[email protected]>

* refactor: extract get_camera_token into a separate function

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
* Output topic drop error during initialization

Signed-off-by: Shunsuke Miura <[email protected]>

* Avoid out-of-bounds access in get_lidar_camera_synced_frame_info

Signed-off-by: Shunsuke Miura <[email protected]>

* Enhance image data handling to support CompressedImage format

- Modify _generate_image_data to accept both np.ndarray and CompressedImage types
- Add image_shape parameter to properly set image dimensions
- Ensure correct saving of CompressedImage data

Signed-off-by: Shunsuke Miura <[email protected]>

* add RX2 constants

Signed-off-by: Shunsuke Miura <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Shunsuke Miura <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* chore: delete `t4-devkit`

Signed-off-by: ktro2828 <[email protected]>

* docs: update the documentation link of `t4-devkit`

Signed-off-by: ktro2828 <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
* add deepen import label script

Signed-off-by: Shunsuke Miura <[email protected]>

* fix bug

Signed-off-by: Shunsuke Miura <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused code

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: add upload dataset script

Signed-off-by: Shunsuke Miura <[email protected]>

* formatting

Signed-off-by: Shunsuke Miura <[email protected]>

* fix config yaml

Signed-off-by: Shunsuke Miura <[email protected]>

* add outputting dataset ID list

Signed-off-by: Shunsuke Miura <[email protected]>

* Skip non-zip files when uploading datasets

Signed-off-by: Shunsuke Miura <[email protected]>

* remove unused code

Signed-off-by: Shunsuke Miura <[email protected]>

* add httpx to poetry

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
* docs: add automatic_annotation information

Signed-off-by: Shunsuke Miura <[email protected]>

* fix description for automatic_annotation

Signed-off-by: Shunsuke Miura <[email protected]>

* update the description

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
…ier4#156)

* feat(rosbag2_to_non_annotated_t4): support image undistortion option

Signed-off-by: Shunsuke Miura <[email protected]>

* raise error when the camera_info is not found

Signed-off-by: Shunsuke Miura <[email protected]>

* overwrite distortion coefficient when applying undistortion

Signed-off-by: Shunsuke Miura <[email protected]>

* refactor image undistortion and camera info parsing

Signed-off-by: Shunsuke Miura <[email protected]>

* Fix return logic and error handling

Signed-off-by: Shunsuke Miura <[email protected]>

* Update perception_dataset/rosbag2/rosbag2_to_non_annotated_t4_converter.py

Co-authored-by: kminoda <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
Co-authored-by: kminoda <[email protected]>
* docs: update the description of ego_pose coordinate system

Signed-off-by: Shunsuke Miura <[email protected]>

* update

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
…pport optional lidar index field (tier4#168)

* enhance point_cloud2_to_array to support optional lidar index field

Signed-off-by: Shunsuke Miura <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add type hints

Signed-off-by: Shunsuke Miura <[email protected]>

---------

Signed-off-by: Shunsuke Miura <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…tion (tier4#164)

* TODO: add deepen segmentation conversion

Signed-off-by: ktro2828 <[email protected]>

* feat: add support of converting deepen 2D segmentation annotation

Signed-off-by: ktro2828 <[email protected]>

* chore: update surface labels

Signed-off-by: ktro2828 <[email protected]>

* fix avoid to use `if cam_idx < num_cameras`

Signed-off-by: ktro2828 <[email protected]>

* fix: strip `sensor` instead of `sensor_`

Signed-off-by: ktro2828 <[email protected]>

* chore: update surface.yaml

Signed-off-by: ktro2828 <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: use  field if it has

Signed-off-by: ktro2828 <[email protected]>

* fix: resolve circular import

Signed-off-by: ktro2828 <[email protected]>

* fix: set default of  to

Signed-off-by: ktro2828 <[email protected]>

* fix: update the condition of annotation types

Signed-off-by: ktro2828 <[email protected]>

* Update perception_dataset/deepen/segmentation/painting2d.py

* Update config/label/surface.yaml

* Update config/convert_deepen_to_t4_segmetation_painting_sample.yaml

Co-authored-by: Shintaro Tomie <[email protected]>

* Update config/convert_deepen_to_t4_segmetation_polygon_sample.yaml

Co-authored-by: Shintaro Tomie <[email protected]>

* chore: rename config files

Signed-off-by: ktro2828 <[email protected]>

* feat: update comparing sensor id and camera index

Signed-off-by: ktro2828 <[email protected]>

* feat: update surface labels

Signed-off-by: ktro2828 <[email protected]>

* feat: update comparing sensor index and camera index in painting

Signed-off-by: ktro2828 <[email protected]>

* fix: remove invalid operation

Signed-off-by: ktro2828 <[email protected]>

* Update perception_dataset/deepen/segmentation/polygon2d.py

Co-authored-by: Shintaro Tomie <[email protected]>

* Update perception_dataset/deepen/segmentation/polygon2d.py

Co-authored-by: Shintaro Tomie <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shintaro Tomie <[email protected]>
* feat: update record classes for CoMLOPs format

Signed-off-by: ktro2828 <[email protected]>

* ci: update test depends

Signed-off-by: ktro2828 <[email protected]>

* Update perception_dataset/ros2/oxts_msgs/ins_handler.py

Co-authored-by: Shunsuke Miura <[email protected]>

* feat: update acceleration coordinate system in base_link

Signed-off-by: ktro2828 <[email protected]>

* feat: update handling of velocity/omega/acceleration

Signed-off-by: ktro2828 <[email protected]>

* chore: remove unused tf-transformations

Signed-off-by: ktro2828 <[email protected]>

* ci: update to install pacmod3-msgs

Signed-off-by: ktro2828 <[email protected]>

* ci: update to install libboost-dev

Signed-off-by: ktro2828 <[email protected]>

* feat: set optional values to None by default

Signed-off-by: ktro2828 <[email protected]>

---------

Signed-off-by: ktro2828 <[email protected]>
Co-authored-by: Shunsuke Miura <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants