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

Add support for training #159

Merged
merged 11 commits into from
Feb 4, 2024
Merged

Add support for training #159

merged 11 commits into from
Feb 4, 2024

Conversation

wolny
Copy link
Collaborator

@wolny wolny commented Jun 20, 2023

  • add support to embedding networks during prediction (convert embeddings to affinities before segmentation step)
  • add dense training support
  • test dense training
  • support training from headless with --config option
  • make sure that trained model can be added as custom model in PlantSeg

Currently only dense training is supported where the user select the dataset directory. It is expected that the DATASET_DIR contains train and val subdirectories, where the training and validation h5 files can be found. In order to support training from exported proofreading, we could e.g. create an additional metadata file inside the DATASET_DIR, which can be parsed for creating the loaders.

The outcome of the training is the model files (config_train.yml, best_checkpoint.pytorch, 'last_checkpoint.pytorch`) saved inside the directory specified by he user.

@wolny
Copy link
Collaborator Author

wolny commented Jan 4, 2024

Hey @lorenzocerrone, I'd say this PR is good to go and we can move forward to combining it with your dataset management functionality in #161.

Quick update: I've removed the training widget from GUI and allow the training in the headless mode only, so that this branch doesn't impact any of the current functionalities and it's safe to merge. Training the model headless and then using it in napari gui works already, but would be great to have it properly integrated with the dataset management :)

@lorenzocerrone
Copy link
Collaborator

Looks good! Let’s have a minor release, and plan a major one by the end of January when the dataset manager and the docs are ready :)

@wolny wolny merged commit 02ffea4 into master Feb 4, 2024
1 check passed
@wolny wolny deleted the add_training branch February 4, 2024 21:27
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.

None yet

2 participants