Look at this implementation and other extension created from them at the bottom of the link github.com/matterport/Mask_RCNN. It will tell you how to retrain a model. In general, you need masked data to retrain a model. Some of the projects there will give you pointers on how to do it.