Code Monkey home page Code Monkey logo

pytorch_brain_mri_segmentation's Introduction

Hi there ๐Ÿ‘‹

Skills

Programming Languages

Python C++ Arduino MATLAB LaTeX Markdown

Frameworks - Machine Learning

PyTorch PyTorch Lightning Keras Tensor Flow Scikit Learn ONNX

Frameworks - Others

ROS PySide2 Streamlit

Libraries

OpenCV Pillow Albumentations Numba Numpy Matplotolib Pandas

GitHub DVC Ubuntu Solidworks CARLA

Github Stats

Adamsyah's GitHub stats

Get in Touch

Website Linkedin Google Scholar GitHub

pytorch_brain_mri_segmentation's People

Contributors

fadamsyah avatar

Stargazers

 avatar

Watchers

 avatar

pytorch_brain_mri_segmentation's Issues

Questions about the code

Thanks for sharing your work. It is really cool.
In my opinion, there are some minor misktakes in your code about DiceLoss and Dicesccore.
As for the DiceLoss, i think the DiceLoss should be calculated by averaging the loss in the batch,which is more consistent with the definition of the DIceloss.
So i code this in the way as follows.
class Diceloss(nn.Module):
def init(self):
super().init()
def forward(self,prediction,target,smooth=1e-12):
assert prediction.shape==target.shape,'the dimensions of prediction and target do not match/diceloss'
batch_size=prediction.shape[0]
intersection=(prediction.view(batch_size,-1) * target.view(batch_size,-1)).sum(dim=1)
union=prediction.view(batch_size,-1).sum(dim=1)+target.view(batch_size,-1).sum(dim=1)
dice=(2*intersection+smooth)/(union+smooth)
dice_loss = 1 - dice
dice_loss=torch.mean(dice_loss)
return dice_loss

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.