xuebinqin / BASNet

Code for CVPR 2019 paper. BASNet: Boundary-Aware Salient Object Detection
MIT License
1.39k stars 251 forks source link

Optimized and restructured BASNet model and loss #67

Open DheerajMadda opened 1 year ago

DheerajMadda commented 1 year ago

1) Optimized the loss function, removed For-Loop for calculating IoU and used torchmetrics for SSIM. 2) Restructured the BASNet model definition for better readability + removed unnecessary computations of side outputs (Sup1, Sup2, Sup3, Sup4, Sup5, Sup6) for model in "Eval Mode". 3) Created a BASNet_Lite model with MobileNetv3-Large encoder, that follows the restructured script same as 2).

BASNet Base (Resnet34 encoder) Information: Model Size = ~332 MB Number of Parameters = ~87 Million FLOPs = ~195 GFLOPs

BASNet Lite (MobileNetv3-Large encoder) Information: Model Size = ~15 MB Number of Parameters = ~3.9 Million FLOPs = ~4.1 GFLOPs

image basnet_results_comparison