我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用fast_rcnn.config.cfg.IS_MULTISCALE。
def get_training_roidb(imdb): """Returns a roidb (Region of Interest database) for use in training.""" if cfg.TRAIN.USE_FLIPPED: print 'Appending horizontally-flipped training examples...' imdb.append_flipped_images() print 'done' print 'Preparing training data...' if cfg.TRAIN.HAS_RPN: if cfg.IS_MULTISCALE: gdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) print 'done' return imdb.roidb
def _get_blobs(im, rois): """Convert an image and RoIs within that image into network inputs.""" if cfg.TEST.HAS_RPN: blobs = {'data' : None, 'rois' : None} blobs['data'], im_scale_factors = _get_image_blob(im) else: blobs = {'data' : None, 'rois' : None} blobs['data'], im_scale_factors = _get_image_blob(im) if cfg.IS_MULTISCALE: if cfg.IS_EXTRAPOLATING: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES) else: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES_BASE) else: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES_BASE) return blobs, im_scale_factors
def get_training_roidb(imdb): """Returns a roidb (Region of Interest database) for use in training.""" """if cfg.TRAIN.USE_FLIPPED: print 'Appending horizontally-flipped training examples...' imdb.append_flipped_images() print 'done'""" # think about including this flipping operation again.... print 'Preparing training data...' if cfg.TRAIN.HAS_RPN: if cfg.IS_MULTISCALE: gdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) print 'done' return imdb.roidb
def get_training_roidb(imdb): """Returns a roidb (Region of Interest database) for use in training.""" """if cfg.TRAIN.USE_FLIPPED: print 'Appending horizontally-flipped training examples...' imdb.append_flipped_images() print 'done'""" # think about including this flipping operation again.... print 'Preparing training data...' if cfg.TRAIN.HAS_RPN: if cfg.IS_MULTISCALE: gdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) """print('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') print(imdb.image_index) print(len(imdb.image_index)) # is twice as long as it should be!! <- due to flipping! print('&&&&&&&&&&&&&&&&&&&&&&&')""" else: rdl_roidb.prepare_roidb(imdb) print 'done' return imdb.roidb
def get_training_roidb(imdb): """Returns a roidb (Region of Interest database) for use in training.""" if cfg.TRAIN.USE_FLIPPED: print 'Appending horizontally-flipped training examples...' imdb.append_flipped_images() print 'done' print 'Preparing training data...' if cfg.IS_RPN: if cfg.IS_MULTISCALE: gdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) else: rdl_roidb.prepare_roidb(imdb) print 'done' return imdb.roidb
def _get_blobs(im, rois): """Convert an image and RoIs within that image into network inputs.""" if cfg.IS_RPN: blobs = {'data' : None, 'boxes_grid' : None} blobs['data'], im_scale_factors = _get_image_blob(im) blobs['boxes_grid'] = rois else: blobs = {'data' : None, 'rois' : None} blobs['data'], im_scale_factors = _get_image_blob(im) if cfg.IS_MULTISCALE: if cfg.IS_EXTRAPOLATING: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES) else: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES_BASE) else: blobs['rois'] = _get_rois_blob(rois, cfg.TEST.SCALES_BASE) return blobs, im_scale_factors
def get_data_layer(roidb, num_classes): """return a data layer.""" if cfg.TRAIN.HAS_RPN: if cfg.IS_MULTISCALE: layer = GtDataLayer(roidb) else: layer = RoIDataLayer(roidb, num_classes) else: layer = RoIDataLayer(roidb, num_classes) return layer