集約LiDARとカメラシーケンス
2 分
集約はタスク定義/アノテーション指示に移行されます。 kognic io v2 9 0以降、集約シーンのサポートが変更されます。 アノテーション指示(旧タスク定義)では、シーン自体が集約lidarとカメラシーケンスでなくても、集約ビューを使用したアノテーションを要求できるようになりました。 このようなケースでは、標準のlidarとカメラシーケンスシーンを使用できるようにしたため、以下に記載されている集約lidarとカメラシーケンスシーンを個 別に作成する必要がなくなりました。 このアプローチにより、1つのlidarとカメラシーケンスシーンを、集約またはシーケンシャルのセットアップを組み合わせて、オプションで異なるプレアノテ ーションを使用しながら、複数回アノテーションすることが可能になります。 この作業方法の詳細については、kognicまでお問い合わせください。 aggregatedlidarsandcamerasseq シーンは、カメラ画像とlidar点群のシーケンスで構成され、各フレームには1〜12枚のカメラ画像と1〜20個の点群が含まれます(点群を事前に集約している場合、最初のフレームに1〜20個の点群が含まれ、その他のフレームには点群が0個になります)。 aggregatedlidarsandcamerasseq が lidarsandcamerasseq と異なる点は、アノテーション中に点群が時間的に集約され、最初のフレームの座標系における1つの大きな点群が生成されることです。そのため、このタイプのシーンでは自車両モーションデータが必須です。 aggregatedlidarsandcamerasseq オブジェクトの各フィールドの詳細については、 docid\ m9gj 7ge3m0jf7hvlohj2 の関連セクションをご覧ください。 使用する座標系の詳細については、 docid 3jkwdhqcmvnvbuzbouzmr を参照してください。 from future import absolute import from datetime import datetime from typing import optional from uuid import uuid4 import kognic io model scene aggregated lidars and cameras seq as alcsm from examples calibration calibration import create sensor calibration from kognic io client import kognicioclient from kognic io logger import setup logging from kognic io model import createsceneresponse, egovehiclepose, image, pointcloud, position, rotationquaternion def run(client kognicioclient, dryrun bool = true, kwargs) > optional\[createsceneresponse] print("creating lidar and camera sequence scene ") lidar sensor1 = "lidar" cam sensor1 = "rfc01" cam sensor2 = "rfc02" metadata = {"location lat" 27 986065, "location long" 86 922623, "vehicle id" "abg"} \# create calibration \# (please refer to the api documentation about calibration for more details) calibration spec = create sensor calibration( f"collection {datetime now()}", \[lidar sensor1], \[cam sensor1, cam sensor2], ) created calibration = client calibration create calibration(calibration spec) scene = alcsm aggregatedlidarsandcamerassequence( external id=f"aggregated lcs full example {uuid4()}", frames=\[ alcsm frame( frame id="1", relative timestamp=0, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl01 las", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc01 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc02 jpg", sensor name=cam sensor2, ), ], metadata={"dut status" "active"}, ego vehicle pose=egovehiclepose( position=position(x=1 0, y=1 0, z=1 0), rotation=rotationquaternion(w=0 01, x=1 01, y=1 01, z=1 01), ), ), alcsm frame( frame id="2", relative timestamp=500, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl02 las", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc11 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc12 jpg", sensor name=cam sensor2, ), ], ego vehicle pose=egovehiclepose( position=position(x=2 0, y=2 0, z=2 0), rotation=rotationquaternion(w=0 01, x=2 01, y=2 01, z=2 01), ), ), alcsm frame( frame id="3", relative timestamp=1000, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl02 csv", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc11 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc12 jpg", sensor name=cam sensor2, ), ], ego vehicle pose=egovehiclepose( position=position(x=3 0, y=3 0, z=3 0), rotation=rotationquaternion(w=0 01, x=2 01, y=2 01, z=2 01), ), ), ], calibration id=created calibration id, metadata=metadata, ) \# create scene return client aggregated lidars and cameras seq create(scene, dryrun=dryrun, kwargs) if name == " main " setup logging(level="info") client = kognicioclient() \# project available via `client project get projects()` project = "\<project identifier>" run(client, project=project) dryrunを使用してシーンを検証 メソッド呼び出しで dryrun パラメータをtrueに設定すると、apiを使用してシーンが検証されますが、実際には作成されません。 キャリブレーションの再利用 可能であれば、複数のシーンで同じキャリブレーションを再利用できますし、再利用すべきです。

