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
44c04129
Commit
44c04129
authored
10 years ago
by
Ross Girshick
Browse files
Options
Downloads
Patches
Plain Diff
TEST: BINARY -> SVM
parent
bfeb811c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
experiments/svm.yml
+6
-1
6 additions, 1 deletion
experiments/svm.yml
src/fast_rcnn_config.py
+3
-3
3 additions, 3 deletions
src/fast_rcnn_config.py
src/fast_rcnn_test.py
+3
-4
3 additions, 4 deletions
src/fast_rcnn_test.py
tools/extra/train_svms.py
+4
-2
4 additions, 2 deletions
tools/extra/train_svms.py
with
16 additions
and
10 deletions
experiments/svm.yml
+
6
−
1
View file @
44c04129
EXP_DIR
:
svm
TRAIN
:
# don't use flipped examples when training SVMs for two reasons:
# 1) R-CNN didn't
# 2) I've tried and it doesn't help, yet makes SVM training take 2x longer
USE_FLIPPED
:
False
TEST
:
BINARY
:
True
SVM
:
True
This diff is collapsed.
Click to expand it.
src/fast_rcnn_config.py
+
3
−
3
View file @
44c04129
...
...
@@ -97,9 +97,9 @@ __C.TEST.MAX_SIZE = 1000
# IoU >= this threshold)
__C
.
TEST
.
NMS
=
0.3
# Experimental:
use binary logistic regression scores instead of K-way softmax
#
scores when testing
__C
.
TEST
.
BINARY
=
False
# Experimental:
treat the (K+1) units in the cls_score layer as linear
#
predictors (trained, eg, with one-vs-rest SVMs).
__C
.
TEST
.
SVM
=
False
# Test using bounding-box regressors
__C
.
TEST
.
BBOX_REG
=
True
...
...
This diff is collapsed.
Click to expand it.
src/fast_rcnn_test.py
+
3
−
4
View file @
44c04129
...
...
@@ -136,11 +136,10 @@ def im_detect(net, im, boxes):
net
.
blobs
[
'
rois
'
].
reshape
(
*
(
blobs
[
'
rois
'
].
shape
))
blobs_out
=
net
.
forward
(
data
=
blobs
[
'
data
'
].
astype
(
np
.
float32
,
copy
=
False
),
rois
=
blobs
[
'
rois
'
].
astype
(
np
.
float32
,
copy
=
False
))
if
cfg
.
TEST
.
BINARY
:
# simulate binary logistic regression
if
cfg
.
TEST
.
SVM
:
# use the raw scores before softmax under the assumption they
# were trained as linear SVMs
scores
=
net
.
blobs
[
'
cls_score
'
].
data
# Return scores as fg - bg
scores
=
scores
-
scores
[:,
0
][:,
np
.
newaxis
]
else
:
# use softmax estimated probabilities
scores
=
blobs_out
[
'
cls_prob
'
]
...
...
This diff is collapsed.
Click to expand it.
tools/extra/train_svms.py
+
4
−
2
View file @
44c04129
...
...
@@ -265,10 +265,12 @@ def parse_args():
if
__name__
==
'
__main__
'
:
# Must turn this off to prevent issues when digging into the net blobs to
# pull out features
# pull out features
(tricky!)
cfg
.
DEDUP_BOXES
=
0
cfg
.
TEST
.
BINARY
=
True
# Must turn this on because we use the test im_detect() method to harvest
# hard negatives
cfg
.
TEST
.
SVM
=
True
args
=
parse_args
()
...
...
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