-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path0_nuscenes_to_coco.sh
31 lines (24 loc) · 1.06 KB
/
0_nuscenes_to_coco.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Convert the Nuscenes dataset to COCO format
# DO NOT EDIT THE NEXT TWO LINES
CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ROOT_DIR="$(dirname "$CUR_DIR")"
##------------------------------------------------------------------------------
## Modify these parameters as needed
NUSC_SPLIT='mini_val'
NUM_RADAR_SWEEPS=1 # number of Radar sweeps
USE_SYMLINKS='True' # use symlinks instead of copying nuScenes images
##------------------------------------------------------------------------------
NUSC_DIR="$ROOT_DIR/data/nuscenes"
OUT_DIR="$ROOT_DIR/data/nucoco"
# create symbolic link to the nucoco dataset for Detectron
ln -s $ROOT_DIR/data/nucoco $ROOT_DIR/detectron/detectron/datasets/data/nucoco
echo "INFO: Converting nuScenes to COCO format..."
cd $ROOT_DIR/tools
python nuscenes_to_coco.py \
--nusc_root $NUSC_DIR \
--split $NUSC_SPLIT \
--out_dir $OUT_DIR \
--nsweeps_radar $NUM_RADAR_SWEEPS \
--use_symlinks $USE_SYMLINKS \
echo "INFO: Done!"
echo "-------------------------------------------------------------------------"