• 大小: 11.58MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-22
  • 语言: Matlab
  • 标签: FasterRCNN  

资源简介

Faster RCNN(matlab)在windows下运行所需的文件(cuda7.5)

资源截图

代码片段和文件信息

classdef Blob < handle
  % Wrapper class of caffe::Blob in matlab
  
  properties (Access = private)
    hBlob_self
  end
  
  methods
    function self = Blob(hBlob_blob)
      CHECK(is_valid_handle(hBlob_blob) ‘invalid Blob handle‘);
      
      % setup self handle
      self.hBlob_self = hBlob_blob;
    end
    function shape = shape(self)
      shape = caffe_(‘blob_get_shape‘ self.hBlob_self);
    end
    function reshape(self shape)
      shape = self.check_and_preprocess_shape(shape);
      caffe_(‘blob_reshape‘ self.hBlob_self shape);
    end
    function data = get_data(self)
      data = caffe_(‘blob_get_data‘ self.hBlob_self);
    end
    function set_data(self data)
      data = self.check_and_preprocess_data(data);
      caffe_(‘blob_set_data‘ self.hBlob_self data);
    end
    function diff = get_diff(self)
      diff = caffe_(‘blob_get_diff‘ self.hBlob_self);
    end
    function set_diff(self diff)
      diff = self.check_and_preprocess_data(diff);
      caffe_(‘blob_set_diff‘ self.hBlob_self diff);
    end
    function copy_data_from(self blob)
      caffe_(‘blob_copy_data‘ self.hBlob_self blob.hBlob_self);  
    end
  end
  
  methods (Access = private)
    function shape = check_and_preprocess_shape(~ shape)
      CHECK(isempty(shape) || (isnumeric(shape) && isrow(shape)) ...
        ‘shape must be a integer row vector‘);
      shape = double(shape);
    end
    function data = check_and_preprocess_data(self data)
      CHECK(isnumeric(data) ‘data or diff must be numeric types‘);
      self.check_data_size_matches(data);
      if ~isa(data ‘single‘)
        data = single(data);
      end
    end
    function check_data_size_matches(self data)
      % check whether size of data matches shape of this blob
      % note: matlab arrays always have at least 2 dimensions. To compare
      % shape between size of data and shape of this blob extend shape of
      % this blob to have at least 2 dimensions
      self_shape_extended = self.shape;
      if isempty(self_shape_extended)
        % target blob is a scalar (0 dim)
        self_shape_extended = [1 1];
      elseif isscalar(self_shape_extended)
        % target blob is a vector (1 dim)
        self_shape_extended = [self_shape_extended 1];
      end
      % Also matlab cannot have tailing dimension 1 for ndim > 2 so you
      % cannot create 20 x 10 x 1 x 1 array in matlab as it becomes 20 x 10
      % Extend matlab arrays to have tailing dimension 1 during shape match
      data_size_extended = ...
        [size(data) ones(1 length(self_shape_extended) - ndims(data))];
      is_matched = ...
        (length(self_shape_extended) == length(data_size_extended)) ...
        && all(self_shape_extended == data_size_extended);
      CHECK(is_matched ...
        sprintf(‘%s input data/diff size: [ %s] vs target blob shape: [ %s]‘ ...
        ‘input data/diff size does not match tar

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4067  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\+test\test_net.m

     文件       1467  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\+test\test_solver.m

     文件       3127  2015-08-11 16:08  external\caffe\matlab\caffe_faster_rcnn\+caffe\Blob.m

     文件       1244  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\get_net.m

     文件        308  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\get_solver.m

     文件     606799  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\imagenet\ilsvrc_2012_mean.mat

     文件        364  2015-07-27 14:02  external\caffe\matlab\caffe_faster_rcnn\+caffe\init_log.m

     文件       1349  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\io.m

     文件       1017  2015-08-02 19:52  external\caffe\matlab\caffe_faster_rcnn\+caffe\layer.m

     文件       7630  2015-08-11 22:31  external\caffe\matlab\caffe_faster_rcnn\+caffe\Net.m

     文件      20373  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\private\caffe_.cpp

     文件         78  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\private\CHECK.m

     文件        125  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\private\CHECK_FILE_EXIST.m

     文件        962  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\private\is_valid_handle.m

     文件        180  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\reset_all.m

     文件        382  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\run_tests.m

     文件        261  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\set_device.m

     文件        104  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\set_mode_cpu.m

     文件        104  2015-06-27 13:53  external\caffe\matlab\caffe_faster_rcnn\+caffe\set_mode_gpu.m

     文件        290  2015-07-27 11:56  external\caffe\matlab\caffe_faster_rcnn\+caffe\set_random_seed.m

     文件       1960  2015-08-02 14:45  external\caffe\matlab\caffe_faster_rcnn\+caffe\Solver.m

     文件        694  2016-01-02 14:08  external\caffe\matlab\caffe_faster_rcnn\caffe_.exp

     文件       1720  2016-01-02 14:08  external\caffe\matlab\caffe_faster_rcnn\caffe_.lib

     文件   17186816  2016-01-02 14:09  external\caffe\matlab\caffe_faster_rcnn\caffe_.mexw64

     文件     291632  2015-08-16 08:21  external\caffe\matlab\caffe_faster_rcnn\cudart32_75.dll

     文件     360736  2015-08-16 08:21  external\caffe\matlab\caffe_faster_rcnn\cudart64_75.dll

     文件     235008  2015-02-06 16:29  external\caffe\matlab\caffe_faster_rcnn\gflags.dll

     文件      26608  2015-02-06 16:29  external\caffe\matlab\caffe_faster_rcnn\gflags.lib

     文件    2741760  2014-05-09 03:19  external\caffe\matlab\caffe_faster_rcnn\hdf5.dll

     文件     473680  2014-05-09 03:19  external\caffe\matlab\caffe_faster_rcnn\hdf5.lib

............此处省略26个文件信息

评论

共有 条评论

相关资源