This is an implementation of Mask R-CNN on Python 3, Keras, and TensorFlow. The model generates bounding boxes and segmentation masks for each instance of an object in the image. It's based on Feature Pyramid Network (FPN) and a ResNet101 backbone.
From the Releases page page:
- Download
mask_rcnn_balloon.h5
. Save it in the root directory of the repo (themask_rcnn
directory). - Create "datasets" folder in the root directory, and then create two new folders "tarin" and "val" in it.
- Open VGg image annotator.zip and mark the cavity position in the picture with the annotation software.Put the pictures of the training set and the corresponding JSON into the train folder, and put the pictures of the verification set and the corresponding JSON into the Val folder.
Train a new model starting from pre-trained COCO weights
python3 balloon.py train --dataset=/path/to/dataset --weights=coco
Resume training a model that you had trained earlier
python3 balloon.py train --dataset=/path/to/dataset --weights=last
Put the model from the previous training into the demo_ Test file can predict the location of the cavity.