cellfinder 1.1.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cellfinder might be problematic. Click here for more details.
- {cellfinder-1.1.1 → cellfinder-1.1.2}/PKG-INFO +3 -3
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/download/cli.py +2 -2
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/download/download.py +39 -10
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/prep.py +5 -5
- cellfinder-1.1.2/cellfinder/core/tools/source_files.py +27 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/PKG-INFO +3 -3
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/requires.txt +2 -2
- {cellfinder-1.1.1 → cellfinder-1.1.2}/pyproject.toml +2 -2
- cellfinder-1.1.1/cellfinder/core/tools/source_files.py +0 -9
- {cellfinder-1.1.1 → cellfinder-1.1.2}/.github/workflows/test_and_deploy.yml +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/.github/workflows/test_include_guard.yaml +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/.gitignore +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/.napari/config.yml +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/CITATION.cff +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/LICENSE +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/MANIFEST.in +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/README.md +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/cli_migration_warning.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/augment.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/classify.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/cube_generator.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/resnet.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/classify/tools.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/config/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/config/cellfinder.conf +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/detect.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/plane/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/plane/classical_filter.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/plane/plane_filter.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/plane/tile_walker.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/setup_filters.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/ball_filter.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/structure_detection.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/structure_splitting.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/volume_filter.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/download/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/download/models.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/main.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/IO.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/array_operations.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/geometry.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/image_processing.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/system.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/tf.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/tiff.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/tools/tools.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/train/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/train/train_yml.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/types.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/curation.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/detect/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/detect/detect.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/detect/detect_containers.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/detect/thread_worker.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/images/brainglobe.png +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/input_container.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/napari.yaml +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/sample_data.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/train/__init__.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/train/train.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/train/train_containers.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/napari/utils.py +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/SOURCES.txt +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/dependency_links.txt +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/entry_points.txt +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder.egg-info/top_level.txt +0 -0
- {cellfinder-1.1.1 → cellfinder-1.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cellfinder
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Automated 3D cell detection in large microscopy images
|
|
5
5
|
Author-email: "Adam Tyson, Christian Niedworok, Charly Rousseau" <code@adamltyson.com>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -22,8 +22,8 @@ Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: brainglobe-utils
|
|
26
|
-
Requires-Dist: brainglobe-napari-io
|
|
25
|
+
Requires-Dist: brainglobe-utils>=0.4.2
|
|
26
|
+
Requires-Dist: brainglobe-napari-io>=0.3.4
|
|
27
27
|
Requires-Dist: dask[array]
|
|
28
28
|
Requires-Dist: fancylog>=0.0.7
|
|
29
29
|
Requires-Dist: natsort
|
|
@@ -3,7 +3,7 @@ from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
from cellfinder.core.download import models
|
|
6
|
-
from cellfinder.core.download.download import
|
|
6
|
+
from cellfinder.core.download.download import amend_user_configuration
|
|
7
7
|
|
|
8
8
|
home = Path.home()
|
|
9
9
|
DEFAULT_DOWNLOAD_DIRECTORY = home / ".cellfinder"
|
|
@@ -65,7 +65,7 @@ def main():
|
|
|
65
65
|
model_path = models.main(args.model, args.install_path)
|
|
66
66
|
|
|
67
67
|
if not args.no_amend_config:
|
|
68
|
-
|
|
68
|
+
amend_user_configuration(new_model_path=model_path)
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
if __name__ == "__main__":
|
|
@@ -7,8 +7,8 @@ from brainglobe_utils.general.config import get_config_obj
|
|
|
7
7
|
from brainglobe_utils.general.system import disk_free_gb
|
|
8
8
|
|
|
9
9
|
from cellfinder.core.tools.source_files import (
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
default_configuration_path,
|
|
11
|
+
user_specific_configuration_path,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
|
|
@@ -75,16 +75,45 @@ def download(
|
|
|
75
75
|
os.remove(download_path)
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
def
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
new_config = source_custom_config_cellfinder()
|
|
83
|
-
if new_model_path is not None:
|
|
84
|
-
write_model_to_cfg(new_model_path, original_config, new_config)
|
|
78
|
+
def amend_user_configuration(new_model_path=None) -> None:
|
|
79
|
+
"""
|
|
80
|
+
Amends the user configuration to contain the configuration
|
|
81
|
+
in new_model_path, if specified.
|
|
85
82
|
|
|
83
|
+
Parameters
|
|
84
|
+
----------
|
|
85
|
+
new_model_path : str, optional
|
|
86
|
+
The path to the new model configuration.
|
|
87
|
+
"""
|
|
88
|
+
print("(Over-)writing custom user configuration")
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
original_config = default_configuration_path()
|
|
91
|
+
new_config = user_specific_configuration_path()
|
|
92
|
+
if new_model_path is not None:
|
|
93
|
+
write_model_to_config(new_model_path, original_config, new_config)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def write_model_to_config(new_model_path, orig_config, custom_config):
|
|
97
|
+
"""
|
|
98
|
+
Update the model path in the custom configuration file, by
|
|
99
|
+
reading the lines in the original configuration file, replacing
|
|
100
|
+
the line starting with "model_path =" and writing these
|
|
101
|
+
lines to the custom file.
|
|
102
|
+
|
|
103
|
+
Parameters
|
|
104
|
+
----------
|
|
105
|
+
new_model_path : str
|
|
106
|
+
The new path to the model.
|
|
107
|
+
orig_config : str
|
|
108
|
+
The path to the original configuration file.
|
|
109
|
+
custom_config : str
|
|
110
|
+
The path to the custom configuration file to be created.
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
None
|
|
115
|
+
|
|
116
|
+
"""
|
|
88
117
|
config_obj = get_config_obj(orig_config)
|
|
89
118
|
model_conf = config_obj["model"]
|
|
90
119
|
orig_path = model_conf["model_path"]
|
|
@@ -14,8 +14,8 @@ from brainglobe_utils.general.system import get_num_processes
|
|
|
14
14
|
import cellfinder.core.tools.tf as tf_tools
|
|
15
15
|
from cellfinder.core import logger
|
|
16
16
|
from cellfinder.core.download import models as model_download
|
|
17
|
-
from cellfinder.core.download.download import
|
|
18
|
-
from cellfinder.core.tools.source_files import
|
|
17
|
+
from cellfinder.core.download.download import amend_user_configuration
|
|
18
|
+
from cellfinder.core.tools.source_files import user_specific_configuration_path
|
|
19
19
|
|
|
20
20
|
home = Path.home()
|
|
21
21
|
DEFAULT_INSTALL_PATH = home / ".cellfinder"
|
|
@@ -49,18 +49,18 @@ def prep_models(
|
|
|
49
49
|
if model_weights_path is None:
|
|
50
50
|
logger.debug("No model supplied, so using the default")
|
|
51
51
|
|
|
52
|
-
config_file =
|
|
52
|
+
config_file = user_specific_configuration_path()
|
|
53
53
|
|
|
54
54
|
if not Path(config_file).exists():
|
|
55
55
|
logger.debug("Custom config does not exist, downloading models")
|
|
56
56
|
model_path = model_download.main(model_name, install_path)
|
|
57
|
-
|
|
57
|
+
amend_user_configuration(new_model_path=model_path)
|
|
58
58
|
|
|
59
59
|
model_weights = get_model_weights(config_file)
|
|
60
60
|
if not model_weights.exists():
|
|
61
61
|
logger.debug("Model weights do not exist, downloading")
|
|
62
62
|
model_path = model_download.main(model_name, install_path)
|
|
63
|
-
|
|
63
|
+
amend_user_configuration(new_model_path=model_path)
|
|
64
64
|
model_weights = get_model_weights(config_file)
|
|
65
65
|
else:
|
|
66
66
|
model_weights = Path(model_weights_path)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def default_configuration_path():
|
|
5
|
+
"""
|
|
6
|
+
Returns the default configuration path for cellfinder.
|
|
7
|
+
|
|
8
|
+
Returns:
|
|
9
|
+
Path: The default configuration path.
|
|
10
|
+
"""
|
|
11
|
+
return Path(__file__).parent.parent / "config" / "cellfinder.conf"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def user_specific_configuration_path():
|
|
15
|
+
"""
|
|
16
|
+
Returns the path to the user-specific configuration file for cellfinder.
|
|
17
|
+
|
|
18
|
+
This function returns the path to the user-specific configuration file
|
|
19
|
+
for cellfinder. The user-specific configuration file is located in the
|
|
20
|
+
user's home directory under the ".cellfinder" folder and is named
|
|
21
|
+
"cellfinder.conf.custom".
|
|
22
|
+
|
|
23
|
+
Returns:
|
|
24
|
+
Path: The path to the custom configuration file.
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
return Path.home() / ".cellfinder" / "cellfinder.conf.custom"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cellfinder
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Automated 3D cell detection in large microscopy images
|
|
5
5
|
Author-email: "Adam Tyson, Christian Niedworok, Charly Rousseau" <code@adamltyson.com>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -22,8 +22,8 @@ Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
|
22
22
|
Requires-Python: >=3.9
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: brainglobe-utils
|
|
26
|
-
Requires-Dist: brainglobe-napari-io
|
|
25
|
+
Requires-Dist: brainglobe-utils>=0.4.2
|
|
26
|
+
Requires-Dist: brainglobe-napari-io>=0.3.4
|
|
27
27
|
Requires-Dist: dask[array]
|
|
28
28
|
Requires-Dist: fancylog>=0.0.7
|
|
29
29
|
Requires-Dist: natsort
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/plane/classical_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/structure_detection.py
RENAMED
|
File without changes
|
{cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/structure_splitting.py
RENAMED
|
File without changes
|
{cellfinder-1.1.1 → cellfinder-1.1.2}/cellfinder/core/detect/filters/volume/volume_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|