Comments (15)
Hi,
This is a pytorch-lightning error. Basically, you just need to pass n_devices
argument to the pl.Trainer
to fix this.
from cellseg_models.pytorch.
Thank you for your help. But I seem to have encountered another problem. How to import a trained model into prediction。
When I use the following code
experiment = experiment.load_state_dict(torch.load('./version_0/checkpoints/epoch=149-step=49800.ckpt'))
from cellseg_models.pytorch.
Can you be a bit more specific so I can get a hang of what you're trying to achieve. In general, you should not try to load the state dict to theSegmentationExperiment
object. Instead, you should load the weights into a nn.Module
object and use that as an input to the SegmentationExperiment
from cellseg_models.pytorch.
I have already solved this problem. I would like to ask how to save the best model results on the validation set. In addition, may I ask you how to validate a test set? Thank you very much.
from cellseg_models.pytorch.
You can save your checkpoints with pytorch-lightning ModelCheckpoint
class. Ory ou can just add a ckpt_path
to the trainenr.fit
method: trainer.fit(model, ckpt_path="some/path/to/my_checkpoint.ckpt")
. Check out the lightning checkpointing documentation: https://lightning.ai/docs/pytorch/stable/common/checkpointing_intermediate.html
from cellseg_models.pytorch.
For benchmarking: see this benchmarking notebook: https://github.com/okunator/cellseg_models.pytorch/blob/main/examples/pannuke_cellpose_benchmark.ipynb
from cellseg_models.pytorch.
Thank you very much. I'm going to learn now
from cellseg_models.pytorch.
Hello, I'm training pannuke_nuclei_segmentation_stardist.ipynb, I found that you have enhanced the data used for images and masks. The first dimension of the mask is a cell count map, and the second dimension is a nuclear category map. However, the first dimension is used in your code. Is there a problem?
from cellseg_models.pytorch.
Should we use a second dimensional cell category mask instead of a cell technology mask?
from cellseg_models.pytorch.
I trained 150 epochs using default parameters, and the test results seemed very unsatisfactory.pannuke_nuclei_segmentation_stardist.ipynb
from cellseg_models.pytorch.
Hello, I'm training pannuke_nuclei_segmentation_stardist.ipynb, I found that you have enhanced the data used for images and masks. The first dimension of the mask is a cell count map, and the second dimension is a nuclear category map. However, the first dimension is used in your code. Is there a problem?
No there is not a problem, the data flow is such that the instance mask and the semantic masks are transformed separately since they require different kinds of transformations. I'm not quite sure what you mean about enhancing data but applying augmentations during the data loading is a routine practice and if you wish to not use augmentations you don't have to
from cellseg_models.pytorch.
I trained 150 epochs using default parameters, and the test results seemed very unsatisfactory.pannuke_nuclei_segmentation_stardist.ipynb
Stardist is not easy to train on multi-class problems and requires a lot of regularization or other bias mitigation since the learning of the radial distance maps dominate the gradient updates during training. You might want to try out cellpose or hover-net instead for pannuke data.
from cellseg_models.pytorch.
Thank you for your help
from cellseg_models.pytorch.
Hello, but I used the training set to test indicators and found that there are two categories that are also 0. Is there any problem?
from cellseg_models.pytorch.
No, it just mean that the model did not learn to recognize those categories.
from cellseg_models.pytorch.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cellseg_models.pytorch.