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
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