diff --git a/docs/installation.md b/docs/installation.md index d2f6a9f..cd47231 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -52,6 +52,9 @@ This should display the different options you can choose from MemBrain, like "se ## Step 5: Download pre-trained segmentation model (optional) We recommend to use denoised (ideally Cryo-CARE1) tomograms for segmentation. However, our current best model is available for download [here](https://drive.google.com/file/d/1tSQIz_UCsQZNfyHg0RxD-4meFgolszo8/view?usp=sharing) and should also work on non-denoised data. Please let us know how it works for you. + +NOTE: Previous model files are not compatible with MONAI v1.3.0 or higher. So if you're using v1.3.0 or higher, consider downgrading to MONAI v1.2.0 or downloading this [adapted version](https://drive.google.com/file/d/1Tfg2Ju-cgSj_71_b1gVMnjqNYea7L1Hm/view?usp=sharing) of our most recent model file. + If the given model does not work properly, you may want to try one of our previous versions: Other (older) model versions: @@ -65,3 +68,16 @@ Once downloaded, you can use it in MemBrain-seg's [Segmentation](./Usage/Segment ``` [1] T. -O. Buchholz, M. Jordan, G. Pigino and F. Jug, "Cryo-CARE: Content-Aware Image Restoration for Cryo-Transmission Electron Microscopy Data," 2019 IEEE 16th International Symposium on Biomedical Imaging (ISBI 2019), Venice, Italy, 2019, pp. 502-506, doi: 10.1109/ISBI.2019.8759519. ``` + + +# Troubleshooting +Here is a collection of common issues and how to fix them: + +- `RuntimeError: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has +been compiled with your version of the CUDA driver.` + + The latest Pytorch versions require higher CUDA versions that may not be installed on your system yet. You can either install the new CUDA version or (maybe easier) downgrade Pytorch to a version that is compatible: + + `pip uninstall torch` + + `pip install torch==2.0.1` \ No newline at end of file diff --git a/src/membrain_seg/segmentation/segment.py b/src/membrain_seg/segmentation/segment.py index e44a327..f5ccda0 100644 --- a/src/membrain_seg/segmentation/segment.py +++ b/src/membrain_seg/segmentation/segment.py @@ -78,8 +78,9 @@ def segment( device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # Initialize the model and load trained weights from checkpoint - pl_model = SemanticSegmentationUnet() - pl_model = pl_model.load_from_checkpoint(model_checkpoint, map_location=device) + pl_model = SemanticSegmentationUnet.load_from_checkpoint( + model_checkpoint, map_location=device, strict=False + ) pl_model.to(device) # Preprocess the new data