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
53a470ed
Commit
53a470ed
authored
Apr 29, 2015
by
Ross Girshick
Browse files
tool script docstrings
parent
a25ae1d7
Changes
6
Hide whitespace changes
Inline
Side-by-side
tools/compress_net.py
View file @
53a470ed
...
...
@@ -7,6 +7,8 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""Compress a Fast R-CNN network using truncated SVD."""
import
_init_paths
import
caffe
import
argparse
...
...
@@ -14,9 +16,7 @@ import numpy as np
import
os
,
sys
def
parse_args
():
"""
Parse input arguments
"""
"""Parse input arguments."""
parser
=
argparse
.
ArgumentParser
(
description
=
'Compress a Fast R-CNN network'
)
parser
.
add_argument
(
'--def'
,
dest
=
'prototxt'
,
help
=
'prototxt file defining the uncompressed network'
,
...
...
@@ -36,8 +36,7 @@ def parse_args():
return
args
def
compress_weights
(
W
,
l
):
"""
Compress the weight matrix W of an inner product (fully connected) layer
"""Compress the weight matrix W of an inner product (fully connected) layer
using truncated SVD.
Parameters:
...
...
tools/demo.py
View file @
53a470ed
...
...
@@ -7,6 +7,12 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""
Demo script showing detections in sample images.
See README.md for installation instructions before running.
"""
import
_init_paths
from
fast_rcnn.config
import
cfg
from
fast_rcnn.test
import
im_detect
...
...
tools/reval.py
View file @
53a470ed
#!/usr/bin/env python
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Reval = re-eval. Re-evaluate saved detections."""
import
_init_paths
from
fast_rcnn.test
import
apply_nms
from
fast_rcnn.config
import
cfg
...
...
tools/test_net.py
View file @
53a470ed
...
...
@@ -7,6 +7,8 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""Test a Fast R-CNN network on an image database."""
import
_init_paths
from
fast_rcnn.test
import
test_net
from
fast_rcnn.config
import
cfg
,
cfg_from_file
...
...
tools/train_net.py
View file @
53a470ed
...
...
@@ -7,6 +7,8 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""Train a Fast R-CNN network on a region of interest database."""
import
_init_paths
from
fast_rcnn.train
import
get_training_roidb
,
train_net
from
fast_rcnn.config
import
cfg
,
cfg_from_file
,
get_output_dir
...
...
tools/train_svms.py
View file @
53a470ed
...
...
@@ -7,6 +7,11 @@
# Written by Ross Girshick
# --------------------------------------------------------
"""
Train post-hoc SVMs using the algorithm and hyper-parameters from
traditional R-CNN.
"""
import
_init_paths
from
fast_rcnn.config
import
cfg
,
cfg_from_file
from
datasets.factory
import
get_imdb
...
...
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