Refine silhouettes produced by mask RCNN using the grabcut algorithm.
Install the following dependencies: opencv matplotlib
The input data requried is the sequence frames and the related RCNN silhouettes.
Use the following command to refine the silhouettes:
python refine_grabcut.py $IMAGE_FOLDER $SILHOUETTE_FOLDER $OUTPUT_FOLDER
Note: This is set up to work with the CASIA dataset which has the following file structure, subject/sequence/angle/frames.png. To use a different dataset either ensure it has the same file structure or modify line 65 of refine_grabcut.py to chnage the output folder to have the correct format.