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

Re-train ivadomed models with nnUNet #771

Closed
hermancollin opened this issue Nov 1, 2023 · 8 comments
Closed

Re-train ivadomed models with nnUNet #771

hermancollin opened this issue Nov 1, 2023 · 8 comments
Labels
dependencies Pull requests that update a dependency file feature category: the change introduces a new functionality to AxonDeepSeg models context

Comments

@hermancollin
Copy link
Member

We need to re-train our models using nnUNet and compare performance with ivadomed. There are already scripts to convert microscopy BIDS dataset to nnunetv2 format (e.g. https://github.com/axondeepseg/model_seg_rabbit_axon-myelin_bf).

Eventually, we would also like to aggregate all datasets and train on everything at once.

@hermancollin hermancollin added feature category: the change introduces a new functionality to AxonDeepSeg dependencies Pull requests that update a dependency file models context labels Nov 1, 2023
@hermancollin
Copy link
Member Author

@mathieuboudreau I'm thinking of the timeline for this. More and more people are showing interest in the nnunet models, especially the unmyelinated axon one. Instead of directing them to the other repo, it would be nice to implement everything in ADS. Should we wait for the ivadomed models to be re-trained to start the transition, or should we already start to add support for nnunet?

@mathieuboudreau
Copy link
Member

should we wait for the ivadomed models to be re-trained to start the transition,

Do you have a ballpark idea how long retraining the models would take? eg 1 day / 1 week / 1 month / etc?

@hermancollin
Copy link
Member Author

For every dataset, it should take 1-2 days. Some models could be trained in parallel, so everything could be done within a week.

@mathieuboudreau
Copy link
Member

If that's the case, and you expect it to go smoothly, I'd say lets just wait until we have them retrained on nnunet and then update ADS as a whole accordingly afterwards. That's a short enough timeframe that we can point our users to the temp repo and tell them that integrating it in ADS proper is in the works and coming out soon

@hermancollin
Copy link
Member Author

hermancollin commented Nov 9, 2023

Ok so here's an outline:

@hermancollin
Copy link
Member Author

Currently the only model left to train is the wakehealth model. Once this is done, we can combine the 4 datasets mentioned earlier with the VCU dataset (already in nnunet format with a model trained) and get one big model.

Here are some thoughts. The ivadomed models were each <100 Mb, which is in retrospect a big advantage over nnunet. We already somewhat discussed this and we agreed bigger models weren't a problem, but nnunet models will be heavier. A single nnunet model is >200 Mb, and all our results so far indicate that ensembling 3-5 folds is beneficial. This means each ensembled model would effectively be 600 Mb to >1 Gb large (more than all ivadomed models).

At this point, I would wait to see if the model trained on all datasets can be used instead of individual ones. When we have results over all 5 testing sets, we'll see if it's necessary to upload individual nnunet models. This could mean a 5x size reduction in total download for the user.

@hermancollin
Copy link
Member Author

hermancollin commented Apr 2, 2024

Update: the models were all retrained a few months ago. It is now time to upload everything on github. We don't know yet if these models will be downloaded by default by ADS, but they will still be accessible in the future. Here is a list of all dedicated models and their respective repo where we will put the checkpoints as release assets.

As a sidenote, the generalist models (both BF generalist and full generalist) will be available here: https://github.com/axondeepseg/model_seg_generalist. The full generalist model folds are already uploaded.

@hermancollin
Copy link
Member Author

hermancollin commented Apr 8, 2024

I'll also add the fold_all individual checkpoints in the same releases. Checklist with the corresponding release so I don't miss anything:

dedicated models


generalist models

The full ensembled model with 5 folds is suffixed with _ensemble and the fold_all model with _light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature category: the change introduces a new functionality to AxonDeepSeg models context
Projects
None yet
Development

No branches or pull requests

2 participants