Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized and restructured BASNet model and loss #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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