• GrabCut

  • Amodal Completion 如何在部分被遮挡的情况下划分整个物体

图像分割方法

传统方法

基于阈值的分割

固定阈值分割

直方图双峰法

Prewitt et al.

迭代阈值图像分割

自适应阈值图像风格

大津法/OTSU/最大类间方差法
  • Otsu的实现
def otsu(src):
    ```
    input: a single channel image
    output: a binary image, using otsu thresholding
    ```
    hist, _ = np.histogram(src, bins=list(range(257)))
 
    # OTSU method to estimate the threshold
    hist_norm = hist/hist.sum()
    Q = hist_norm.cumsum()
    bins = np.arange(256)
    fn_min = np.inf
    thresh = -1
    for i in range(255):
        p1,p2 = np.hsplit(hist_norm,[i]) # probabilities
        q1,q2 = Q[i],Q[255]-Q[i] # cum sum of classes
        if q1 < 1.e-6 or q2 < 1.e-6:
            continue
        b1,b2 = np.hsplit(bins,[i]) # weights
        # finding means and variances
        m1,m2 = np.sum(p1*b1)/q1, np.sum(p2*b2)/q2
        v1,v2 = np.sum(((b1-m1)**2)*p1)/q1,np.sum(((b2-m2)**2)*p2)/q2
        # calculates the minimization function
        fn = v1*q1 + v2*q2
        if fn < fn_min:
            fn_min = fn
            thresh = i
 
    # print("Threshold is %d"%thresh)
    # ## if you want to check the histogram
    # plt.hist(v.ravel(),256,[0,256])
    # plt.show()
 
    [height, width] = src.shape
    binary = np.zeros([height, width])
    for iy in range(height):
        for ix in range(width):
            if src[iy, ix] > thresh:
                binary[iy, ix] = 255
            else:
                binary[iy, ix] = 0
 
    return binary
均值法

最佳阈值

应用聚类算法

K-means和GMM

DBSCAN (Density-Based Spatial Clustering of Applications with Noise)

超像素Superpixels

  • https://cm_westwood.gitee.io/image_processing_homework/#header-n54
  • 算法的提出 Ren, Malik. Learning a classification model for segmentation[C]. international conference on computer vision, 2003: 10-17.
  • 评价标准 Den Bergh M V, Boix X, Roig G, et al. SEEDS: Superpixels Extracted Via Energy-Driven Sampling[J]. International Journal of Computer Vision, 2015, 111(3): 298-314.
经典算法 SLIC
  • Stutz D, Hermans A, Leibe B, et al. Superpixels: An evaluation of the state-of-the-art[J]. Computer Vision and Image Understanding, 2018: 1-27.
改进算法SEEDS,ETPS
  • Yao J, Boben M, Fidler S, et al. Real-time coarse-to-fine topologically preserving segmentation[C]. computer vision and pattern recognition, 2015: 2947-2955.

  • https://zhuanlan.zhihu.com/p/30732385

    • 基于阈值的分割
      • 固定阈值分割
      • 直方图双峰法Prewitt et al.
      • 迭代阈值图像分割
      • 自适应阈值图像风格
        • 大津法/OTSU/最大类间方差法
        • 均值法
      • 最佳阈值
    • 基于边缘的分割
      • Canny边缘检测器
        • 需要两个参数maxVal和minVal
      • Harris角点检测器
      • SIFT检测器
      • SURF检测器
    • 基于区域的分割
      • 种子区域生长法, Levine et al.
      • 区域分裂合并法Gonzalez et al.
      • 分水岭法Meyer et al.
    • 基于图论的分割
      • GraphCut
    • 基于能量泛函的分割

通过机器学习的方法

FCN

  • CVPR 2015

ReSeg

U-net

ParseNet

DeepMask

SegNet

Instance-Aware Segmentation

DeepLab, DeepLabv3

RefineNet

Pyramid Scene Parsing Network (PSPNet)

Dense-Net

Mask-Lab

PANet

  • Path aggregation network for instance segmentation

DANet

  • Dual attention network for scene segmentation

FastFCN

  • FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation

Gated-SCNN

  • Gated-SCNN: Gated Shape CNNs for Semantic Segmentation

OneFormer

  • OneFormer: One Transformer to Rule Universal Image Segmentation

PSPNet-ResNet50_PSSL

  • Distilling Ensemble of Explanations for Weakly-Supervised Pre-Training of Image Segmentation Models

相关技术

空洞卷积(Atrous/Dilated Convolution)