python场景分割_快速场景理解(分割/实例分割/单图像深度估计)

Fast Scene Understanding

Torch implementation for simultaneous image segmentation, instance segmentation and single image depth. Two videos can be found here and here.

Example:

If you use this code for your research, please cite our papers:

and

Setup

Prerequisites

Torch dependencies:

CUDA + cuDNN enabled GPU

Data dependencies:

Download Cityscapes and run the script createTrainIdLabelImgs.py and createTrainIdInstanceImgs.py to create annotations based on the training labels. Make sure that the folder is named cityscapes

Afterwards create following txt files:

cd CITYSCAPES_FOLDER

ls leftImg8bit/train/*/*.png > trainImages.txt

ls leftImg8bit/val/*/*.png > valImages.txt

ls gtFine/train/*/*labelTrainIds.png > trainLabels.txt

ls gtFine/val/*/*labelTrainIds.png.png > valLabels.txt

ls gtFine/train/*/*instanceTrainIds.png > trainInstances.txt

ls gtFine/val/*/*instanceTrainIds.png.png > valInstances.txt

ls disparity/train/*/*.png > trainDepth.txt

ls disparity/val/*/*.png.png > valDepth.txt

Download pretrained model

To download both the pretrained segmentation model for training and a trained model for testing, run:

sh download.sh

Test pretrained model

To test the pretrained model, make sure you downloaded both the pretrained model and the Cityscapes dataset (+ scripts and txt files, see above). After, run:

qlua test.lua -data_root CITYSCAPES_ROOT with CITYSCAPES_ROOT the folder where cityscapes is located. For other options, see test_opts.lua

Train your own model

To train your own model, run:

qlua main.lua -data_root CITYSCAPES_ROOT -save true -directory PATH_TO_SAVE

For other options, see opts.lua

Tensorflow code

A third party tensorflow implementation of our loss function applied to lane instance segmentation is available from Hanqiu Jiang's github repository.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值