0 sem11-21的提交测试地址
https://competitions.codalab.org/competitions/24025#learn_the_details-evaluation
1 数据集结构,instance是panoptic polarnet预处理脚本生成,用于全景分割的实例分割
2 github code 安装
https://github.com/PRBonn/semantic-kitti-api
conda create --name smekitty python=3.7
pip install -r requeriment.txt
3 可视化GT
python visulize.py --sequence 00 --dataset /mnt/data/1polarnet/1polarcode/Panoptic-PolarNet-main/data
q,n,b,其中00是4000多帧 ls -l | grep “^-” | wc -l
4 可视化预测,其中predictions目录格式如label,unint32前16是实例ID,后16是语义label
label = np.fromfile(filename, dtype=np.uint32)
label = label.reshape((-1))
self.set_label(label)
self.sem_label = label & 0xFFFF # semantic label in lower half,与运算保留低16位,语义标签
self.inst_label = label >> 16 # instance id in upper half,向右移位16,实例标签
each point an unsigned int (32-bit) with the instance and label, which contains in the upper part (16-bits) a class-wise instance id and in the lower part (16-bits) the class
一个label对应一帧,一帧点云平均值10.4万:从11万,49万0001.bin:(118017,4)
20类标签,8类things
./visualize.py --sequence 11 --dataset /mnt/data/1polarnet/1polarcode/Panoptic-PolarNet-main/data --predictions /mnt/data/1polarnet/1polarcode/Panoptic-PolarNet-main/out/SemKITTI/sequences/11/predictions
增加一个维度
points = scan[:, 0:3] # get xyz
核心加载代码
auxiliary/laserscan.py
def open_label(self,filename):
# if all goes well, open label
label = np.fromfile(filename, dtype=np.uint32)
label = label.reshape((-1))
# set it
self.set_label(label)
def set_label(label):
if label.shape[0] == self.points.shape[0]:
self.sem_label = label & 0xFFFF # semantic label in lower half,与运算保留低16位,语义标签
self.inst_label = label >> 16 # instance id in upper half,向右移位16,实例标签
标签映射 project
def do_label_projection(self):
# only map colors to labels that exist
mask = self.proj_idx >= 0
# semantics
self.proj_sem_label[mask] = self.sem_label[self.proj_idx[mask]]
self.proj_sem_color[mask] = self.sem_color_lut[self.sem_label[self.proj_idx[mask]]]
# instances
self.proj_inst_label[mask] = self.inst_label[self.proj_idx[mask]]
self.proj_inst_color[mask] = self.inst_color_lut[self.inst_label[self.proj_idx[mask]]]
# projection color with semantic labels
self.proj_sem_label = np.zeros((self.proj_H, self.proj_W),
dtype=np.int32) # [H,W] label
self.proj_sem_color = np.zeros((self.proj_H, self.proj_W, 3),
dtype=np.float) # [H,W,3] color
# projection color with instance labels
self.proj_inst_label = np.zeros((self.proj_H, self.proj_W),
dtype=np.int32) # [H,W] label
self.proj_inst_color = np.zeros((self.proj_H, self.proj_W, 3),
dtype=np.float) # [H,W,3] color