There is still some work to be done.
- ResNet101 backbone is good to go, but FPN backbone still need debugging.
- ImageNet pretrained weights of backbone is ok, works need on COCO pretrained weights of the whole model
- refined documentation and examples
pip install cffi Pillow easydict
Choose your GPU architecture, e.g. sm_62 for Titan XP , then run
python .\libs\build_libs.py sm_62
architectures | capabilities | example GPU |
---|---|---|
sm_30, sm_32 | Basic features + Keplersupport +Unified memory programming | |
sm_35 | + Dynamic parallelism support | |
sm_50, sm_52, sm_53 | + Maxwell support | M40 |
sm_60, sm_61, sm_62 | + Pascal support | Titan XP, 1080(Ti), 1070 |
sm_70 | + Volta support | V100 |
import sys
# add this project's root directory to PATH
sys.path.append("/home/geeshang/mask-rcnn-pytorch/")
from maskrcnn import MaskRCNN
from torch.utils.data import Dataset
# use pretrained weights:
# 1) "imagenet", just backbone feature map extractor trained on ImageNet.
# 2) "coco", whole maskrcnn model pretrained on COCO.
mask_rcnn = MaskRCNN(num_classes=80, pretrained="imagenet")
class OneDataset(Dataset):
def __init__(self):
pass
def __getitem__(self, item):
pass
def __len__(self):
pass
def train():
pass
def test():
pass
Source directories are arranged according to internal models or execution process of Mask R-CNN model, trying to decouple these models or processes to make it easy for adding experimental variants.
Several feature map extractor backbones support Mask R-CNN, like ResNet-101-FPN.
RoI(Region of Interest) proposal model, like RPN and variants.
Pooling for fixed dimensional representation, like RoIAlign and some variants.
Predict heads include classification head, bounding box head, mask head and their variants.
Some utils like function to calculate iou, and visualization tools.
Unittests and sanity checks.
Some third-party libs this project based on.