deepflash2
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: deepflash2 | ||
| Version: 0.1.7 | ||
| Version: 0.1.8 | ||
| Summary: A Deep learning pipeline for segmentation of fluorescent labels in microscopy images | ||
@@ -22,6 +22,7 @@ Home-page: https://github.com/matjesg/deepflash2 | ||
| # Title | ||
| # Welcome to | ||
|  | ||
@@ -127,10 +128,10 @@ | ||
| We recommend installation into a clean Python environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| We recommend installation into a clean Python 3.7, 3.8, or 3.9 environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| #### [conda](https://docs.conda.io/en/latest/)/[mamba](https://github.com/mamba-org/mamba) | ||
| #### [mamba](https://github.com/mamba-org/mamba)/[conda](https://docs.conda.io/en/latest/) | ||
| If you replace `conda` with `mamba` the install process will be much faster and more reliable (you need to install [mamba](https://github.com/mamba-org/mamba) first): | ||
| Installation with mamba (installaton [instructions](https://github.com/mamba-org/mamba)) allows a fast and realiable installation process (you can replace `mamba` with `conda` and add the `--update-all` flag to do the installation with conda). | ||
| ```bash | ||
| conda install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| mamba install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| ``` | ||
@@ -137,0 +138,0 @@ |
@@ -12,3 +12,3 @@ pip | ||
| numba>=0.52.0 | ||
| opencv-python>=4.0 | ||
| segmentation_models_pytorch>=0.2 | ||
| segmentation-models-pytorch>=0.2 | ||
| opencv-python-headless<4.5.5,>=4.1.1 |
@@ -1,1 +0,1 @@ | ||
| __version__ = "0.1.7" | ||
| __version__ = "0.1.8" |
+23
-13
@@ -363,7 +363,11 @@ # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00_learner.ipynb (unless otherwise specified). | ||
| preproc_dir=preproc_dir, | ||
| stats=self.stats, | ||
| instance_labels=self.instance_labels, | ||
| n_classes=self.n_classes, | ||
| sample_mult=self.sample_mult if self.sample_mult>0 else None, verbose=0) | ||
| self.stats = stats or self.ds.stats | ||
| stats=self.stats, | ||
| normalize = True, | ||
| sample_mult=self.sample_mult if self.sample_mult>0 else None, | ||
| verbose=0, | ||
| **self.add_ds_kwargs) | ||
| self.stats = self.ds.stats | ||
| self.in_channels = self.ds.get_data(max_n=1)[0].shape[-1] | ||
@@ -554,2 +558,3 @@ self.df_val, self.df_ens, self.df_model, self.ood = None,None,None,None | ||
| self.models = {} | ||
| for i, m in enumerate(models,1): | ||
@@ -559,7 +564,12 @@ if i==0: self.n_classes = int(m.name.split('_')[2][0]) | ||
| self.models[i] = m | ||
| if len(self.models)>0: self.set_n(len(self.models)) | ||
| print(f'Found {len(self.models)} models in folder {path}') | ||
| print([m.name for m in self.models.values()]) | ||
| if len(self.models)>0: | ||
| self.set_n(len(self.models)) | ||
| print(f'Found {len(self.models)} models in folder {path}:') | ||
| print([m.name for m in self.models.values()]) | ||
| # Reset stats | ||
| print(f'Loading stats from {self.models[1].name}') | ||
| _, self.stats = load_smp_model(self.models[1]) | ||
| def get_ensemble_results(self, files, zarr_store=None, export_dir=None, filetype='.png', **kwargs): | ||
@@ -729,8 +739,8 @@ ep = EnsemblePredict(models_paths=self.models.values(), zarr_store=zarr_store) | ||
| def clear_tmp(self): | ||
| try: | ||
| shutil.rmtree('/tmp/*', ignore_errors=True) | ||
| shutil.rmtree(self.path/'.tmp') | ||
| print(f'Deleted temporary files from {self.path/".tmp"}') | ||
| except: print(f'No temporary files to delete at {self.path/".tmp"}') | ||
| #def clear_tmp(self): | ||
| # try: | ||
| # shutil.rmtree('/tmp/*', ignore_errors=True) | ||
| # shutil.rmtree(self.path/'.tmp') | ||
| # print(f'Deleted temporary files from {self.path/".tmp"}') | ||
| # except: print(f'No temporary files to delete at {self.path/".tmp"}') | ||
@@ -755,3 +765,3 @@ # Cell | ||
| export_cellpose_rois='Export cellpose predictions to ImageJ ROI Sets in `ouput_folder`', | ||
| clear_tmp="Clear directory with temporary files" | ||
| #clear_tmp="Clear directory with temporary files" | ||
| ) |
@@ -12,2 +12,3 @@ # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_models.ipynb (unless otherwise specified). | ||
| from fastdownload import download_url | ||
| from fastprogress import progress_bar | ||
| from pathlib import Path | ||
@@ -68,3 +69,5 @@ import sys, subprocess | ||
| stats = model_dict.pop('stats') | ||
| model = create_smp_model(**model_dict) | ||
| # Ensure that no pretrained encoder weights are loaded | ||
| model_dict.pop('encoder_weights', None) | ||
| model = create_smp_model(**model_dict, encoder_weights=None, **kwargs) | ||
| model.load_state_dict(state, strict=strict) | ||
@@ -122,3 +125,3 @@ return model, stats | ||
| cp_masks = [] | ||
| for prob, mask in zip(probs, masks): | ||
| for prob, mask in progress_bar(zip(probs, masks), total=len(probs), leave=False): | ||
| cp_pred, _, _, _ = model.eval(prob, | ||
@@ -125,0 +128,0 @@ net_avg=True, |
+7
-6
| Metadata-Version: 2.1 | ||
| Name: deepflash2 | ||
| Version: 0.1.7 | ||
| Version: 0.1.8 | ||
| Summary: A Deep learning pipeline for segmentation of fluorescent labels in microscopy images | ||
@@ -22,6 +22,7 @@ Home-page: https://github.com/matjesg/deepflash2 | ||
| # Title | ||
| # Welcome to | ||
|  | ||
@@ -127,10 +128,10 @@ | ||
| We recommend installation into a clean Python environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| We recommend installation into a clean Python 3.7, 3.8, or 3.9 environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| #### [conda](https://docs.conda.io/en/latest/)/[mamba](https://github.com/mamba-org/mamba) | ||
| #### [mamba](https://github.com/mamba-org/mamba)/[conda](https://docs.conda.io/en/latest/) | ||
| If you replace `conda` with `mamba` the install process will be much faster and more reliable (you need to install [mamba](https://github.com/mamba-org/mamba) first): | ||
| Installation with mamba (installaton [instructions](https://github.com/mamba-org/mamba)) allows a fast and realiable installation process (you can replace `mamba` with `conda` and add the `--update-all` flag to do the installation with conda). | ||
| ```bash | ||
| conda install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| mamba install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| ``` | ||
@@ -137,0 +138,0 @@ |
+6
-5
@@ -1,5 +0,6 @@ | ||
| # Title | ||
| # Welcome to | ||
|  | ||
@@ -105,10 +106,10 @@ | ||
| We recommend installation into a clean Python environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| We recommend installation into a clean Python 3.7, 3.8, or 3.9 environment (e.g., using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)). | ||
| #### [conda](https://docs.conda.io/en/latest/)/[mamba](https://github.com/mamba-org/mamba) | ||
| #### [mamba](https://github.com/mamba-org/mamba)/[conda](https://docs.conda.io/en/latest/) | ||
| If you replace `conda` with `mamba` the install process will be much faster and more reliable (you need to install [mamba](https://github.com/mamba-org/mamba) first): | ||
| Installation with mamba (installaton [instructions](https://github.com/mamba-org/mamba)) allows a fast and realiable installation process (you can replace `mamba` with `conda` and add the `--update-all` flag to do the installation with conda). | ||
| ```bash | ||
| conda install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| mamba install -c fastchan -c conda-forge -c matjesg deepflash2 | ||
| ``` | ||
@@ -115,0 +116,0 @@ |
+5
-6
@@ -11,3 +11,3 @@ [DEFAULT] | ||
| branch = master | ||
| version = 0.1.7 | ||
| version = 0.1.8 | ||
| min_python = 3.6 | ||
@@ -19,5 +19,5 @@ audience = Developers | ||
| status = 2 | ||
| requirements = fastai>=2.1.7 zarr>=2.0 scikit-image imageio ipywidgets openpyxl albumentations>=1.0.0 natsort>=7.1.1 numba>=0.52.0 | ||
| pip_requirements = opencv-python>=4.0 segmentation_models_pytorch>=0.2 | ||
| conda_requirements = opencv>=4.0 segmentation-models-pytorch>=0.2 | ||
| requirements = fastai>=2.1.7 zarr>=2.0 scikit-image imageio ipywidgets openpyxl albumentations>=1.0.0 natsort>=7.1.1 numba>=0.52.0 segmentation-models-pytorch>=0.2 opencv-python-headless>=4.1.1,<4.5.5 | ||
| #pip_requirements = | ||
| #conda_requirements = | ||
| nbs_path = nbs | ||
@@ -32,3 +32,2 @@ doc_path = docs | ||
| tst_flags = slow | ||
| cell_spacing = 1 | ||
| cell_spacing = 1 |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
223681
0.37%3548
0.28%