Skip to content

Commit

Permalink
train (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
longcw committed Feb 10, 2017
1 parent f21efb5 commit 1e5e70d
Show file tree
Hide file tree
Showing 42 changed files with 22,576 additions and 120 deletions.
32 changes: 32 additions & 0 deletions experiments/cfgs/faster_rcnn_end2end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
EXP_DIR: faster_rcnn_end2end
LOG_DIR: faster_rcnn_voc
IS_MULTISCALE: False
NET_NAME: VGGnet
ANCHOR_SCALES: [8, 16, 32]
NCLASSES: 21
TRAIN:
OHEM: False
RPN_BATCHSIZE: 300
BATCH_SIZE: 300
LOG_IMAGE_ITERS: 100
DISPLAY: 10
SNAPSHOT_ITERS: 5000
HAS_RPN: True
LEARNING_RATE: 0.0001
MOMENTUM: 0.9
GAMMA: 0.1
STEPSIZE: 60000
IMS_PER_BATCH: 1
BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True
RPN_POSITIVE_OVERLAP: 0.7
RPN_BATCHSIZE: 256
PROPOSAL_METHOD: gt
BG_THRESH_LO: 0.0
PRECLUDE_HARD_SAMPLES: True
BBOX_INSIDE_WEIGHTS: [1, 1, 1, 1]
RPN_BBOX_INSIDE_WEIGHTS: [1, 1, 1, 1]
RPN_POSITIVE_WEIGHT: -1.0
FG_FRACTION: 0.3
WEIGHT_DECAY: 0.0005
TEST:
HAS_RPN: True
48 changes: 48 additions & 0 deletions faster_rcnn/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------

# TODO: make this fold self-contained, only depends on utils package

from .imdb import imdb
from .pascal_voc import pascal_voc
from .pascal3d import pascal3d
from .imagenet3d import imagenet3d
from .kitti import kitti
from .kitti_tracking import kitti_tracking
from .nissan import nissan
from .nthu import nthu
from . import factory

## NOTE: obsolete
import os.path as osp
from .imdb import ROOT_DIR
from .imdb import MATLAB

# http:https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
def _which(program):
import os
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)

fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file

return None
"""
if _which(MATLAB) is None:
msg = ("MATLAB command '{}' not found. "
"Please add '{}' to your PATH.").format(MATLAB, MATLAB)
raise EnvironmentError(msg)
"""
Loading

0 comments on commit 1e5e70d

Please sign in to comment.