Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
py-faster-rcnn
Commits
1b12f840
Commit
1b12f840
authored
Apr 28, 2015
by
Ross Girshick
Browse files
initialize with a larger height and width to prevent network initialization errors
parent
d3c52550
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/roi_data_layer/layer.py
View file @
1b12f840
...
...
@@ -71,6 +71,7 @@ class RoIDataLayer(caffe.Layer):
self
.
_prefetch_process
=
None
self
.
_prefetch_queue
=
queues
.
SimpleQueue
()
# parse the layer parameter string, which must be valid YAML
layer_params
=
yaml
.
load
(
self
.
param_str_
)
self
.
_num_classes
=
layer_params
[
'num_classes'
]
...
...
@@ -82,15 +83,25 @@ class RoIDataLayer(caffe.Layer):
'bbox_targets'
:
3
,
'bbox_loss_weights'
:
4
}
# data
top
[
0
].
reshape
(
1
,
3
,
1
,
1
)
# rois
# data blob: holds a batch of N images, each with 3 channels
# The height and width (100 x 100) are dummy values
top
[
0
].
reshape
(
1
,
3
,
100
,
100
)
# rois blob: holds R regions of interest, each is a 5-tuple
# (n, x1, y1, x2, y2) specifying an image batch index n and a
# rectangle (x1, y1, x2, y2)
top
[
1
].
reshape
(
1
,
5
)
# labels
# labels blob: R categorical labels in [0, ..., K] for K foreground
# classes plus background
top
[
2
].
reshape
(
1
)
# bbox_targets
# bbox_targets blob: R bounding-box regression targets with 4 targets
# per class
top
[
3
].
reshape
(
1
,
self
.
_num_classes
*
4
)
# bbox_loss_weights
# bbox_loss_weights blob: At most 4 targets per roi are active; this
# binary vector sepcifies the subset of active targets
top
[
4
].
reshape
(
1
,
self
.
_num_classes
*
4
)
def
forward
(
self
,
bottom
,
top
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment