This software package contain scripts to prepare PandaSet data for semantic segmentation machine task evaluation. 

First download PandaSet dataset from the following webpage and unzip the dataset to folder ./Pandaset
   https://www.kaggle.com/datasets/pz19930809/pandaset


- Prepare dataset
  1. go to prepare_dataset folder

  2. Run the following command to install PandaSet Devkit.
     base install_pandaset.sh. 

  3. Run the following command to compress the ground truth data
     python convert_pkl.py

  4. Run the following command to generate video sequences in YUV 420p 8-bit format. The generated YUV files will be in folder ../Pandaset_YUV. 
     python convert_yuv_all.py

- Encoding using VTM

  1. Configure data directory and VTM directory in the file vtm_encode.py 

  2. Run vtm_encode.sh to encode the PandaSet dataset using VTM


- Evaluation
  1. Run the following command to setup environment. This command will create pandaset environment in conda.
     bash install.sh

  2. Generate ground truth annotation by running the following script. By default the ground truth data are generated in direction ./output/gt_seg_front_camera/
     bash gen_vcm_gt.sh

  3. Store the bitstream and reconstructed video files in folder ./output/<test_id>. Run the following script to generate evaluation results. 
    python eval_semantics_segmentation.py <test_id>

