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

Create a summary section at the top or end of the notebooks #20

Open
sebherbert opened this issue May 24, 2024 · 0 comments
Open

Create a summary section at the top or end of the notebooks #20

sebherbert opened this issue May 24, 2024 · 0 comments

Comments

@sebherbert
Copy link

Suggestion:
To improve keeping track of what each notebook is doing and why, a summary of each notebook could be added at the top or end of each notebook. For example the Semantic segmentation notebook could contain a single cell stating something along the lines of merging all the section names.

  • the objective:
    Our goal is to produce a model that can take an image as input and produce a segmented equivalent image
  • the method:
    1 - You have already implemented a U-Net architecture in the previous exercise. We will use it as a starting point for this exercise. You should also already have the dataset and the dataloader implemented, along with a simple train loop with MSELoss.
    2 - One of the most important parts of training a model is evaluating it. We need to know how well our model is doing and if it is improving.
    We will start by implementing a metric to evaluate our model. Evaluation is always specific to the task, in this case semantic segmentation.
    We will use the Dice Coefficient to evaluate the network predictions.
    We can use it for validation if we interpret set $a$ as predictions and $b$ as labels. It is often used to evaluate segmentations with sparse foreground, because the denominator normalizes by the number of foreground pixels. The Dice Coefficient is closely related to Jaccard Index / Intersection over Union.
    3 - Often our models will perform better on the evaluation dataset if we augment our training data.
    This is because the model will be exposed to a wider variety of data that will hopefully help cover the full distribution of data in the validation set. We will use the torchvision.transforms
    to augment our data.
    4 - The next step to do would be to improve our loss function - the metric that tells us how close we are to the desired output. This metric should be differentiable, since this is the value to be backpropagated. The are multiple losses we could use for the segmentation task.
    Take a moment to think which one is better to use. If you are not sure, don't forget that you can always google! Before you start implementing the loss yourself, take a look at the losses already implemented in PyTorch. You can also look for implementations on GitHub.

(Here specifically I would add a line about how to choose each Loss function, Optimizer, final activation function and insist on their interplay - but maybe it was a bit unclear to me because the day was cut short)

I hope this can be useful :)

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

No branches or pull requests

1 participant