Image saliency_detection / segmentation论文

Detect Globally, Refine Locally: A Novel Approach to Saliency Detection

在这里插入图片描述

Research Background
  1. Existing saliency detection approaches usually focus on how to effectively combine hierarchical features so as to encode rich semantic representation, then capture distinctive objectness and detailed boundaries simultaneously. However, it is often overlooked that directly apply concatenation or element-wise operation to different feature maps is sub-optimal, because some maps are too clustered which may introduce misleading information.
Motivation and Proposed Approach
  1. This work first proposes a Recurrent Localization Network, which consists of a contextual weighting module (CWM) and a recurrent module (RM). CWM can adaptively weight the feature maps for each position based on a predicted spatial response map. The recurrent module gradually refine the predicted saliency map over ‘time’.
  2. This work adopt a Boundary Refinement Network (BRN) to recover the detailed boundary information. BRN can predict a n × n n\times n n×n coefficient map for each pixel which indicates the relationship between the center point and its n × n n\times n n×n neighbors.
  3. In summary, the contextual weighting module is organized as an inception-like module with 3x3, 5x5 and 7x7 convolutional kernal, followed by a concatnation and convolution operation. The CWM module generates a response map, indicating the importance for each spatial position.
  4. For the feature map of each block, the recurrent module simultaneously utilize both the current feed-forward input and the previous state of the same block.
  5. The boundary refinement network takes current image and its saliency map as input, aiming to learn the propagation coefficients with several convolutional layers. The propagation coefficients are then used to refine the saliency map.
疑惑:
  1. BRN 与spatial propagation network类似?
  2. 在globally detect模块中, 包含recurrent refinement 模块,同时又采用BRN修正,意义是什么?
  3. 当前工作,念神CVPR 2018,以及ICCV 2017的embedding,如何做到为每个点学习一个attention map
  4. recurrent module 的time step只是设置为2,帮助大吗?这个思路计算量翻倍,但效果应该有提升
  5. 在修正部分,输入图像的分辨率更大,提升最终效果
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当然可以,我来为您逐行解释一下这段代码的作用: 1.导入所需的库 ```python import matplotlib.image as img import glob import numpy as np from scipy.ndimage import filters, measurements, interpolation from math import pi import cv2 ``` 这里导入了一些常用的库,包括`matplotlib`、`numpy`、`scipy`、`math`、`cv2`等。 2.图像直方图均衡化 ```python def image_histogram_equalization(image): return cv2.equalizeHist(image) ``` 这是一个实现图像直方图均衡化的函数,使用`cv2`库中的`equalizeHist()`方法实现。 3.遍历文件夹中的图像文件 ```python for saliency in glob.glob("output_scaled/zebra.png"): ``` 这里使用`glob`库找到`output_scaled`文件夹中的`zebra.png`文件,并将其赋值给`saliency`变量。 4.读取图像并进行直方图均衡化 ```python s = img.imread(saliency) s = cv2.imread(saliency,0) image = image_histogram_equalization(s) ``` 这里先使用`img.imread()`方法读入图像,然后使用`cv2.imread()`方法读入灰度图像,并将其赋值给`s`变量。接着,使用之前定义的`image_histogram_equalization()`函数对图像进行直方图均衡化,将结果保存在`image`变量中。 5.前景提取 ```python image[image>255 - 15.5] = 255 image[image<=255 - 15.5] = 0 cv2.imwrite(r"output_fg/" + saliency[len("output_scaled/"):], image) ``` 这里使用阈值法对经过直方图均衡化后的图像进行前景提取。首先将图像中所有大于`255 - 15.5`的像素值设为255,将小于等于`255 - 15.5`的像素值设为0。然后使用`cv2.imwrite()`方法将结果保存到`output_fg`文件夹中。 6.背景提取 ```python v = np.zeros_like(image) v[image>15.5] = 0 v[image<=15.5] = 255 cv2.imwrite(r"output_bg/" + saliency[len("output_scaled/"):], v) ``` 这里使用阈值法对经过直方图均衡化后的图像进行背景提取。首先创建一个和`image`大小相同的全零矩阵,并将其赋值给`v`变量。然后将`image`中所有大于15.5的像素值设为0,将小于等于15.5的像素值设为255。最后使用`cv2.imwrite()`方法将结果保存到`output_bg`文件夹中。 希望这样的解释可以帮助您理解这段代码的作用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值