GithubHelp home page GithubHelp logo

faster-rcnn-cplusplus2's Introduction

faster-rcnn-cplusplus2

Faster-rcnn cplusplus2 with python model ;

the project is according to the http://blog.csdn.net/zxj942405301/article/details/72775463

the c++ faster-rcnn with matlab model see:https://github.com/zhanglaplace/Faster_rcnn_Cplusplus_vs2013

Platform

Windows

You need a VC compiler to build these project, Visual Studio 2013 Community should be fine. You can download from https://www.visualstudio.com/downloads/.

Ubuntu

mkdir build 

cd build

cmake ..

make .

Of course ,you shoule put your model and protoxt file in models directory

Caffe

You should build caffe with RoiPooling layer and rpn_layer

  • rpn_layer

    • add rpn_layer.cpp to $Caffe/src/caffe/layers/

    • add rpn_layer.hpp to $Caffe/include/caffe/layers/

  • caffe.proto

	optional RPNParameter rpn_param = 158;
	message RPNParameter {  
	  optional uint32 feat_stride = 1;  
	  optional uint32 basesize = 2;  
	  repeated uint32 scale = 3;  
	  repeated float ratio = 4;  
	  optional uint32 boxminsize =5;  
	  optional uint32 per_nms_topn = 9;  
	  optional uint32 post_nms_topn = 11;  
	  optional float nms_thresh = 8;  
	}  
  • protoxt modify
	modify test.prototxt 
	layer {  
	   name: 'proposal'  
	   type: 'Python'  
	   bottom: 'rpn_cls_prob_reshape'  
	   bottom: 'rpn_bbox_pred'  
	   bottom: 'im_info'  
	   top: 'rois'  
	   python_param {  
		 module: 'rpn.proposal_layer'  
		 layer: 'ProposalLayer'  
		param_str: "'feat_stride': 16"  
	   }  
	}  
	to:
	layer {  
	   name: "proposal"  
	   type: "RPN"  
	   bottom: "rpn_cls_prob_reshape"  
	   bottom: "rpn_bbox_pred"  
	   bottom: "im_info"  
	   top: "rois"  
	   rpn_param {  
		   feat_stride : 16  
		   basesize : 16  
		   scale : 8  
		   scale : 16  
		   scale : 32  
		   ratio : 0.5  
		   ratio : 1  
		   ratio : 2  
		   boxminsize :16  
		   per_nms_topn : 0;  
		   post_nms_topn : 0;  
		   nms_thresh : 0.3  
	   }  
	}  

Result

it's cost much time the py-faster-rcnn In My compute(GTX1080Ti GPU) a picture of size(375*500*3)cost 361ms . image image image image image image

Something else

if it's helpful to you ,please give me a star thanks~

faster-rcnn-cplusplus2's People

Contributors

zhanglaplace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

faster-rcnn-cplusplus2's Issues

你好,你用的opencv 哪个版本的呢

我的提示错误 180 error C2039: “Affine3”: 不是“cv”的成员 (....\examples\cpp_faster_rcnn\demo.cpp) ...\OpenCV.2.4.10\build\native\include\opencv2\core\affine.hpp
谢谢你的分享

与原生Python版本出来的结果不一致

有没有测试过原生版本输出的具体去做对比呢?
我测过多次,同一图片,同样weight测试出来rpn出的
结果与原生的有很大差异,虽然也可以用,但是改变了
原来的结果,不知道是否影响准确率

这是我的参数与原生faster rcnn参数一样
rpn_param {
feat_stride : 16
basesize : 16
scale : 8
scale : 16
scale : 32
ratio : 0.5
ratio : 1.0
ratio : 2.0
boxminsize :16
per_nms_topn : 6000
post_nms_topn : 300
nms_thresh : 0.3
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.