市面上暂时还没有找到可以在消费机显卡上实时运行的MaskRCnn,TensorFlow即使是C++版本训练在coco数据集上的模型也是慢的要死,最后不堪忍受,只能放弃。

经历了一些列fuckingDog的复杂配置之后,终于配置成功了。测试一把

Detectron地址:https://github.com/facebookresearch/Detectron

一、预 安装环境

#查看python    ubuntu16.04 默认安装了2.7 和3.5

whereis python

#安装pip

sudo apt-get install python-pip

#根据Caffe2的介绍,安装其他库

使用cmake make之时,选择blas为openblas

        sudo apt-get install libopenblas-dev

省去重新安装eigen3.3Up

...................................................

       #安装caffe2成功后安装detection,根据detection Github上的介绍

...................................................

二、InferImage

把Detectron导入Eclipse ,把infer_sample.py复制到根目录;

在debug选项里面添加参数:

--cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml
--output-dir out/  --image-ext  jpg --wts /home/wishchin/build/detectron/model/model_final.pkl demo

结果输出到out文件夹

 

对于自己的数据,检测结果还不错!

时间消耗在1秒左右

INFO infer_simple.py: 145: Inference time: 0.906s
INFO infer_simple.py: 147:  | im_detect_bbox: 0.765s
INFO infer_simple.py: 147:  | misc_mask: 0.091s
INFO infer_simple.py: 147:  | im_detect_mask: 0.041s
INFO infer_simple.py: 147:  | misc_bbox: 0.008s

NFO infer_simple.py: 111: Processing image/nordic/livingroom (40).jpg -> image/nordicOut/livingroom (40).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.846s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.783s
INFO infer_simple.py: 121:  | misc_mask: 0.017s
INFO infer_simple.py: 121:  | im_detect_mask: 0.035s
INFO infer_simple.py: 121:  | misc_bbox: 0.010s
INFO infer_simple.py: 124:  \ Note: inference on the first image will be slower than the rest (caches and auto-tuning need to warm up)
INFO infer_simple.py: 111: Processing image/nordic/livingroom (32).jpg -> image/nordicOut/livingroom (32).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.366s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.320s
INFO infer_simple.py: 121:  | misc_mask: 0.015s
INFO infer_simple.py: 121:  | im_detect_mask: 0.020s
INFO infer_simple.py: 121:  | misc_bbox: 0.011s
INFO infer_simple.py: 111: Processing image/nordic/livingroom (57).jpg -> image/nordicOut/livingroom (57).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.514s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.445s
INFO infer_simple.py: 121:  | misc_mask: 0.017s
INFO infer_simple.py: 121:  | im_detect_mask: 0.042s
INFO infer_simple.py: 121:  | misc_bbox: 0.011s
INFO infer_simple.py: 111: Processing image/nordic/livingroom (41).jpg -> image/nordicOut/livingroom (41).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.336s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.297s
INFO infer_simple.py: 121:  | misc_mask: 0.006s
INFO infer_simple.py: 121:  | im_detect_mask: 0.021s
INFO infer_simple.py: 121:  | misc_bbox: 0.012s
INFO infer_simple.py: 111: Processing image/nordic/livingroom (65).jpg -> image/nordicOut/livingroom (65).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.582s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.483s
INFO infer_simple.py: 121:  | misc_mask: 0.025s
INFO infer_simple.py: 121:  | im_detect_mask: 0.063s
INFO infer_simple.py: 121:  | misc_bbox: 0.011s
INFO infer_simple.py: 111: Processing image/nordic/livingroom (42).jpg -> image/nordicOut/livingroom (42).jpg.pdf
INFO infer_simple.py: 119: Inference time: 0.397s
INFO infer_simple.py: 121:  | im_detect_bbox: 0.348s
INFO infer_simple.py: 121:  | misc_mask: 0.014s
INFO infer_simple.py: 121:  | im_detect_mask: 0.024s
INFO infer_simple.py: 121:  | misc_bbox: 0.011s

Detectron-MaskRCnn: 用于抠图的FCNN的更多相关文章

  1. MaskRCNN路标:TensorFlow版本用于抠图

    MaskRCNN用于检测路标,作为更详细的目标检测,用以得到更精准的额路标位置,路标的几何中心点,用于构建更为精准的拓扑地图,减少构图误差. 抠图工具已经完成,把框抠出来,用0值表示背景. pytho ...

  2. photoshop常见抠图方法

    1.多边形套索:这种工具是用于抠图的边界比较平直,但颜色比较复杂类的图像,它也是最笨最无奈的方法,只能是利用鼠标一点一点去点击抠选.2.磁性套索工具:分为三种:套索,多边形,磁性.这类工具一般只用于边 ...

  3. Mask R-CNN详解和安装

    Detectron是Facebook的物体检测平台,今天宣布开源,它基于Caffe2,用Python写成,这次开放的代码中就包含了Mask R-CNN的实现. 除此之外,Detectron还包含了IC ...

  4. CNN卷积神经网络的改进(15年最新paper)

    回归正题,今天要跟大家分享的是一些 Convolutional Neural Networks(CNN)的工作. 大家都知道,CNN 最早提出时,是以一定的人眼生理结构为基础,然后逐渐定下来了一些经典 ...

  5. Spring Security 5.0.x 参考手册 【翻译自官方GIT-2018.06.12】

    源码请移步至:https://github.com/aquariuspj/spring-security/tree/translator/docs/manual/src/docs/asciidoc 版 ...

  6. 图像抠图算法学习 - Shared Sampling for Real-Time Alpha Matting

    一.序言   陆陆续续的如果累计起来,我估计至少有二十来位左右的朋友加我QQ,向我咨询有关抠图方面的算法,可惜的是,我对这方面之前一直是没有研究过的.除了利用和Photoshop中的魔棒一样的技术或者 ...

  7. paper 117:image matting 数字抠图

    很多公式和图传起来比较麻烦,其实这是一篇论文(仅参考) 图像和视频抠图(Matting)技术可以分成自动和半自动:根据背景的先验知识,又有蓝屏背景,已知背景,和自然背景扣图.报告介绍了自然背景下的半自 ...

  8. ps切图抠图详解-web前端(转)

    网页设计在技术层面上,第一步是美工做出网页效果图,第二步就是网页前端进行网页切图.网页切图工具常用的有fireworks.PS,这里使用PS进行网页切图. 我们通过设计稿,得到我们想要的产出物(如.p ...

  9. R-CNN论文翻译——用于精确物体定位和语义分割的丰富特征层次结构

    原文地址 我对深度学习应用于物体检测的开山之作R-CNN的论文进行了主要部分的翻译工作,R-CNN通过引入CNN让物体检测的性能水平上升了一个档次,但该文的想法比较自然原始,估计作者在写作的过程中已经 ...

随机推荐

  1. I/O 模型及其设计模式

    来源:伯乐在线 - 咸菜 链接:http://blog.jobbole.com/104638/ 前言 I/O在软件开发中的重要性无需多言,无论是在操作系统.网络协议.DBMS这种底层支撑软件还是在移动 ...

  2. mysql模糊查询语句

    select * from tbl_actor where first_char like 'p%' order by first_char;

  3. CentOS 7: 配置Network

    Command Mode Step 1 » Network interface config files are located in /etc/sysconfig/network-scripts/  ...

  4. UIWebView 设置背景为透明

    UIWebView的背景怎样设置成为透明? [webview setBackgroundColor:[UIColor clearColor]]; [webview setOpaque:NO]; 两句代 ...

  5. LeetCode 67. Add Binary (二进制相加)

    Given two binary strings, return their sum (also a binary string). For example,a = "11"b = ...

  6. js对象实例化的常见三种方式

    三种常见模式:工厂模式,构造函数模式,原型模式 <span style="font-size:18px;"><!doctype html> <html ...

  7. git subtree 拆分split repository

    subtree出现,是为了取代submodule http://wenku.baidu.com/link?url=ola85Z5tIXJpxCjLTk-dcO81ayXLs68_y6dsmXIa0ni ...

  8. 使iframe随内容(target到iframe的内容)改变而自适应高度,完美解决各种获取第一个demo高度后第二个高度不变情况

    转自:http://caiceclb.iteye.com/blog/281102 很高兴,终于使用jquery实现了点击外部链接,更改iframe内容时,iframe的高度自适应问题. 失败的测试就不 ...

  9. 2-sat总结

    算法 构造一个有向图G,每个变量xi拆成两个点2i和2i+1 分别表示xi为假,xi为真 那么对于“xi为真或xj为假”这样的条件 我们就需要连接两条边 2*i —>2*j(表示如果i为假,那么 ...

  10. UVALive 4671 K-neighbor substrings 巧用FFT

    UVALive4671   K-neighbor substrings   给定一个两个字符串A和B B为模式串.问A中有多少不同子串与B的距离小于k 所谓距离就是不同位的个数. 由于字符串只包含a和 ...