How to implement soft-IoU loss?

I think this paper.
DeepRoadMapper: Extracting Road Topology from Aerial Images
http://openaccess.thecvf.com/content_ICCV_2017/papers/Mattyus_DeepRoadMapper_Extracting_Road_ICCV_2017_paper.pdf