selective search(RCNN使用的ROI提取方法)
来源:互联网 发布:led显示屏电脑软件 编辑:程序博客网 时间:2024/06/06 10:45
安装selective search
$ pip install selectivesearch
读取并显示图片
import matplotlib.pyplot as pltimport matplotlib.patches as mpatchesimport selectivesearchfrom skimage import io# img = io.imread('/home/lxq/testImage/00000.ppm')# io.imshow(img)# plt.show()def main(): # loading image img = io.imread('/home/lxq/testImage/00000.ppm') # perform selective search img_lbl, regions = selectivesearch.selective_search( img, scale=500, sigma=0.9, min_size=10) candidates = set() for r in regions: # excluding same rectangle (with different segments) if r['rect'] in candidates: continue # excluding regions smaller than 2000 pixels if r['size'] < 2000: continue # distorted rects x, y, w, h = r['rect'] if w / h > 1.2 or h / w > 1.2: continue candidates.add(r['rect']) # draw rectangles on the original image fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(6, 6)) ax.imshow(img) for x, y, w, h in candidates: print x, y, w, h rect = mpatches.Rectangle( (x, y), w, h, fill=False, edgecolor='red', linewidth=1) ax.add_patch(rect) plt.show()if __name__ == "__main__": main()输出结果
阅读全文
1 0
- selective search(RCNN使用的ROI提取方法)
- RCNN之Selective Search方法(10)---《深度学习》
- fast-rcnn的例子执行和selective search中遇到的问题及解决(二)
- (转载)Selective Search
- 选择性搜索(selective search)
- Selective Search
- opencv提取直线、轮廓及ROI的描述方法
- opencv的ROI的提取
- 使用ROI的方法剪切图像
- AssertionError: Selective search data not found at: tf-faster-rcnn/data/selective_search_data/voc_20
- Faster RCNN训练出现问题:Selective search data not found at: /home/py-faster-rcnn/data/selective_search_dat
- py-faster-rcnn流程(3)——根据RPN网络的输出获取ROI
- 【OpenCV_contri】找出任意物体可能在的位置(Selective search,物体检测)
- opencv 如何提取旋转矩形的ROI
- Python下使用 Region Proposal Method: Selective Search
- Selective Search 学习笔记
- selective search算法
- Selective Search 算法
- android gpuimage显示的缩放和剪裁模式
- ThinkPHP5.0中Request请求对象的常用操作
- mysql 查询日志开启
- c#动态编译和执行代码
- Android7.1.1上下/左右分屏的策略分析
- selective search(RCNN使用的ROI提取方法)
- Android RecycleView分割线
- C++用delete删除指针指向的堆中空间
- android 录音amr转mp3支持浏览器浏览
- 禁用 浏览器记住密码的方式
- Android Intent通过setDataAndType(uri, "type")打开文件方式
- 【Python】Python中的None
- 从Mac中完全删除office
- 【算法题】下厨房