Faster RCNN
iamzhangzhuping
这个作者很懒,什么都没留下…
展开
-
Faster RCNN blob.py
def im_list_to_blob(ims):将图像转换成blob(np.ndarray)def im_list_to_blob(ims): """Convert a list of images into a network input. Assumes images are already prepared (means subtracted, BGR order原创 2016-05-15 19:40:53 · 1786 阅读 · 0 评论 -
Faster RCNN proposal_layer.py
定义了一个 ProposalLayer 类, 在rpn_test.pt中会用到。class ProposalLayer(caffe.Layer): """ Outputs object detection proposals by applying estimated bounding-box transformations to a set of regular boxes原创 2016-05-23 18:53:23 · 6506 阅读 · 0 评论 -
Faster RCNN train.py
定义了一个类:class SolverWrapperclass SolverWrapper(object): """A simple wrapper around Caffe's solver. This wrapper gives us control over he snapshotting process, which we use to unnormalize原创 2016-05-15 19:43:04 · 3163 阅读 · 0 评论 -
Faster RCNN pascal_voc.py
主要定义了一个pascal_voc类,在类的内部定义了它的一些属性和方法。def _init_(self, image_set, year, devkit_path=None) 构造器方法def __init__(self, image_set, year, devkit_path=None): imdb.__init__(self, 'voc_' + year + '_'原创 2016-05-15 19:39:52 · 2988 阅读 · 0 评论 -
Faster RCNN roidb.py
1. roidb是一个列表,列表元素为字典2. prepare_roidb 函数def prepare_roidb(imdb): """Enrich the imdb's roidb by adding some derived quantities that are useful for training. This function precomputes the m原创 2016-05-15 19:39:23 · 4436 阅读 · 0 评论 -
Faster RCNN imdb.py
def merge_roidbs(a, b) 类imdb的静态方法,将a b两个roidb归并为一个roidb@staticmethod def merge_roidbs(a, b): assert len(a) == len(b) for i in xrange(len(a)): # boxes 采用vstack原创 2016-05-15 19:38:48 · 2784 阅读 · 0 评论 -
Faster RCNN train_faster_rcnn_alt_opt.py
def get_roidb(imdb_name, rpn_file=None):def get_roidb(imdb_name, rpn_file=None): imdb = get_imdb(imdb_name) #返回一个pascal_voc类对象 print 'Loaded dataset `{:s}` for training'.format(imdb.name)原创 2016-05-15 19:38:02 · 1996 阅读 · 1 评论 -
Faster RCNN anchor_target_layer.py
class AnchorTargetLayer(caffe.Layer): """ Assign anchors to ground-truth targets. Produces anchor classification labels and bounding-box regression targets. """ def setup(self, botto原创 2016-05-17 11:13:49 · 6046 阅读 · 1 评论 -
Faster RCNN minibatch.py
def _sample_rois(roidb, fg_rois_per_image, rois_per_image, num_classes) 在 def get_minibatch(roidb, num_classes) 中调用此函数,传进来的实参为单张图像的roidb ,该函数主要功能是随机组合sample of RoIs, 来生成前景样本和背景样本。def _sample_rois(原创 2016-05-15 19:40:30 · 3915 阅读 · 0 评论 -
Faster RCNN roi_pooling_layer.cpp roi_pooling_layer.cu
主要定义了一个 ROIPoolingLayer 类ROIPoolingLayer的受保护数据成员有:int channels_;int height_;int width_;int pooled_height_; // pooling后的特征图的height_int pooled_width_; // pooling后的特征图的width_Dtype spatial_scale_; //原创 2016-05-25 17:25:24 · 6685 阅读 · 0 评论 -
Faster RCNN layer.py
def setup(self, bottom, top)方法: 该方法主要是在创建RoIDataLayer的时候调用。结合_caffe.cpp里面.def("setup", &Layer::LayerSetUp),个人猜测(水平有限),setup(self, bottom, top)应该还是调用底层的Layer::LayerSetUp方法,同时bottom, top也分别对应着:const vec原创 2016-05-15 19:41:42 · 3728 阅读 · 0 评论 -
Faster RCNN generate.py
该模块的功能主要是生成rpn proposals。 + cv2.imread读取的图像的存储格式为H W K,且三通道的顺序为BGR + PIL.Image.open读取图片的存储格式为:W H (此时的数据为PIL库的某种对象),且三通道顺序为RGB 但是,当转换为np.array的时候,存储格式将H W K,常用的代码段为:def load_image(self, idx):原创 2016-05-15 19:41:18 · 5378 阅读 · 0 评论