-
Notifications
You must be signed in to change notification settings - Fork 119
/
init_cityscapes.sh
37 lines (26 loc) · 1.2 KB
/
init_cityscapes.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
32
33
34
35
36
# Download devkit
git clone https://github.com/mcordts/cityscapesScripts lib/dataset_devkit/cityscapesScripts
# Download coco format anntations
mkdir -p data/cityscapes/annotations
if [ ! -f data/cityscapes/annotations/instancesonly_gtFine_train.json ]; then
curl http://www.yuwenxiong.com/dataset/cityscapes/annotations/instancesonly_gtFine_train.json -o data/cityscapes/annotations/instancesonly_gtFine_train.json
fi
if [ ! -f data/cityscapes/annotations/instancesonly_gtFine_val.json ]; then
curl http://www.yuwenxiong.com/dataset/cityscapes/annotations/instancesonly_gtFine_val.json -o data/cityscapes/annotations/instancesonly_gtFine_val.json
fi
if [ ! -f data/cityscapes/annotations/cityscapes_fine_val.json ]; then
curl http://www.yuwenxiong.com/dataset/cityscapes/annotations/cityscapes_fine_val.json -o data/cityscapes/annotations/cityscapes_fine_val.json
fi
cd data/cityscapes
if [ ! -d images ]; then
mkdir images
cp leftImg8bit/*/*/*.png images
fi
if [ ! -d labels ]; then
mkdir labels
cp gtFine/*/*/*labelTrainIds.png labels
fi
if [ ! -d panoptic ]; then
curl http://www.yuwenxiong.com/dataset/cityscapes/annotations/panoptic.zip -o panoptic.zip
unzip -q panoptic.zip
fi