Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reopen #46 : Add assertion to block usage multi-scale mode with training phase #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/fast_rcnn/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _rescale_boxes(boxes, inds, scales):
def im_detect(sess, net, im, boxes=None):
"""Detect object classes in an image given object proposals.
Arguments:
net (caffe.Net): Fast R-CNN network to use
net (tensorflow graph): Fast or faster R-CNN network to use
im (ndarray): color image to test (in BGR order)
boxes (ndarray): R x 4 array of object proposals
Returns:
Expand Down
11 changes: 2 additions & 9 deletions lib/fast_rcnn/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,8 @@ def get_training_roidb(imdb):

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
assert not (cfg.TRAIN.HAS_RPN and cfg.IS_MULTISCALE), 'Multiscale mode is unimplemented with using RPN'
return RoIDataLayer(roidb, num_classes)


def train_net(network, imdb, roidb, output_dir, pretrained_model=None, max_iters=40000):
Expand Down
4 changes: 1 addition & 3 deletions lib/roi_data_layer/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
# Written by Ross Girshick
# --------------------------------------------------------

"""The data layer used during training to train a Fast R-CNN network.

RoIDataLayer implements a Caffe Python layer.
"""The data layer used during training to train a Fast or faster R-CNN network.
"""

from fast_rcnn.config import cfg
Expand Down