Skip to content

Instantly share code, notes, and snippets.

View flagshipdynamics's full-sized avatar

Brandon Pippin flagshipdynamics

View GitHub Profile
@flagshipdynamics
flagshipdynamics / Apply CRF
Last active October 28, 2018 04:22
In this notebook I use Conditional Random Fields on the predicted masks. You can use it with your own submission and improve the score significantly by tinkering with this technique. Please refer the paper Conditional Random Fields as Recurrent Neura
"""
Function which returns the labelled image after applying CRF
"""
#Original_image = Image which has to labelled
#Mask image = Which has been labelled by some technique..
def crf(original_image, mask_img):
# Converting annotated image to RGB if it is Gray scale
if(len(mask_img.shape)<3):