自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 收藏
  • 关注

原创 如何用gdb调试caffe

基础知识:当我们进入gdb的时候,可能需要的指令主要有:1、程序运行参数。set args 可指定运行时参数。(如:set args 10 20 30 40 50)show args 命令可以查看设置好的运行参数。2、运行环境。path <dir> 可设定程序的运行路径。show paths 查看程序的运行路径。set environment varname [=value] 设置环境变

2016-05-26 18:25:19 2798

原创 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 6649

原创 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 6458

转载 Multinomial Logistic Loss and Cross Entropy Loss are the same

Multinomial Logistic Loss and Cross Entropy Loss are the same

2016-05-20 10:06:37 2823

原创 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 6003 1

原创 python tile

tile函数        在看机器学习实战这本书时,遇到numpy.tile(A,B)函数,愣是没看懂怎么回事,装了numpy模块后,实验了几把,原来是这样子:重复A,B次,这里的B可以时int类型也可以是远组类型。[python] view plain copy >>> import numpy  >>> numpy.

2016-05-15 19:45:25 861

原创 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 3132

原创 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 3697

原创 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 5338

原创 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 1754

原创 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 3866

原创 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 2962

原创 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 4409

原创 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 2750

原创 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 1970 1

原创 python eval()

eval()函数十分强大,官方demo解释为:将字符串str当成有效的表达式来求值并返回计算结果,比较简单,这里就不做解释了,下面介绍一种比较少见的用途:定义一个类:class Myclass(object): def gt_roidb(self): print 'gt_roidb...'在解释器中输入:mc = Myclass()m = eval('mc.' + 'gt

2016-05-14 14:19:41 648 1

原创 Python 装饰器,@property 以及 Pycaffe.py

Python装饰器的知识请参考:12步轻松搞定python装饰器 @property函数的知识请参考:Python进阶之“属性(property)”详解下面贴一段pycaffe.py中的代码@propertydef _Net_blobs(self): """ An OrderedDict (bottom to top, i.e., input to output) of netw

2016-05-13 17:28:05 1744

转载 python核心模块pickle和cPickle

使用pickle模块你可以把Python对象直接保存到文件,而不需要把他们转化为字符串,也不用底层的文件访问操作把它们写入到一个二进制文件里。 pickle模块会创建一个python语言专用的二进制格式,你基本上不用考虑任何文件细节,它会帮你干净利落地完成读写独享操作,唯一需要的只是一个 合法的文件句柄。 pickle模块中的两个主要函数是dump()和load()。dump()函数接受一

2016-05-11 09:42:14 554

原创 Faster-rcnn

最后更新日期:2016年4月29日本教程主要基于python版本的faster R-CNN,因为python layer的使用,这个版本会比matlab的版本速度慢10%,但是准确率应该是差不多的。目前已经实现的有两种方式:Alternative training Approximate joint training 推荐使用第二种,因为第二种使用的显存更小,而且训练会更快,同时准确率差不多甚至

2016-05-08 12:33:24 2904

原创 sigmoid cross entorpy loss

1.Cross Entropy Error The mathematics behind cross entropy (CE) error and its relationship to NN training are very complex, but, fortunately, the results are remarkably simple to understand and implem

2016-05-07 09:58:34 2320

原创 export命令

用户登录到Linux系统后,系统将启动一个用户shell。在这个shell中,可以使用shell命令或声明变量,也可以创建并运行shell脚本程序。运行shell脚本程序时,系统将创建一个子shell。此时,系统中将有两个shell,一个是登录时系统启动的shell,另一个是系统为运行脚本程序创建的shell。当一个脚本程序运行完毕,脚本shell将终止,返回到执行该脚本之前的shell。从这种意

2016-05-05 15:41:01 556

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除