Skip to content

Commit

Permalink
Merge pull request #1 from mahyarnajibi/rpn
Browse files Browse the repository at this point in the history
Rpn added
  • Loading branch information
bharatsingh430 committed Apr 14, 2018
2 parents ff9d37e + 80e445a commit 7f2c4a1
Show file tree
Hide file tree
Showing 8 changed files with 1,450 additions and 153 deletions.
154 changes: 154 additions & 0 deletions configs/faster/rpn_res101_mx_bn1.yml
@@ -0,0 +1,154 @@
---
MXNET_VERSION: "mxnet"
output_path: "./output/chips_rpn_resnet101_mx_bn"
proposal_path: "proposals"
symbol: resnet_mx_101_rpn
gpus: '0,1,2,3,4,5,6,7'
CLASS_AGNOSTIC: true
startMSTR: 9
IS_DPN: false
SCALES:
- !!python/tuple [800,1280]
- !!python/tuple [800,1280]
- !!python/tuple [800,1280]
default:
frequent: 100
kvstore: device
network:
deform: true
pretrained: "./data/pretrained_model/resnet_mx_101"
pretrained_epoch: 0
PIXEL_MEANS:
- 103.939
- 116.779
- 123.68
IMAGE_STRIDE: 0
RCNN_FEAT_STRIDE: 16
RPN_FEAT_STRIDE: 16
FIXED_PARAMS:
- conv0
- bn0
- stage1

FIXED_PARAMS_SHARED:
- conv0
- bn0
- stage1

ANCHOR_RATIOS:
- 0.5
- 1
- 2
ANCHOR_SCALES:
- 2
- 4
- 7
- 10
- 13
- 16
- 24
NUM_ANCHORS: 7
dataset:
NUM_CLASSES: 81
dataset: coco
dataset_path: "./data/coco"
image_set: minival2014 #train2014+valminusminival2014
root_path: "./data"
test_image_set: test-dev2015
proposal: rpn
TRAIN:
lr: 0.015 #0.002 #0.0005
lr_step: '4'
warmup: true
fp16: true
warmup_lr: 0.0005 #0.00005
wd: 0.0001
scale: 100.0
warmup_step: 9000 #4000 #1000
begin_epoch: 0
end_epoch: 5 #9
model_prefix: 'rcnn'
# whether resume training
RESUME: false
# whether flip image
FLIP: true
# whether shuffle image
SHUFFLE: true
# whether use OHEM
ENABLE_OHEM: true
# size of images for each device, 2 for rcnn, 1 for rpn and e2e
BATCH_IMAGES: 16
# e2e changes behavior of anchor loader and metric
END2END: false
# group images with similar aspect ratio
ASPECT_GROUPING: true
# R-CNN
# rcnn rois batch size
BATCH_ROIS: -1
BATCH_ROIS_OHEM: 256
# rcnn rois sampling params
FG_FRACTION: 0.25
FG_THRESH: 0.5
BG_THRESH_HI: 0.5
BG_THRESH_LO: 0.0
# rcnn bounding box regression params
BBOX_REGRESSION_THRESH: 0.5
BBOX_WEIGHTS:
- 1.0
- 1.0
- 1.0
- 1.0

# RPN anchor loader
# rpn anchors batch size
RPN_BATCH_SIZE: 256
# rpn anchors sampling params
RPN_FG_FRACTION: 0.5
RPN_POSITIVE_OVERLAP: 0.5
RPN_NEGATIVE_OVERLAP: 0.4
RPN_CLOBBER_POSITIVES: false
# rpn bounding box regression params
RPN_BBOX_WEIGHTS:
- 1.0
- 1.0
- 1.0
- 1.0
RPN_POSITIVE_WEIGHT: -1.0
# used for end2end training
# RPN proposal
CXX_PROPOSAL: false
RPN_NMS_THRESH: 0.7
RPN_PRE_NMS_TOP_N: 6000
RPN_POST_NMS_TOP_N: 300
RPN_MIN_SIZE: 0
# approximate bounding box regression
BBOX_NORMALIZATION_PRECOMPUTED: true
BBOX_MEANS:
- 0.0
- 0.0
- 0.0
- 0.0
BBOX_STDS:
- 0.1
- 0.1
- 0.2
- 0.2
TEST:
# use rpn to generate proposal
HAS_RPN: false
# size of images for each device
BATCH_IMAGES: 1
# RPN proposal
CXX_PROPOSAL: false
RPN_NMS_THRESH: 0.7
RPN_PRE_NMS_TOP_N: 6000
RPN_POST_NMS_TOP_N: 300
RPN_MIN_SIZE: 0
# RPN generate proposal
PROPOSAL_NMS_THRESH: 0.7
PROPOSAL_PRE_NMS_TOP_N: 20000
PROPOSAL_POST_NMS_TOP_N: 2000
PROPOSAL_MIN_SIZE: 0
# RCNN nms
NMS: 0.45
test_epoch: 7

0 comments on commit 7f2c4a1

Please sign in to comment.