TrackR-CNN初探

TrackR-CNN(一) 项目及数据集

项目概述

论文:MOTS:Multi-Object Tracking and Segmentation

GIthub源码:TrackR-CNN

MOTS数据可视化工具Github:MOTS_Tools

项目主页:https://www.vision.rwth-aachen.de/page/mots

CVPR2020挑战赛: CVPR2020 Workshop

Github 解析

数据集解析

文件目录

data/
- KITTI_MOTS/
-- train/
--- images/
---- 0000/
----- 000000.png
----- 000001.png
----- ...
---- 0001/
---- ...
--- instances/
---- 0000/
----- 000000.png
----- 000001.png
----- ...
---- 0001/
---- ...
models/
- conv3d_sep2/
-- conv3d_sep2-00000005.data-00000-of-00001
-- conv3d_sep2-00000005.index
-- conv3d_sep2-00000005.meta
- converted.data-00000-of-00001
- converted.meta
- converted.index 
...
main.py

注释格式

我们提供了两种替代的等效格式,一种编码为png图像,另一种编码为txt文件。txt文件较小,并且读取速度更快,但是需要使用cocotools来解码掩码。有关读取注释的代码,请参见mots_tools / blob / master /mots_common / io.py

请注意,在两种格式中,id值10,000都表示忽略区域,而0是背景。类ID可以通过对象ID的下限除以1000(class_id = obj_id // 1000)获得,实例ID可以通过对象id取余1000(instance_id = obj_id%1000)获得。对象ID在一段时间内保持一致。

类ID如下 汽车1 行人2

png 格式 instance.png

The png format has a single color channel with 16 bits and can for example be read like this:

import PIL.Image as Image
img = np.array(Image.open("000005.png"))
obj_ids = np.unique(img)
# to correctly interpret the id of a single object
obj_id = obj_ids[0]
class_id = obj_id // 1000
obj_instance_id = obj_id % 1000

When using a TensorFlow input pipeline for reading the annotations, you can use

ann_data = tf.read_file(ann_filename)
ann = tf.image.decode_image(ann_data, dtype=tf.uint16, channels=1)

示例

问题

1、No module named 'pycocotools'
Mask_RCNN需要 coco库
解决:
clone https://github.com/waleedka/coco
cd coco/PythonAPI
修改makefile

all:
    # install pycocotools locally
    /home/cnsatm/anaconda3/envs/XCY/bin/python setup.py build_ext --inplace
    rm -rf build

install:
    # install pycocotools to the Python site-packages
    /home/cnsatm/anaconda3/envs/XCY/bin/python setup.py build_ext install
    rm -rf build

make
sudo make install
sudo python setup.py install (此步出错则改为所在anaconda的python)

猜你喜欢

转载自www.cnblogs.com/Caiyi-Xu/p/12513534.html
CNN