提交 53a470ed 编写于 作者: R Ross Girshick

tool script docstrings

上级 a25ae1d7
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""Compress a Fast R-CNN network using truncated SVD."""
import _init_paths import _init_paths
import caffe import caffe
import argparse import argparse
...@@ -14,9 +16,7 @@ import numpy as np ...@@ -14,9 +16,7 @@ import numpy as np
import os, sys import os, sys
def parse_args(): def parse_args():
""" """Parse input arguments."""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Compress a Fast R-CNN network') parser = argparse.ArgumentParser(description='Compress a Fast R-CNN network')
parser.add_argument('--def', dest='prototxt', parser.add_argument('--def', dest='prototxt',
help='prototxt file defining the uncompressed network', help='prototxt file defining the uncompressed network',
...@@ -36,8 +36,7 @@ def parse_args(): ...@@ -36,8 +36,7 @@ def parse_args():
return args return args
def compress_weights(W, l): 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. using truncated SVD.
Parameters: Parameters:
......
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""
Demo script showing detections in sample images.
See README.md for installation instructions before running.
"""
import _init_paths import _init_paths
from fast_rcnn.config import cfg from fast_rcnn.config import cfg
from fast_rcnn.test import im_detect from fast_rcnn.test import im_detect
......
#!/usr/bin/env python #!/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 import _init_paths
from fast_rcnn.test import apply_nms from fast_rcnn.test import apply_nms
from fast_rcnn.config import cfg from fast_rcnn.config import cfg
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""Test a Fast R-CNN network on an image database."""
import _init_paths import _init_paths
from fast_rcnn.test import test_net from fast_rcnn.test import test_net
from fast_rcnn.config import cfg, cfg_from_file from fast_rcnn.config import cfg, cfg_from_file
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""Train a Fast R-CNN network on a region of interest database."""
import _init_paths import _init_paths
from fast_rcnn.train import get_training_roidb, train_net from fast_rcnn.train import get_training_roidb, train_net
from fast_rcnn.config import cfg, cfg_from_file, get_output_dir from fast_rcnn.config import cfg, cfg_from_file, get_output_dir
......
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
# Written by Ross Girshick # Written by Ross Girshick
# -------------------------------------------------------- # --------------------------------------------------------
"""
Train post-hoc SVMs using the algorithm and hyper-parameters from
traditional R-CNN.
"""
import _init_paths import _init_paths
from fast_rcnn.config import cfg, cfg_from_file from fast_rcnn.config import cfg, cfg_from_file
from datasets.factory import get_imdb from datasets.factory import get_imdb
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册