-
Notifications
You must be signed in to change notification settings - Fork 9
/
init_coco.sh
27 lines (24 loc) · 1.95 KB
/
init_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
python init_coco.py
sed -i 's/semantic = np.zeros(pan.shape, dtype=np.uint8)/semantic = np.ones(pan.shape, dtype=np.uint8) * 255/g' tools/panopticapi/converters/panoptic2semantic_segmentation.py
PYTHONPATH=$(pwd)/tools:$(pwd)/tools/panopticapi:$PYTHONPATH python tools/panopticapi/converters/panoptic2semantic_segmentation.py \
--input_json_file data/coco/annotations/panoptic_train2017_stff.json \
--segmentations_folder data/coco/annotations/panoptic_train2017 \
--semantic_seg_folder data/coco/annotations/panoptic_train2017_semantic_trainid_stff \
--categories_json_file data/coco/annotations/panoptic_coco_categories_stff.json
PYTHONPATH=$(pwd)/tools:$(pwd)/tools/panopticapi:$PYTHONPATH python tools/panopticapi/converters/panoptic2semantic_segmentation.py \
--input_json_file data/coco/annotations/panoptic_val2017_stff.json \
--segmentations_folder data/coco/annotations/panoptic_val2017 \
--semantic_seg_folder data/coco/annotations/panoptic_val2017_semantic_trainid_stff \
--categories_json_file data/coco/annotations/panoptic_coco_categories_stff.json
PYTHONPATH=$(pwd)/tools/panopticapi:$PYTHONPATH python tools/panopticapi/converters/panoptic2detection_coco_format.py \
--input_json_file data/coco/annotations/panoptic_train2017_stff.json \
--segmentations_folder data/coco/annotations/panoptic_train2017 \
--output_json_file data/coco/annotations/panoptic_instances_train2017.json \
--categories_json_file data/coco/annotations/panoptic_coco_categories_stff.json \
--things_only
PYTHONPATH=$(pwd)/tools/panopticapi:$PYTHONPATH python tools/panopticapi/converters/panoptic2detection_coco_format.py \
--input_json_file data/coco/annotations/panoptic_val2017_stff.json \
--segmentations_folder data/coco/annotations/panoptic_val2017 \
--output_json_file data/coco/annotations/panoptic_instances_val2017.json \
--categories_json_file data/coco/annotations/panoptic_coco_categories_stff.json \
--things_only