Generate masks for images using Mask-RCNN from matterport. Inputs a folder of images, and outputs a folder containing .npy numpy arrays with the masks for each image.
Follow directions from Mask-RCNN to download mask_rcnn_coco.h5
and pycocotools. I should have a version of pycocotools in the folder, but feel free to replace it if it doesn't work.
- Place wanted images in
/images/
- Run
python generate_masks.py
to create the masks. - To retrieve the masks from
/output_masks/
, use something likemask = np.load('output_masks/mask_262985539_1709e54576_z.npy')
.
lol I used two style transfers and combined their masks