Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fast-rcnn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maxmzkr
fast-rcnn
Commits
e5de7969
Commit
e5de7969
authored
10 years ago
by
Ross Girshick
Browse files
Options
Downloads
Patches
Plain Diff
bug fix for the bug fix
parent
0eb69bf8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bbox_regression_targets.py
+1
-1
1 addition, 1 deletion
src/bbox_regression_targets.py
src/fast_rcnn_train.py
+4
-5
4 additions, 5 deletions
src/fast_rcnn_train.py
with
5 additions
and
6 deletions
src/bbox_regression_targets.py
+
1
−
1
View file @
e5de7969
...
...
@@ -91,4 +91,4 @@ def append_bbox_regression_targets(roidb):
# These values will be needed for making predictions
# (the predicts will need to be unnormalized and uncentered)
return
means
,
stds
return
means
.
ravel
(),
stds
.
ravel
()
This diff is collapsed.
Click to expand it.
src/fast_rcnn_train.py
+
4
−
5
View file @
e5de7969
...
...
@@ -36,18 +36,17 @@ class SolverWrapper(object):
assert
self
.
bbox_stds
is
not
None
assert
self
.
bbox_means
is
not
None
stds
=
self
.
bbox_stds
.
ravel
()[
np
.
newaxis
,
np
.
newaxis
,
:,
np
.
newaxis
]
means
=
self
.
bbox_means
.
ravel
()[
np
.
newaxis
,
np
.
newaxis
,
np
.
newaxis
,
:]
# save original values
orig_0
=
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
0
].
data
.
copy
()
orig_1
=
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
1
].
data
.
copy
()
# scale and shift with bbox reg unnormalization; then save snapshot
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
0
].
data
[...]
=
\
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
0
].
data
*
stds
(
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
0
].
data
*
self
.
bbox_stds
[:,
np
.
newaxis
])
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
1
].
data
[...]
=
\
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
1
].
data
*
stds
+
means
(
self
.
solver
.
net
.
params
[
'
bbox_pred
'
][
1
].
data
*
self
.
bbox_stds
+
self
.
bbox_means
)
output_dir
=
get_output_path
(
self
.
imdb
,
None
)
if
not
os
.
path
.
exists
(
output_dir
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment