Dataset/Argoverse2 dataset

Argoverse2 Motion Forecasting

Shy_un 2023. 8. 16. 11:43

https://www.argoverse.org/av2.html

 

Argoverse 2

Public datasets supported by highly detailed maps to test, experiment, and teach self-driving vehicles how to understand the world around them.

www.argoverse.org

https://github.com/argoverse/av2-api

 

GitHub - argoverse/av2-api: Argoverse 2: Next generation datasets for self-driving perception and forecasting.

Argoverse 2: Next generation datasets for self-driving perception and forecasting. - GitHub - argoverse/av2-api: Argoverse 2: Next generation datasets for self-driving perception and forecasting.

github.com

 

Dataset File은 11초 시나리오로 구성되어 있다.

HD map data : 도로 정보(차선 위치, 방향, 종류 등)

lanes, crosswalks, driveable area 로 분류

track data : 객체 정보(객체 종류, 위치, 방향, 속도 등)

 

HD map data는 json 파일로 되어있어 바로 확인이 가능하지만,

track data와 같은 경우 PARQUET 파일로 되어있어 변환이 필요하다.

 

  • read .parquet file and save .csv
#parquet2csv.py
import pandas as pd
import argparse

parser = argparse.ArgumentParser()

parser.add_argument('--dir', required=True, help='dir address') #C/.../file.parquet
parser.add_argument('--out', required=True, help='out address') #C/.../out.csv

args = parser.parse_args()

df = pd.read_parquet(args.dir, engine='pyarrow')
df.to_csv(args.out, index=False)
#터미널 실행
python parquet2csv.py --dir [parquet file경로.parquet] --out [out file경로.csv]

track에 대한 정보를 csv형태로 저장하여 볼 수 있다.

 

  • av2.api visualize

argoverse2 api를 다운받으면 tutorials 폴더 안에 visualize code가 있다.(generate_forecasting_scenario_visualizations.py)

python generate_forecasting_scenario_visualizations.py --argoverse-scenario-dir [scenario dir] --viz-output-dir [out dir]

위 코드를 실행하면 시나리오에 해당하는 데이터 동영상이 생성된다.