Created
November 13, 2020 13:40
-
-
Save vpeopleonatank/149b79b96ccad4fd1e212170454c1ef3 to your computer and use it in GitHub Desktop.
mask-rcnn mmdetection config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place file config in a folder in {MMDETECTION_ROOT}/configs | |
_base_ = [ | |
'../_base_/models/mask_rcnn_r50_fpn.py', | |
'../_base_/datasets/coco_instance.py', | |
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' | |
] | |
# Use r101 model | |
model = dict( | |
pretrained='torchvision://resnet101', | |
backbone=dict(depth=101), | |
roi_head=dict( | |
bbox_head=dict(num_classes=2), | |
mask_head=dict(num_classes=2))) | |
classes = ('lefthand', 'righthand') | |
data_root = '/content/drive/My Drive/Data/HandData/egohands_mask_rcnn/' | |
data = dict( | |
train=dict( | |
ann_file=data_root + 'annotations/train_handdatafull.json', | |
img_prefix=data_root + 'train/', | |
classes=classes | |
), | |
val=dict( | |
ann_file=data_root + 'annotations/val_handdatafull.json', | |
img_prefix=data_root + 'val/', | |
classes=classes | |
), | |
test=dict( | |
ann_file=data_root + 'annotations/test_handdatafull.json', | |
img_prefix=data_root + 'test/', | |
classes=classes | |
)) | |
# in case you want to use mask r101 pretrain | |
load_from = 'http://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r101_fpn_1x_coco/mask_rcnn_r101_fpn_1x_coco_20200204-1efe0ed5.pth' # noqa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment