ZODデータのアップロード
2 分
このチュートリアルでは、 https //zod zenseact com/ を使用してさまざまな https //app archbee com/docs/kho76sqg1b32gfqam4w9n/m9gj 7ge3m0jf7hvlohj2#sdvek をアップロードする手順を説明します。このページの目的は、録画をkognicシーンに変換するために必要な手順をいくつか示すことです。 前提条件と依存関係 1 このガイドに沿って進めるには、 https //zod zenseact com/download/ からデータをダウンロードする必要があります。データは以下のように構成されている必要があります zod ├── sequences │ ├── 000000 │ ├── 000002 │ ├── └── trainval sequences mini json 2 また、データを読み込むためのいくつかの抽象化を提供するzod pythonパッケージをpypiからインストールする必要があります pip install zod 3 kognicアカウントと、kognicのpythonクライアントがインストールされている必要があります。まだ完了していない場合は、 https //docs kognic com/api guide ガイドをお読みください。 このガイドでは、このページのすべてのスニペットの完全なソースファイルを含む https //github com/annotell/kognic io examples python/blob/30c725ad38a1e5a163c28f10163022d4d522acc8/examples/zod のサンプルコードを使用して、zodデータを使用したシーンのアップロードプロセスを説明します。データが利用可能でkognic認証が設定されている場合、サンプルは実行可能です。 our example code initialises a kognic io client at the top level, then creates the scene from zod data for (potentially) multiple scenes at once using a function if name == " main " client = kognicioclient() upload cameras sequence scenes( zod path=path("/path/to/zod"), # change me zod version="mini", client=client, max nr scenes=1, max nr frames=10, dryrun=false, ) this example follows the same broad structure as the cameras only sequence with the addition of a lidar sensor a docid 40ujebw5cst4e4djxsgty , to allow projection between 2d and 3d docid 3jkwdhqcmvnvbuzbouzmr conversion of point clouds from zod's packed numpy arrays conversion of ego poses for each frame as before we initialise a kognic io client at the top level, then create the scene from zod data for (potentially) multiple scenes at once using a function この例は、lidarとカメラのシーケンス例と同じ構造に従っています。 https //app archbee com/docs/kho76sqg1b32gfqam4w9n/l tirodksb1ih5y5cth9z は、lidarデータがフレーム全体にわたって単一のポイントクラウドに集約される、lidar+カメラシーケンスシーンの特殊なケースです。これにより、すべてのフレームにわたってシーン全体を表す密な静的ポイントクラウドが得られます。 集約シーンは、すべてのフレームにポイントクラウドを提供してkognicプラットフォームに集約を処理させることで作成できます。または、最初のフレームにポイントクラウドを指定し、その後のフレームには何も指定しないことで、事前集約してアップロードすることもできます。 zodデータの場合、フレームごとのポイントクラウドのみが利用可能なため、サンプルではすべてのフレームにポイントクラウドをアップロードし、集約をプラットフォームに委ねます。そのため、以下の点を除いて、lidar+カメラシーケンスの例と非常に似ています 1 シーンタイプが異なります:lidarsandcamerassequenceの代わりにaggregatedlidarsandcamerassequenceを使用します。 def convert scene(zod sequence zodsequence, external id str, max nr frames int) > aggregatedlidarsandcamerassequence frames = convert frames(zod sequence, max nr frames) return aggregatedlidarsandcamerassequence(external id=external id, frames=frames, calibration id="\<to be set later>") 2\ フレーム は集約シーン固有のタイプです。 frames append( alcsframe( relative timestamp=ns to ms(frame ts ns) start ts ms, frame id=str(frame ts ns), images=\[convert zod camera frame to image(camera frame)], point clouds=\[point cloud], ego vehicle pose=convert to ego vehicle pose(ego pose), unix timestamp=frame ts ns, ) ) 3\ ego poseデータが必須です。 それ以外の点では、2つのアプローチは非常に似ています。 lidars and cameras sequence タブを参照してください。
