Commit 53a470ed authored by Ross Girshick's avatar Ross Girshick

tool script docstrings

parent a25ae1d7
......@@ -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:
......
......@@ -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
......
#!/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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment