├── pics ├── label.png ├── dataset5.png └── example.png ├── pano_synthia.py ├── README.md ├── cvt2color.py ├── LICENSE ├── pano_cylindrcal_projection.py └── main.py /pics/label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Francis515/SYNTHIA-PANO/HEAD/pics/label.png -------------------------------------------------------------------------------- /pics/dataset5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Francis515/SYNTHIA-PANO/HEAD/pics/dataset5.png -------------------------------------------------------------------------------- /pics/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Francis515/SYNTHIA-PANO/HEAD/pics/example.png -------------------------------------------------------------------------------- /pano_synthia.py: -------------------------------------------------------------------------------- 1 | from skimage import io 2 | import numpy as np 3 | 4 | #803 5 | def pano_stitch(l,f,r,b,type='train',edge =834): 6 | if not edge%2: 7 | edge=edge+1 8 | img_w = b.shape[1] 9 | half_w = img_w//2 10 | img_h = b.shape[0] 11 | pano_w = edge * 4 12 | pano_h = img_h 13 | if type=='train': 14 | pano = np.zeros((pano_h,pano_w,3)) 15 | else: 16 | pano = np.zeros((pano_h,pano_w)) 17 | pano[:,0:edge]= l[:,half_w-edge//2:half_w+edge//2+1] 18 | pano[:,edge:2*edge]=f[:,half_w-edge//2:half_w+edge//2+1] 19 | pano[:,2*edge:3*edge]=r[:,half_w-edge//2:half_w+edge//2+1] 20 | pano[:,3*edge:4*edge]=b[:,half_w-edge//2:half_w+edge//2+1] 21 | pano = pano.astype(np.uint8) 22 | return pano 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SYNTHIA-PANO 2 | 3 | ## Description 4 | 5 | SYNTHIA-PANO is the panoramic version of SYNTHIA dataset. Five sequences are included: Seqs02-summer, Seqs02-fall, Seqs04-summer, Seqs04-fall and Seqs05-summer. 6 | Panomaramic images with fine annotation for semantic segmentation. 7 | 8 | ![Label](pics/label.png) 9 | ![Examples](pics/dataset5.png) 10 | 11 | Video: 12 | [![Video](https://img.youtube.com/vi/--Mhldpd6nI/0.jpg)](https://youtu.be/--Mhldpd6nI) 13 | 14 | ## Paper 15 | 16 | [SYNTHIA](https://ieeexplore.ieee.org/document/7780721) 17 | 18 | [SYNTHIA-PANO](https://arxiv.org/abs/1909.00532) 19 | 20 | ## Download 21 | [Google Drive Link](https://drive.google.com/drive/folders/1loj19uFyDOQDYI1xwWM6FameR_fUxJnQ?usp=drive_link) 22 | 23 | [Baidu Disk Link](https://pan.baidu.com/s/13f9Xuz8lHUehrPtmvAq3Dw?pwd=af69) code:af69 24 | -------------------------------------------------------------------------------- /cvt2color.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from skimage import io 3 | import cv2 4 | 5 | color_dict_SYN = { 6 | 0:(0,0,0), 7 | 1:(128,128,128), 8 | 2:(128,0,0), 9 | 3:(128,64,128), 10 | 4:(0,0,192), 11 | 5:(64,64,128), 12 | 6:(128,128,0), 13 | 7:(192,192,128), 14 | 8:(64,0,128), 15 | 9:(192,128,128), 16 | 10:(64,64,0), 17 | 11:(0,128,192), 18 | 12:(0,172,0), 19 | 13:(0,0,0), 20 | 14:(0,0,0), 21 | 15:(0,128,128) 22 | } 23 | def cvt2color(img,labels = 22): 24 | img_h,img_w = img.shape[0],img.shape[1] 25 | temp = np.zeros((img_h,img_w,3)) 26 | for x in range(img_w): 27 | for y in range(img_h): 28 | trainId = img[y][x] 29 | if labels==22: 30 | pass 31 | #temp[y][x] = list(trainId2label[trainId].color) 32 | elif labels == 16: 33 | temp[y][x] = color_dict_SYN[int(trainId)] 34 | temp = temp.astype(np.uint8) 35 | return temp 36 | 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Artifidiot 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pano_cylindrcal_projection.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2 3 | #change the parameters to adjust distortion degree and center. 4 | #img: the input image, f: focal length, center_ratio: projection center(W/center_ratio_x, H/center_ratio_y) 5 | def cylind_prj(img, f, center_ratio_x=2, center_ratio_y=2): 6 | img_prj = np.zeros_like(img) 7 | 8 | fx = lambda x:f*np.arctan(x/f) 9 | fy = lambda x,y:y*np.cos(np.arctan(x/f)) 10 | 11 | rows,cols = img.shape[0], img.shape[1] 12 | shift_x = int(cols/center_ratio_x) 13 | shift_y = int(rows/center_ratio_y) 14 | 15 | for oy in range(rows): 16 | for ox in range(cols): 17 | y = oy - shift_y 18 | x = ox - shift_x 19 | y_prj = int(fy(x,y)) +shift_y 20 | x_prj = int(fx(x)) + shift_x 21 | x_img = x + shift_x 22 | y_img = y + shift_y 23 | if x_prj