一、图像分割类别
随着深度学习的发展,在分割任务中出现了许多优秀的网络。根据实际分割应用任务的不同,可以大致将分割分为三个研究方向:语义分割、实例分割、全景分割。这三种分割在某种意义上是具有一定的联系的。
语义分割:
像素级别的语义分割,对图像中的每个像素都划分出对应的类别,即实现像素级别的分类;
实例分割:
类的具体对象,即为实例,那么实例分割不但要进行像素级别的分类,还需在具体的类别基础上区别开不同的实例。
全景分割
全景分割是语义分割和实例分割的泛化,但引入了新的算法挑战。与语义分割不同,全景分割需要区分单个目标实例; 这对完全卷积网络提出了挑战。与实例分割不同的是,在全景分割中目标分割中必须是非重叠的,这对独立于操作每个目标的基于区域的方法提出了挑战。
考虑到实际的应用研究中,几种类型的分割均有很大的相关性,并且对于语义分割在实际的研究中产出比较多,许多的应用场景也进行了大量的尝试,下面主要介绍关于语义分割的研究情况。
二、CNN图像语义分割基本套路:
1. 下采样+上采样:Convlution + Deconvlution/Resize
2. 多尺度特征融合:特征逐点相加/特征channel维度拼接
3. 获得像素级别的segement map:对每一个像素点进行判断类别
图像的语义分割(Semantic Segmentation)是计算机视觉中非常重要的任务。它的目标是为图像中的每个像素分类。如果能够快速准去地做图像分割,很多问题将会迎刃而解。因此,它的应用领域就包括但不限于:自动驾驶、图像美化、三维重建等等。
语义分割是一个非常困难的问题,尤其是在深度学习之前。深度学习使得图像分割的准确率提高了很多,下面我们就总结一下近年来最具有代表性的方法和论文。
1. Fully Convolutional Networks (FCN)
我们介绍的第一篇论文是Fully Convolutional Networks for Semantic Segmentation,简称FCN。这篇论文是第一篇成功使用深度学习做图像语义分割的论文。论文的主要贡献有两点:
提出了全卷积网络。将全连接网络替换成了卷积网络,使得网络可以接受任意大小的图片,并输出和原图一样大小的分割图。只有这样,才能为每个像素做分类。 使用了反卷积层(Deconvolution)。分类神经网络的特征图一般只有原图的几分之一大小。想要映射回原图大小必须对特征图进行上采样,这就是反卷积层的作用。虽然名字叫反卷积层,但其实它并不是卷积的逆操作,更合适的名字叫做转置卷积(Transposed Convolution),作用是从小的特征图卷出大的特征图。 这是神经网络做语义分割的开山之作,需彻底理解。
2. DeepLab
DeepLab有v1 v2 v3,第一篇名字叫做DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs。这一系列论文引入了以下几点比较重要的方法:
第一个是带洞卷积,英文名叫做Dilated Convolution,或者Atrous Convolution。带洞卷积实际上就是普通的卷积核中间插入了几个洞。它的运算量跟普通卷积保持一样,好处是它的“视野更大了”,比如普通3x3卷积的结果的视野是3x3,插入一个洞之后的视野是5x5。视野变大的作用是,在特征图缩小到同样倍数的情况下可以掌握更多图像的全局信息,这在语义分割中很重要。
3. Pyramid Scene Parsing Network
Pyramid Scene Parsing Network的核心贡献是Global Pyramid Pooling,翻译成中文叫做全局金字塔池化。它将特征图缩放到几个不同的尺寸,使得特征具有更好地全局和多尺度信息,这一点在准确率提升上上非常有用。
4. Mask R-CNN
Mask R-CNN是大神何凯明的力作,将Object Detection与Semantic Segmentation合在了一起做。它的贡献主要是以下几点。
第一,神经网络有了多个分支输出。Mask R-CNN使用类似Faster R-CNN的框架,Faster R-CNN的输出是物体的bounding box和类别,而Mask R-CNN则多了一个分支,用来预测物体的语义分割图。也就是说神经网络同时学习两项任务,可以互相促进。
第二,在语义分割中使用Binary Mask。原来的语义分割预测类别需要使用0 1 2 3 4等数字代表各个类别。在Mask R-CNN中,检测分支会预测类别。这时候分割只需要用0 1预测这个物体的形状面具就行了。
第三,Mask R-CNN提出了RoiAlign用来替换Faster R-CNN中的RoiPooling。RoiPooling的思想是将输入图像中任意一块区域对应到神经网络特征图中的对应区域。RoiPooling使用了化整的近似来寻找对应区域,导致对应关系与实际情况有偏移。这个偏移在分类任务中可以容忍,但对于精细度更高的分割则影响较大。
为了解决这个问题,RoiAlign不再使用化整操作,而是使用线性插值来寻找更精准的对应区域。效果就是可以得到更好地对应。实验也证明了效果不错。下面展示了与之前方法的对比,下面的图是Mask R-CNN,可以看出精细了很多。
5. U-Net
U-Net是原作者参加ISBI Challenge提出的一种分割网络,能够适应很小的训练集(大约30张图)。U-Net与FCN都是很小的分割网络,既没有使用空洞卷积,也没有后接CRF,结构简单。
整个U-Net网络结构类似于一个大大的U字母:首先进行Conv+Pooling下采样;然后Deconv反卷积进行上采样,crop之前的低层feature map,进行融合;然后再次上采样。重复这个过程,直到获得输出388x388x2的feature map,最后经过softmax获得output segment map。总体来说与FCN思路非常类似。
语义分割网络在特征融合时也有2种办法:
FCN式的逐点相加,对应caffe的EltwiseLayer层,对应tensorflow的tf.add()
U-Net式的channel维度拼接融合,对应caffe的ConcatLayer层,对应tensorflow的tf.concat()
三、综述介绍
前端:FCN, SegNet/DeconvNet,DeepLab。当然还有一些其他的结构方法,比如有用RNN来做的,还有更有实际意义的weakly-supervised方法等等。
后端:全连接条件随机场(DenseCRF)、CRFasRNN、马尔科夫随机场(MRF)、高斯条件随机场(G-CRF)等类似有后处理操作。
具体的细节链接如下:https://blog.csdn.net/weixin_41923961/article/details/80946586
图像分割资源总结:
基础学习
1. A 2017 Guide to Semantic Segmentation with Deep Learning 概述——用深度学习做语义分割
- linkhttp://blog.qure.ai/notes/semantic-segmentation-deep-learning-review
- linkhttp://simonduan.site/2017/07/23/notes-semantic-segmentation-deep-learning-review/
2. 从全卷积网络到大型卷积核:深度学习的语义分割全指南
1)linkhttps://www.jiqizhixin.com/articles/2017-07-14-10
3. Fully Convolutional Networks
1)linkhttp://simtalk.cn/2016/11/01/Fully-Convolutional-Networks/
4. 语义分割中的深度学习方法全解:从FCN、SegNet到各代DeepLab
1)linkhttps://zhuanlan.zhihu.com/p/27794982
5. 语义分割实际应用
1)http://blog.geohey.com/ji-suan-ji-shi-jue-zhi-yu-yi-fen-ge/
6. Segmentation Results: VOC2012 PASCAL语义分割比赛排名
1) linkhttp://host.robots.ox.ac.uk:8080/leaderboard/displaylb.php?challengeid=11&compid=6
7. 图像语义分割之FCN和CRF
1) link https://zhuanlan.zhihu.com/p/22308032
强化学习
1. U-Net [https://arxiv.org/pdf/1505.04597.pdf]
2. SegNet [https://arxiv.org/pdf/1511.00561.pdf]
3. DeepLab [https://arxiv.org/pdf/1606.00915.pdf]
4. FCN [https://arxiv.org/pdf/1605.06211.pdf]
5. ENet [https://arxiv.org/pdf/1606.02147.pdf]
6. LinkNet [https://arxiv.org/pdf/1707.03718.pdf]
7. DenseNet [https://arxiv.org/pdf/1608.06993.pdf]
8. Tiramisu [https://arxiv.org/pdf/1611.09326.pdf]
9. DilatedNet [https://arxiv.org/pdf/1511.07122.pdf]
10. PixelNet [https://arxiv.org/pdf/1609.06694.pdf]
11. ICNet [https://arxiv.org/pdf/1704.08545.pdf]
12. ERFNet [http://www.robesafe.uah.es/personal/eduardo.romera/pdfs/Romera17iv.pdf]
13. RefineNet [https://arxiv.org/pdf/1611.06612.pdf]
14. PSPNet [https://arxiv.org/pdf/1612.01105.pdf]
15. CRFasRNN [http://www.robots.ox.ac.uk/~szheng/papers/CRFasRNN.pdf]
16. Dilated convolution [https://arxiv.org/pdf/1511.07122.pdf]
17. DeconvNet [https://arxiv.org/pdf/1505.04366.pdf]
18. FRRN [https://arxiv.org/pdf/1611.08323.pdf]
19. GCN [https://arxiv.org/pdf/1703.02719.pdf]
20. DUC, HDC [https://arxiv.org/pdf/1702.08502.pdf]
21. Segaware [https://arxiv.org/pdf/1708.04607.pdf]
22. Semantic Segmentation using Adversarial Networks [https://arxiv.org/pdf/1611.08408.pdf]
综述资料
1. A Review on Deep Learning Techniques Applied to Semantic Segmentation Alberto Garcia-Garcia, Sergio Orts-Escolano, Sergiu Oprea, Victor Villena-Martinez, Jose Garcia-Rodriguez 2017
[https://arxiv.org/abs/1704.06857]
2. Computer Vision for Autonomous Vehicles: Problems, Datasets and State-of-the-Art
[https://arxiv.org/abs/1704.05519]
3。 基于内容的图像分割方法综述 姜 枫 顾 庆 郝慧珍 李 娜 郭延文 陈道蓄 2017
[http://www.jos.org.cn/ch/reader/create_pdf.aspx?file_no=5136&journal_id=jos]
视频资料
1. CS231n: Convolutional Neural Networks for Visual Recognition Lecture 11 Detection and Segmentation
[http://cs231n.stanford.edu/syllabus.html]
2. Machine Learning for Semantic Segmentation - Basics of Modern Image Analysis
[https://www.youtube.com/watch?v=psLChcm8aiU]
代码资料:
Semantic segmentation
1.U-Net (https://arxiv.org/pdf/1505.04597.pdf)
1. https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/ (Caffe - Matlab)
2. https://github.com/jocicmarko/ultrasound-nerve-segmentation (Keras)
3. https://github.com/EdwardTyantov/ultrasound-nerve-segmentation(Keras)
4. https://github.com/ZFTurbo/ZF_UNET_224_Pretrained_Model (Keras)
5. https://github.com/yihui-he/u-net (Keras)
6. https://github.com/jakeret/tf_unet (Tensorflow)
7. https://github.com/DLTK/DLTK/blob/master/examples/Toy_segmentation/simple_dltk_unet.ipynb (Tensorflow)
8. https://github.com/divamgupta/image-segmentation-keras (Keras)
9. https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch)
10. https://github.com/akirasosa/mobile-semantic-segmentation (Keras)
11. https://github.com/orobix/retina-unet (Keras)
2. SegNet (https://arxiv.org/pdf/1511.00561.pdf)
https://github.com/alexgkendall/caffe-segnet (Caffe)
https://github.com/developmentseed/caffe/tree/segnet-multi-gpu (Caffe)
https://github.com/preddy5/segnet (Keras)
https://github.com/imlab-uiip/keras-segnet (Keras)
https://github.com/andreaazzini/segnet (Tensorflow)
https://github.com/fedor-chervinskii/segnet-torch (Torch)
https://github.com/0bserver07/Keras-SegNet-Basic (Keras)
https://github.com/tkuanlun350/Tensorflow-SegNet (Tensorflow)
https://github.com/divamgupta/image-segmentation-keras (Keras)
https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch)
https://github.com/chainer/chainercv/tree/master/examples/segnet(Chainer)
https://github.com/ykamikawa/keras-SegNet (Keras)
3. DeepLab (https://arxiv.org/pdf/1606.00915.pdf)
https://bitbucket.org/deeplab/deeplab-public/ (Caffe)
https://github.com/cdmh/deeplab-public (Caffe)
https://bitbucket.org/aquariusjay/deeplab-public-ver2 (Caffe)
https://github.com/TheLegendAli/DeepLab-Context (Caffe)
https://github.com/msracver/Deformable-ConvNets/tree/master/deeplab(MXNet)
https://github.com/DrSleep/tensorflow-deeplab-resnet (Tensorflow)
https://github.com/muyang0320/tensorflow-deeplab-resnet-crf(TensorFlow)
https://github.com/isht7/pytorch-deeplab-resnet (PyTorch)
https://github.com/bermanmaxim/jaccardSegment (PyTorch)
https://github.com/martinkersner/train-DeepLab (Caffe)
https://github.com/chenxi116/TF-deeplab (Tensorflow)
4. FCN (https://arxiv.org/pdf/1605.06211.pdf)
https://github.com/vlfeat/matconvnet-fcn (MatConvNet)
https://github.com/shelhamer/fcn.berkeleyvision.org (Caffe)
https://github.com/MarvinTeichmann/tensorflow-fcn (Tensorflow)
https://github.com/aurora95/Keras-FCN (Keras)
https://github.com/mzaradzki/neuralnets/tree/master/vgg_segmentation_keras (Keras)
https://github.com/k3nt0w/FCN_via_keras (Keras)
https://github.com/shekkizh/FCN.tensorflow (Tensorflow)
https://github.com/seewalker/tf-pixelwise (Tensorflow)
https://github.com/divamgupta/image-segmentation-keras (Keras)
https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch)
https://github.com/wkentaro/pytorch-fcn (PyTorch)
https://github.com/wkentaro/fcn (Chainer)
https://github.com/apache/incubator-mxnet/tree/master/example/fcn-xs(MxNet)
https://github.com/muyang0320/tf-fcn (Tensorflow)
https://github.com/ycszen/pytorch-seg (PyTorch)
https://github.com/Kaixhin/FCN-semantic-segmentation (PyTorch)
5. ENet (https://arxiv.org/pdf/1606.02147.pdf)
https://github.com/TimoSaemann/ENet (Caffe)
https://github.com/e-lab/ENet-training (Torch)
https://github.com/PavlosMelissinos/enet-keras (Keras)
6. LinkNet (https://arxiv.org/pdf/1707.03718.pdf)
https://github.com/e-lab/LinkNet (Torch)
7. DenseNet (https://arxiv.org/pdf/1608.06993.pdf)
https://github.com/flyyufelix/DenseNet-Keras (Keras)
8. Tiramisu (https://arxiv.org/pdf/1611.09326.pdf)
https://github.com/0bserver07/One-Hundred-Layers-Tiramisu (Keras) https://github.com/SimJeg/FC-DenseNet (Lasagne)
9. DilatedNet (https://arxiv.org/pdf/1511.07122.pdf)
https://github.com/nicolov/segmentation_keras (Keras)
10. PixelNet (https://arxiv.org/pdf/1609.06694.pdf)
https://github.com/aayushbansal/PixelNet (Caffe)
11. ICNet (https://arxiv.org/pdf/1704.08545.pdf)
https://github.com/hszhao/ICNet (Caffe)
12. ERFNet (http://www.robesafe.uah.es/personal/eduardo.romera/pdfs/Romera17iv.pdf)
https://github.com/Eromera/erfnet (Torch)
13. RefineNet (https://arxiv.org/pdf/1611.06612.pdf)
https://github.com/guosheng/refinenet (MatConvNet)
14. PSPNet (https://arxiv.org/pdf/1612.01105.pdf)
https://github.com/hszhao/PSPNet (Caffe)
https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch)
https://github.com/mitmul/chainer-pspnet (Chainer)
https://github.com/Vladkryvoruchko/PSPNet-Keras-tensorflow(Keras/Tensorflow)
https://github.com/pudae/tensorflow-pspnet (Tensorflow)
15. CRFasRNN (http://www.robots.ox.ac.uk/~szheng/papers/CRFasRNN.pdf)
https://github.com/torrvision/crfasrnn (Caffe)
https://github.com/sadeepj/crfasrnn_keras (Keras)
16. Dilated convolution (https://arxiv.org/pdf/1511.07122.pdf)
https://github.com/fyu/dilation (Caffe)
https://github.com/fyu/drn#semantic-image-segmentataion (PyTorch)
https://github.com/hangzhaomit/semantic-segmentation-pytorch (PyTorch)
17. DeconvNet (https://arxiv.org/pdf/1505.04366.pdf)
http://cvlab.postech.ac.kr/research/deconvnet/ (Caffe)
https://github.com/HyeonwooNoh/DeconvNet (Caffe)
https://github.com/fabianbormann/Tensorflow-DeconvNet-Segmentation(Tensorflow)
18. FRRN (https://arxiv.org/pdf/1611.08323.pdf)
https://github.com/TobyPDE/FRRN (Lasagne)
19. GCN (https://arxiv.org/pdf/1703.02719.pdf)
https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch) https://github.com/ycszen/pytorch-seg (PyTorch)
20. DUC, HDC (https://arxiv.org/pdf/1702.08502.pdf)
https://github.com/ZijunDeng/pytorch-semantic-segmentation (PyTorch) https://github.com/ycszen/pytorch-seg (PyTorch)
21. Segaware (https://arxiv.org/pdf/1708.04607.pdf)
https://github.com/aharley/segaware (Caffe)
22. Semantic Segmentation using Adversarial Networks (https://arxiv.org/pdf/1611.08408.pdf)
https://github.com/oyam/Semantic-Segmentation-using-Adversarial-Networks (Chainer)
Instance aware segmentation
FCIS [https://arxiv.org/pdf/1611.07709.pdf]
https://github.com/msracver/FCIS [MxNet]
MNC [https://arxiv.org/pdf/1512.04412.pdf]
https://github.com/daijifeng001/MNC [Caffe]
DeepMask [https://arxiv.org/pdf/1506.06204.pdf]
https://github.com/facebookresearch/deepmask [Torch]
SharpMask [https://arxiv.org/pdf/1603.08695.pdf]
https://github.com/facebookresearch/deepmask [Torch]
Mask-RCNN [https://arxiv.org/pdf/1703.06870.pdf]
https://github.com/CharlesShang/FastMaskRCNN [Tensorflow] https://github.com/jasjeetIM/Mask-RCNN [Caffe]https://github.com/TuSimple/mx-maskrcnn [MxNet] https://github.com/matterport/Mask_RCNN [Keras]
RIS [https://arxiv.org/pdf/1511.08250.pdf]
https://github.com/bernard24/RIS [Torch]
FastMask [https://arxiv.org/pdf/1612.08843.pdf]
https://github.com/voidrank/FastMask [Caffe]
Satellite images segmentation
https://github.com/mshivaprakash/sat-seg-thesis
https://github.com/KGPML/Hyperspectral
https://github.com/lopuhin/kaggle-dstl
https://github.com/mitmul/ssai
https://github.com/mitmul/ssai-cnn
https://github.com/azavea/raster-vision
https://github.com/nshaud/DeepNetsForEO
https://github.com/trailbehind/DeepOSM
Video segmentation
https://github.com/shelhamer/clockwork-fcn
https://github.com/JingchunCheng/Seg-with-SPN
Autonomous driving
https://github.com/MarvinTeichmann/MultiNet
https://github.com/MarvinTeichmann/KittiSeg
https://github.com/vxy10/p5_VehicleDetection_Unet [Keras]
https://github.com/ndrplz/self-driving-car
https://github.com/mvirgo/MLND-Capstone
Annotation Tools:
https://github.com/AKSHAYUBHAT/ImageSegmentation
https://github.com/kyamagu/js-segment-annotator
https://github.com/CSAILVision/LabelMeAnnotationTool
https://github.com/seanbell/opensurfaces-segmentation-ui
https://github.com/lzx1413/labelImgPlus
https://github.com/wkentaro/labelme
datasets
1. Stanford Background Dataset[http://dags.stanford.edu/projects/scenedataset.html]
1. Sift Flow Dataset[http://people.csail.mit.edu/celiu/SIFTflow/]
2. Barcelona Dataset[http://www.cs.unc.edu/~jtighe/Papers/ECCV10/]
3. Microsoft COCO dataset[http://mscoco.org/]
4. MSRC Dataset[http://research.microsoft.com/en-us/projects/objectclassrecognition/]
5. LITS Liver Tumor Segmentation Dataset[https://competitions.codalab.org/competitions/15595]
6. KITTI[http://www.cvlibs.net/datasets/kitti/eval_road.php]
7. Stanford background dataset[http://dags.stanford.edu/projects/scenedataset.html]
8. Data from Games dataset[https://download.visinf.tu-darmstadt.de/data/from_games/]
9. Human parsing dataset[https://github.com/lemondan/HumanParsing-Dataset]
10. Silenko person database[https://github.com/Maxfashko/CamVid]
11. Mapillary Vistas Dataset[https://www.mapillary.com/dataset/vistas]
12. Microsoft AirSim[https://github.com/Microsoft/AirSim]
13. MIT Scene Parsing Benchmark[http://sceneparsing.csail.mit.edu/]
14. COCO 2017 Stuff Segmentation Challenge[http://cocodataset.org/#stuff-challenge2017]
15. ADE20K Dataset[http://groups.csail.mit.edu/vision/datasets/ADE20K/]
16. INRIA Annotations for Graz-02[http://lear.inrialpes.fr/people/marszalek/data/ig02/]
领域专家
1. Jonathan Long
[http://people.eecs.berkeley.edu/~jonlong/]
2. Liang-Chieh Chen
3. Hyeonwoo Noh
[http://cvlab.postech.ac.kr/~hyeonwoonoh/]
4. Bharath Hariharan
5. Fisher Yu
6. Vijay Badrinarayanan
[https://sites.google.com/site/vijaybacademichomepage/home/papers]
7. Guosheng Lin
[https://sites.google.com/site/guoshenglin/]
其中大部分内容经由WeisongZhao博主内容整理,链接如下:https://blog.csdn.net/weixin_41923961/article/details/80946586