Skip to content

Optimized and restructured BASNet model and loss#67

Open
DheerajMadda wants to merge 4 commits intoxuebinqin:masterfrom
DheerajMadda:master
Open

Optimized and restructured BASNet model and loss#67
DheerajMadda wants to merge 4 commits intoxuebinqin:masterfrom
DheerajMadda:master

Conversation

@DheerajMadda
Copy link

@DheerajMadda DheerajMadda commented Sep 7, 2023

  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

1) Optimized the loss function, removed for loop for calculating IoU and used torchmetrics for SSIM.
2) Restructured the BASNet model definition
3) Created a BASNet_Lite model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant