spacr 0.2.81__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
Files changed (75) hide show
  1. spacr/__init__.py +2 -1
  2. spacr/core.py +106 -11
  3. spacr/gui.py +3 -2
  4. spacr/gui_core.py +8 -4
  5. spacr/gui_utils.py +4 -1
  6. spacr/io.py +1 -1
  7. spacr/measure.py +4 -4
  8. spacr/mediar.py +366 -0
  9. spacr/plot.py +4 -1
  10. spacr/resources/MEDIAR/.git +1 -0
  11. spacr/resources/MEDIAR/.gitignore +18 -0
  12. spacr/resources/MEDIAR/LICENSE +21 -0
  13. spacr/resources/MEDIAR/README.md +189 -0
  14. spacr/resources/MEDIAR/SetupDict.py +39 -0
  15. spacr/resources/MEDIAR/config/baseline.json +60 -0
  16. spacr/resources/MEDIAR/config/mediar_example.json +72 -0
  17. spacr/resources/MEDIAR/config/pred/pred_mediar.json +17 -0
  18. spacr/resources/MEDIAR/config/step1_pretraining/phase1.json +55 -0
  19. spacr/resources/MEDIAR/config/step1_pretraining/phase2.json +58 -0
  20. spacr/resources/MEDIAR/config/step2_finetuning/finetuning1.json +66 -0
  21. spacr/resources/MEDIAR/config/step2_finetuning/finetuning2.json +66 -0
  22. spacr/resources/MEDIAR/config/step3_prediction/base_prediction.json +16 -0
  23. spacr/resources/MEDIAR/config/step3_prediction/ensemble_tta.json +23 -0
  24. spacr/resources/MEDIAR/core/BasePredictor.py +120 -0
  25. spacr/resources/MEDIAR/core/BaseTrainer.py +240 -0
  26. spacr/resources/MEDIAR/core/Baseline/Predictor.py +59 -0
  27. spacr/resources/MEDIAR/core/Baseline/Trainer.py +113 -0
  28. spacr/resources/MEDIAR/core/Baseline/__init__.py +2 -0
  29. spacr/resources/MEDIAR/core/Baseline/utils.py +80 -0
  30. spacr/resources/MEDIAR/core/MEDIAR/EnsemblePredictor.py +105 -0
  31. spacr/resources/MEDIAR/core/MEDIAR/Predictor.py +234 -0
  32. spacr/resources/MEDIAR/core/MEDIAR/Trainer.py +172 -0
  33. spacr/resources/MEDIAR/core/MEDIAR/__init__.py +3 -0
  34. spacr/resources/MEDIAR/core/MEDIAR/utils.py +429 -0
  35. spacr/resources/MEDIAR/core/__init__.py +2 -0
  36. spacr/resources/MEDIAR/core/utils.py +40 -0
  37. spacr/resources/MEDIAR/evaluate.py +71 -0
  38. spacr/resources/MEDIAR/generate_mapping.py +121 -0
  39. spacr/resources/MEDIAR/image/examples/img1.tiff +0 -0
  40. spacr/resources/MEDIAR/image/examples/img2.tif +0 -0
  41. spacr/resources/MEDIAR/image/failure_cases.png +0 -0
  42. spacr/resources/MEDIAR/image/mediar_framework.png +0 -0
  43. spacr/resources/MEDIAR/image/mediar_model.PNG +0 -0
  44. spacr/resources/MEDIAR/image/mediar_results.png +0 -0
  45. spacr/resources/MEDIAR/main.py +125 -0
  46. spacr/resources/MEDIAR/predict.py +70 -0
  47. spacr/resources/MEDIAR/requirements.txt +14 -0
  48. spacr/resources/MEDIAR/train_tools/__init__.py +3 -0
  49. spacr/resources/MEDIAR/train_tools/data_utils/__init__.py +1 -0
  50. spacr/resources/MEDIAR/train_tools/data_utils/custom/CellAware.py +88 -0
  51. spacr/resources/MEDIAR/train_tools/data_utils/custom/LoadImage.py +161 -0
  52. spacr/resources/MEDIAR/train_tools/data_utils/custom/NormalizeImage.py +77 -0
  53. spacr/resources/MEDIAR/train_tools/data_utils/custom/__init__.py +3 -0
  54. spacr/resources/MEDIAR/train_tools/data_utils/custom/modalities.pkl +0 -0
  55. spacr/resources/MEDIAR/train_tools/data_utils/datasetter.py +208 -0
  56. spacr/resources/MEDIAR/train_tools/data_utils/transforms.py +148 -0
  57. spacr/resources/MEDIAR/train_tools/data_utils/utils.py +84 -0
  58. spacr/resources/MEDIAR/train_tools/measures.py +200 -0
  59. spacr/resources/MEDIAR/train_tools/models/MEDIARFormer.py +102 -0
  60. spacr/resources/MEDIAR/train_tools/models/__init__.py +1 -0
  61. spacr/resources/MEDIAR/train_tools/utils.py +70 -0
  62. spacr/resources/MEDIAR_weights/.DS_Store +0 -0
  63. spacr/resources/icons/.DS_Store +0 -0
  64. spacr/resources/icons/plaque.png +0 -0
  65. spacr/resources/images/plate1_E01_T0001F001L01A01Z01C02.tif +0 -0
  66. spacr/resources/images/plate1_E01_T0001F001L01A02Z01C01.tif +0 -0
  67. spacr/resources/images/plate1_E01_T0001F001L01A03Z01C03.tif +0 -0
  68. spacr/settings.py +3 -1
  69. spacr/utils.py +10 -10
  70. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/METADATA +9 -1
  71. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/RECORD +75 -16
  72. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/LICENSE +0 -0
  73. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/WHEEL +0 -0
  74. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/entry_points.txt +0 -0
  75. {spacr-0.2.81.dist-info → spacr-0.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,102 @@
1
+ import torch
2
+ import torch.nn as nn
3
+
4
+ from segmentation_models_pytorch import MAnet
5
+ from segmentation_models_pytorch.base.modules import Activation
6
+
7
+ __all__ = ["MEDIARFormer"]
8
+
9
+
10
+ class MEDIARFormer(MAnet):
11
+ """MEDIAR-Former Model"""
12
+
13
+ def __init__(
14
+ self,
15
+ encoder_name="mit_b5", # Default encoder
16
+ encoder_weights="imagenet", # Pre-trained weights
17
+ decoder_channels=(1024, 512, 256, 128, 64), # Decoder configuration
18
+ decoder_pab_channels=256, # Decoder Pyramid Attention Block channels
19
+ in_channels=3, # Number of input channels
20
+ classes=3, # Number of output classes
21
+ ):
22
+ # Initialize the MAnet model with provided parameters
23
+ super().__init__(
24
+ encoder_name=encoder_name,
25
+ encoder_weights=encoder_weights,
26
+ decoder_channels=decoder_channels,
27
+ decoder_pab_channels=decoder_pab_channels,
28
+ in_channels=in_channels,
29
+ classes=classes,
30
+ )
31
+
32
+ # Remove the default segmentation head as it's not used in this architecture
33
+ self.segmentation_head = None
34
+
35
+ # Modify all activation functions in the encoder and decoder from ReLU to Mish
36
+ _convert_activations(self.encoder, nn.ReLU, nn.Mish(inplace=True))
37
+ _convert_activations(self.decoder, nn.ReLU, nn.Mish(inplace=True))
38
+
39
+ # Add custom segmentation heads for different segmentation tasks
40
+ self.cellprob_head = DeepSegmentationHead(
41
+ in_channels=decoder_channels[-1], out_channels=1
42
+ )
43
+ self.gradflow_head = DeepSegmentationHead(
44
+ in_channels=decoder_channels[-1], out_channels=2
45
+ )
46
+
47
+ def forward(self, x):
48
+ """Forward pass through the network"""
49
+ # Ensure the input shape is correct
50
+ self.check_input_shape(x)
51
+
52
+ # Encode the input and then decode it
53
+ features = self.encoder(x)
54
+ decoder_output = self.decoder(*features)
55
+
56
+ # Generate masks for cell probability and gradient flows
57
+ cellprob_mask = self.cellprob_head(decoder_output)
58
+ gradflow_mask = self.gradflow_head(decoder_output)
59
+
60
+ # Concatenate the masks for output
61
+ masks = torch.cat([gradflow_mask, cellprob_mask], dim=1)
62
+
63
+ return masks
64
+
65
+
66
+ class DeepSegmentationHead(nn.Sequential):
67
+ """Custom segmentation head for generating specific masks"""
68
+
69
+ def __init__(
70
+ self, in_channels, out_channels, kernel_size=3, activation=None, upsampling=1
71
+ ):
72
+ # Define a sequence of layers for the segmentation head
73
+ layers = [
74
+ nn.Conv2d(
75
+ in_channels,
76
+ in_channels // 2,
77
+ kernel_size=kernel_size,
78
+ padding=kernel_size // 2,
79
+ ),
80
+ nn.Mish(inplace=True),
81
+ nn.BatchNorm2d(in_channels // 2),
82
+ nn.Conv2d(
83
+ in_channels // 2,
84
+ out_channels,
85
+ kernel_size=kernel_size,
86
+ padding=kernel_size // 2,
87
+ ),
88
+ nn.UpsamplingBilinear2d(scale_factor=upsampling)
89
+ if upsampling > 1
90
+ else nn.Identity(),
91
+ Activation(activation) if activation else nn.Identity(),
92
+ ]
93
+ super().__init__(*layers)
94
+
95
+
96
+ def _convert_activations(module, from_activation, to_activation):
97
+ """Recursively convert activation functions in a module"""
98
+ for name, child in module.named_children():
99
+ if isinstance(child, from_activation):
100
+ setattr(module, name, to_activation)
101
+ else:
102
+ _convert_activations(child, from_activation, to_activation)
@@ -0,0 +1 @@
1
+ from .MEDIARFormer import *
@@ -0,0 +1,70 @@
1
+ import torch
2
+ import numpy as np
3
+ import os, json, random
4
+ from pprint import pprint
5
+
6
+ __all__ = ["ConfLoader", "directory_setter", "random_seeder", "pprint_config"]
7
+
8
+
9
+ class ConfLoader:
10
+ """
11
+ Load json config file using DictWithAttributeAccess object_hook.
12
+ ConfLoader(conf_name).opt attribute is the result of loading json config file.
13
+ """
14
+
15
+ class DictWithAttributeAccess(dict):
16
+ """
17
+ This inner class makes dict to be accessed same as class attribute.
18
+ For example, you can use opt.key instead of the opt['key'].
19
+ """
20
+
21
+ def __getattr__(self, key):
22
+ return self[key]
23
+
24
+ def __setattr__(self, key, value):
25
+ self[key] = value
26
+
27
+ def __init__(self, conf_name):
28
+ self.conf_name = conf_name
29
+ self.opt = self.__get_opt()
30
+
31
+ def __load_conf(self):
32
+ with open(self.conf_name, "r") as conf:
33
+ opt = json.load(
34
+ conf, object_hook=lambda dict: self.DictWithAttributeAccess(dict)
35
+ )
36
+ return opt
37
+
38
+ def __get_opt(self):
39
+ opt = self.__load_conf()
40
+ opt = self.DictWithAttributeAccess(opt)
41
+
42
+ return opt
43
+
44
+
45
+ def directory_setter(path="./results", make_dir=False):
46
+ """
47
+ Make dictionary if not exists.
48
+ """
49
+ if not os.path.exists(path) and make_dir:
50
+ os.makedirs(path) # make dir if not exist
51
+ print("directory %s is created" % path)
52
+
53
+ if not os.path.isdir(path):
54
+ raise NotADirectoryError(
55
+ "%s is not valid. set make_dir=True to make dir." % path
56
+ )
57
+
58
+
59
+ def random_seeder(seed):
60
+ """Fix randomness."""
61
+ torch.manual_seed(seed)
62
+ np.random.seed(seed)
63
+ random.seed(seed)
64
+ torch.backends.cudnn.deterministic = True
65
+ torch.backends.cudnn.benchmark = False
66
+
67
+ def pprint_config(opt):
68
+ print("\n" + "=" * 50 + " Configuration " + "=" * 50)
69
+ pprint(opt, compact=True)
70
+ print("=" * 115 + "\n")
Binary file
Binary file
Binary file
spacr/settings.py CHANGED
@@ -34,6 +34,7 @@ def set_default_settings_preprocess_generate_masks(src, settings={}):
34
34
  if 'src' not in settings:
35
35
  settings['src'] = 'path'
36
36
 
37
+ settings.setdefault('segmentation_mode', 'cellpose')
37
38
  settings.setdefault('preprocess', True)
38
39
  settings.setdefault('masks', True)
39
40
  settings.setdefault('save', True)
@@ -829,10 +830,11 @@ expected_types = {
829
830
  "custom_model_path":str,
830
831
  "generate_training_dataset":bool,
831
832
  'preload_batches':int,
833
+ "segmentation_mode":str,
832
834
  "train_DL_model":bool,
833
835
  }
834
836
 
835
- categories = {"General": ["src", "metadata_type", "custom_regex", "experiment", "channels", "magnification", "channel_dims", "apply_model_to_dataset", "generate_training_dataset", "train_DL_model"],
837
+ categories = {"General": ["src", "metadata_type", "custom_regex", "experiment", "channels", "magnification", "channel_dims", "apply_model_to_dataset", "generate_training_dataset", "train_DL_model", "segmentation_mode"],
836
838
  "Cell": ["cell_intensity_range", "cell_size_range", "cell_chann_dim", "cell_channel", "cell_background", "cell_Signal_to_noise", "cell_CP_prob", "cell_FT", "remove_background_cell", "cell_min_size", "cell_mask_dim", "cytoplasm", "cytoplasm_min_size", "include_uninfected", "merge_edge_pathogen_cells", "adjust_cells"],
837
839
  "Nucleus": ["nucleus_intensity_range", "nucleus_size_range", "nucleus_chann_dim", "nucleus_channel", "nucleus_background", "nucleus_Signal_to_noise", "nucleus_CP_prob", "nucleus_FT", "remove_background_nucleus", "nucleus_min_size", "nucleus_mask_dim", "nucleus_loc"],
838
840
  "Pathogen": ["pathogen_intensity_range", "pathogen_size_range", "pathogen_chann_dim", "pathogen_channel", "pathogen_background", "pathogen_Signal_to_noise", "pathogen_CP_prob", "pathogen_FT", "pathogen_model", "remove_background_pathogen", "pathogen_min_size", "pathogen_mask_dim"],
spacr/utils.py CHANGED
@@ -1210,16 +1210,16 @@ def _calculate_recruitment(df, channel):
1210
1210
  for chan in channels:
1211
1211
  df[f'{object_type}_slope_channel_{chan}'] = 1
1212
1212
 
1213
- for chan in channels:
1214
- df[f'nucleus_coordinates_{chan}'] = df[[f'nucleus_channel_{chan}_centroid_weighted_local-0', f'nucleus_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1215
- df[f'pathogen_coordinates_{chan}'] = df[[f'pathogen_channel_{chan}_centroid_weighted_local-0', f'pathogen_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1216
- df[f'cell_coordinates_{chan}'] = df[[f'cell_channel_{chan}_centroid_weighted_local-0', f'cell_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1217
- df[f'cytoplasm_coordinates_{chan}'] = df[[f'cytoplasm_channel_{chan}_centroid_weighted_local-0', f'cytoplasm_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1218
-
1219
- df[f'pathogen_cell_distance_channel_{chan}'] = df.apply(lambda row: np.sqrt((row[f'pathogen_coordinates_{chan}'][0] - row[f'cell_coordinates_{chan}'][0])**2 +
1220
- (row[f'pathogen_coordinates_{chan}'][1] - row[f'cell_coordinates_{chan}'][1])**2), axis=1)
1221
- df[f'nucleus_cell_distance_channel_{chan}'] = df.apply(lambda row: np.sqrt((row[f'nucleus_coordinates_{chan}'][0] - row[f'cell_coordinates_{chan}'][0])**2 +
1222
- (row[f'nucleus_coordinates_{chan}'][1] - row[f'cell_coordinates_{chan}'][1])**2), axis=1)
1213
+ #for chan in channels:
1214
+ # df[f'nucleus_coordinates_{chan}'] = df[[f'nucleus_channel_{chan}_centroid_weighted_local-0', f'nucleus_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1215
+ # df[f'pathogen_coordinates_{chan}'] = df[[f'pathogen_channel_{chan}_centroid_weighted_local-0', f'pathogen_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1216
+ # df[f'cell_coordinates_{chan}'] = df[[f'cell_channel_{chan}_centroid_weighted_local-0', f'cell_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1217
+ # df[f'cytoplasm_coordinates_{chan}'] = df[[f'cytoplasm_channel_{chan}_centroid_weighted_local-0', f'cytoplasm_channel_{chan}_centroid_weighted_local-1']].values.tolist()
1218
+ #
1219
+ # df[f'pathogen_cell_distance_channel_{chan}'] = df.apply(lambda row: np.sqrt((row[f'pathogen_coordinates_{chan}'][0] - row[f'cell_coordinates_{chan}'][0])**2 +
1220
+ # (row[f'pathogen_coordinates_{chan}'][1] - row[f'cell_coordinates_{chan}'][1])**2), axis=1)
1221
+ # df[f'nucleus_cell_distance_channel_{chan}'] = df.apply(lambda row: np.sqrt((row[f'nucleus_coordinates_{chan}'][0] - row[f'cell_coordinates_{chan}'][0])**2 +
1222
+ # (row[f'nucleus_coordinates_{chan}'][1] - row[f'cell_coordinates_{chan}'][1])**2), axis=1)
1223
1223
  return df
1224
1224
 
1225
1225
  def _group_by_well(df):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spacr
3
- Version: 0.2.81
3
+ Version: 0.3.0
4
4
  Summary: Spatial phenotype analysis of crisp screens (SpaCr)
5
5
  Home-page: https://github.com/EinarOlafsson/spacr
6
6
  Author: Einar Birnir Olafsson
@@ -50,6 +50,14 @@ Requires-Dist: rapidfuzz<4.0,>=3.9
50
50
  Requires-Dist: keyring<16.0,>=15.1
51
51
  Requires-Dist: screeninfo<1.0,>=0.8.1
52
52
  Requires-Dist: ipykernel
53
+ Requires-Dist: gdown
54
+ Requires-Dist: fastremap>=1.14.1
55
+ Requires-Dist: monai>=1.3.0
56
+ Requires-Dist: pytz>=2023.3.post1
57
+ Requires-Dist: segmentation-models-pytorch>=0.3.3
58
+ Requires-Dist: tifffile>=2023.4.12
59
+ Requires-Dist: tqdm>=4.65.0
60
+ Requires-Dist: wandb>=0.16.2
53
61
  Requires-Dist: huggingface-hub<0.25,>=0.24.0
54
62
  Provides-Extra: dev
55
63
  Requires-Dist: pytest<3.11,>=3.9; extra == "dev"
@@ -1,4 +1,4 @@
1
- spacr/__init__.py,sha256=8NZIlJOY2OzRCFjXvqusFL7BfyEJwNqB2lL8QNB-Kgo,1141
1
+ spacr/__init__.py,sha256=bKVlCCJatRBMqjfxSXds2D_Swjf30T6agvAQ0Usz80o,1176
2
2
  spacr/__main__.py,sha256=bkAJJD2kjIqOP-u1kLvct9jQQCeUXzlEjdgitwi1Lm8,75
3
3
  spacr/app_annotate.py,sha256=nEIL7Fle9CDKGo3sucG_03DgjUQt5W1M1IHBIpVBr08,2171
4
4
  spacr/app_classify.py,sha256=urTP_wlZ58hSyM5a19slYlBxN0PdC-9-ga0hvq8CGWc,165
@@ -8,24 +8,78 @@ spacr/app_measure.py,sha256=_K7APYIeOKpV6e_LcqabBjvEi7mfq9Fch8175x1x0k8,162
8
8
  spacr/app_sequencing.py,sha256=DjG26jy4cpddnV8WOOAIiExtOe9MleVMY4MFa5uTo5w,157
9
9
  spacr/app_umap.py,sha256=ZWAmf_OsIKbYvolYuWPMYhdlVe-n2CADoJulAizMiEo,153
10
10
  spacr/chris.py,sha256=YlBjSgeZaY8HPy6jkrT_ISAnCMAKVfvCxF0I9eAZLFM,2418
11
- spacr/core.py,sha256=B2KMyG6IrVtV9d4XQkXVblbvfFhgcMY2o-mtmqDVDic,146519
11
+ spacr/core.py,sha256=gOr5P58s4ubzDfO0Ar3Zwce0bo-E8qxdN37Ian82RGw,150744
12
12
  spacr/deep_spacr.py,sha256=a2YewgkQvLV-95NYJAutnojvJmX4S8z_wv6Tb-XIgUI,34484
13
13
  spacr/graph_learning.py,sha256=1tR-ZxvXE3dBz1Saw7BeVFcrsUFu9OlUZeZVifih9eo,13070
14
- spacr/gui.py,sha256=RMg0bgbUpO6JwaWuNVMwuVZ18j4WlER3nW0Eaa0YZ30,7883
15
- spacr/gui_core.py,sha256=gTgsBzhZ5Q4vl6fT8VwrHWZ6BXWW5FNli8CE3WNMfv0,39986
14
+ spacr/gui.py,sha256=zUkIyAuOwwoMDoExxtI-QHRfOhE1R2rulXJDNxwSLGc,7947
15
+ spacr/gui_core.py,sha256=ZUIqvK7x6NzgrmuTRbvwCTTSpU3yWUaId6MZjXv16us,40128
16
16
  spacr/gui_elements.py,sha256=OA514FUVRKAcdu9CFVOt7UEzn1vztakQ-rDyKqV0b9A,129771
17
- spacr/gui_utils.py,sha256=pq_bmZ527S1j2s6McvqMhHNI05hJycBhHM8GY_jH9Ng,30597
18
- spacr/io.py,sha256=ZtVNbEom8X8p_KfsuWw0glGwLg6S0CfwwevDPGdfiSc,117342
17
+ spacr/gui_utils.py,sha256=DCI--DNoYDWY1q0Aohd0XwFqjdPM3K5kCgRKiJGTnfc,30697
18
+ spacr/io.py,sha256=o2Sxan6_HylbYNUjNdgeQ4iEpcXRwlgV1r59J2HG0xQ,117292
19
19
  spacr/logger.py,sha256=7Zqr3TuuOQLWT32gYr2q1qvv7x0a2JhLANmZcnBXAW8,670
20
- spacr/measure.py,sha256=4rmzH_a5Y0s1qALVi6YRut3xpnkJXs5vzeTPCEf3QS8,54871
21
- spacr/plot.py,sha256=xVnbML7WpAEzdJdrLeYRk6aPinZSiV2dLAeu4mh7n0k,73963
20
+ spacr/measure.py,sha256=ooMOP2OE0BHUNqIkg0ltwV2FiO6hZDIcRC6A0YmGcws,54875
21
+ spacr/mediar.py,sha256=KEkrO0dlAbOr2tN4c8-vDncTy3IWNzUAwWYiPRofFqU,14864
22
+ spacr/plot.py,sha256=9Ty2cMJpICXPCEE4inGTb1FvlUZkVgqB7lqJaggmjZE,73975
22
23
  spacr/sequencing.py,sha256=92KmjFa8Ptwmpf-GtyH3-uX6djFOYR5lJjMBHeciqhs,66921
23
- spacr/settings.py,sha256=rxXvpbNSFL5GKluGCLu4sEsYg8oo8djtbnGXPJ5d8hc,67931
24
+ spacr/settings.py,sha256=PfIPLyMyBAfOodtdgNT8QzbysNDxTnsONXdI-fKtIDQ,68038
24
25
  spacr/sim.py,sha256=FveaVgBi3eypO2oVB5Dx-v0CC1Ny7UPfXkJiiRRodAk,71212
25
26
  spacr/sim_app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
27
  spacr/timelapse.py,sha256=KMYCgHzf9LTZe-lWl5mvH2EjbKRE6OhpwdY13wEumGc,39504
27
- spacr/utils.py,sha256=OY65COsdaCFK04irC0L7tNPaOvI2x7PBIs9D9t-ToCg,189144
28
+ spacr/utils.py,sha256=D13hYJsVuq1ZMWYGyvtEskU_W2P8ddsI9zX9pTtMAFA,189159
28
29
  spacr/version.py,sha256=axH5tnGwtgSnJHb5IDhiu4Zjk5GhLyAEDRe-rnaoFOA,409
30
+ spacr/resources/MEDIAR/.git,sha256=nHbNNUgehWnXyS2LbJZitX4kbpd1urzYgE0WZYvdMfc,53
31
+ spacr/resources/MEDIAR/.gitignore,sha256=Ff1q9Nme14JUd-4Q3jZ65aeQ5X4uttptssVDgBVHYo8,152
32
+ spacr/resources/MEDIAR/LICENSE,sha256=yEj_TRDLUfDpHDNM0StALXIt6mLqSgaV2hcCwa6_TcY,1065
33
+ spacr/resources/MEDIAR/README.md,sha256=TlL2XhmmNhYTtaBlMCnlJRW-K7qOVeqH1ABLabZAe2k,11877
34
+ spacr/resources/MEDIAR/SetupDict.py,sha256=oHyOrGgKTRYbTjqlLWv1HXWAQ39urXih9AI56h4vcFk,869
35
+ spacr/resources/MEDIAR/evaluate.py,sha256=7exc1Du1RXGelme7wAodcqPd6VIe_nFdOoPT2w09O-4,2181
36
+ spacr/resources/MEDIAR/generate_mapping.py,sha256=6FqWgAegWExUF2DFc_vOQzH1c7g9-efhNDpq2t7lGh8,3688
37
+ spacr/resources/MEDIAR/main.py,sha256=8KKelA75anJbvpCGXQbAO5OipHE-hx-q04_OB2Z90NQ,3573
38
+ spacr/resources/MEDIAR/predict.py,sha256=V2GUdy3LM595gCoAjBOk22-QitaKRKRqJX3Hgdc4FEU,2141
39
+ spacr/resources/MEDIAR/requirements.txt,sha256=7fapaH6LrDiKsdkjkl8oQ8oR2u49-n-OChMWa5wg7fY,225
40
+ spacr/resources/MEDIAR/config/baseline.json,sha256=moqZ8Bf0rf1hcoJswp9EvE1IrqSfO4lzJGkj3-emIqc,1603
41
+ spacr/resources/MEDIAR/config/mediar_example.json,sha256=B6mFpDgCpOJpN4Foj1hC_X4zCRyWXra3XsZ0DBqvGnQ,2114
42
+ spacr/resources/MEDIAR/config/pred/pred_mediar.json,sha256=oE4YmuPFfH6_rK9PFBRX18aIPalZfni3NYGfRtOhTIU,385
43
+ spacr/resources/MEDIAR/config/step1_pretraining/phase1.json,sha256=UuIkrGMZZmfMYpreh41BH9Yq3fBhBxoWAyeOR53oGsU,1520
44
+ spacr/resources/MEDIAR/config/step1_pretraining/phase2.json,sha256=CIoi54TOI74laouA222-iIBrRGTrZ3pg8HQolpDquxo,1640
45
+ spacr/resources/MEDIAR/config/step2_finetuning/finetuning1.json,sha256=073AeKRJLv-O7gyET0_SAxnFkwZ-Rcc4zNoql3f1p7c,1923
46
+ spacr/resources/MEDIAR/config/step2_finetuning/finetuning2.json,sha256=SfNAH5Kt3Xet23JN0CKp7Lnm8mKNpOYrdmQZ0BBM5Rs,1936
47
+ spacr/resources/MEDIAR/config/step3_prediction/base_prediction.json,sha256=qCinHOIatRvgqhNF-Ucx6YwIj9lRVWj0p_O9z5OY6j8,478
48
+ spacr/resources/MEDIAR/config/step3_prediction/ensemble_tta.json,sha256=7NmBQTgyGBw1XFB4uWEGebj8CAoh1FklJbJPuhQwQQg,803
49
+ spacr/resources/MEDIAR/core/BasePredictor.py,sha256=lvjAnHK7WXoaqnWI-1juf3_XU_v-ePo8Rme6qJc7Uq4,3664
50
+ spacr/resources/MEDIAR/core/BaseTrainer.py,sha256=E-fayADu9A5Vd80NyZY49xFl2lPgLsoh4Nd3HkDjp5U,7428
51
+ spacr/resources/MEDIAR/core/__init__.py,sha256=pR63haYRlkWrc9btVLSLVhk6nc94vmqreAs5H8I9LOw,46
52
+ spacr/resources/MEDIAR/core/utils.py,sha256=h4z0Mdl08p3ftOwfAqtMVJ9-c6qBVna_9w9s0L25YBM,948
53
+ spacr/resources/MEDIAR/core/Baseline/Predictor.py,sha256=mDHSG2jSJyLWr_j2gSzADjfmb0Ol76GI30HfpV0XR3U,1535
54
+ spacr/resources/MEDIAR/core/Baseline/Trainer.py,sha256=OzkFeSF0sRn1Wej253I4h99f7v9wD3tKv88YYXLAtd4,3451
55
+ spacr/resources/MEDIAR/core/Baseline/__init__.py,sha256=WinVVW50c_UhZDcUkX4RESjy8eSQOjMiU-KynfSGP_I,48
56
+ spacr/resources/MEDIAR/core/Baseline/utils.py,sha256=V2e4a00ZdYFlHFaorLTI1CgX8gt_KFSfrpm_XikygiA,2370
57
+ spacr/resources/MEDIAR/core/MEDIAR/EnsemblePredictor.py,sha256=5BSz3mwe9B26aTQiNhqwDI2VxAOxnvNsjAhYlFMuBDw,3416
58
+ spacr/resources/MEDIAR/core/MEDIAR/Predictor.py,sha256=FfA012HXmvrMnYJBsovCdgbrWL5-Ca-PwZN1mIsNfik,6763
59
+ spacr/resources/MEDIAR/core/MEDIAR/Trainer.py,sha256=7OueMwovWxSb8UY033X--KJnk55Mh5EQu6LGdUl8_OU,5745
60
+ spacr/resources/MEDIAR/core/MEDIAR/__init__.py,sha256=yFkZq29jm8Sf-Bf_h1KAiMaUxU47uBeOMU27m92fjh8,81
61
+ spacr/resources/MEDIAR/core/MEDIAR/utils.py,sha256=1rcVONsnnPvIEkPW1mu5mCt1YQJqXPtAyEWtxAQIvpE,14641
62
+ spacr/resources/MEDIAR/image/failure_cases.png,sha256=y9mmqGJ5Q5FNpHCekio_UZdrxGLraRXn2yZLLm__rNI,2390420
63
+ spacr/resources/MEDIAR/image/mediar_framework.png,sha256=wucJ9Qyoi4Yi_A-D0HyCpEw8-bjFHS7AAeyzfQL7Iks,1048242
64
+ spacr/resources/MEDIAR/image/mediar_model.PNG,sha256=JQuxGxfGcBY07-JRBGhtDA0FcKnENV_7HVy3uAq3_rE,348059
65
+ spacr/resources/MEDIAR/image/mediar_results.png,sha256=LffVaF8WQ9yq8hkmGQBvTklzy3KlopsrtZ4NKzB0oLk,3213351
66
+ spacr/resources/MEDIAR/image/examples/img1.tiff,sha256=GNl9ngl5ZVEz0Dvy1RoEQipSCcavAQx_I1LwUOuQM3o,921872
67
+ spacr/resources/MEDIAR/image/examples/img2.tif,sha256=YAk6yYRVOu6Gg8X4BUo_LaSfMZraH-uAN8gF6Cs0ivs,8414906
68
+ spacr/resources/MEDIAR/train_tools/__init__.py,sha256=XXnPlgCbF3GEfnwIbUB2MniUl2Ve6QOf7jhEuiqbiis,71
69
+ spacr/resources/MEDIAR/train_tools/measures.py,sha256=LOJmJzLVO4XsJX4XHuppuXknN5HncarDV5url39GRzA,5770
70
+ spacr/resources/MEDIAR/train_tools/utils.py,sha256=7ISUS0Uw-dU83XD-WFzNTOPBX4SwSoF0iWNGMcGmTZM,1911
71
+ spacr/resources/MEDIAR/train_tools/data_utils/__init__.py,sha256=QVo7-uqgr0vdP4s8nZ47LKDqxabnzbO0MKt8E1sR8as,26
72
+ spacr/resources/MEDIAR/train_tools/data_utils/datasetter.py,sha256=uiPhC46gQMbeYhpTehX4Qm0_dUQJ6NXaVCg3a19HGpA,6323
73
+ spacr/resources/MEDIAR/train_tools/data_utils/transforms.py,sha256=vNZQB_qPh-Jeovb1FhnbCUFl6HoV6px7QHa4ZC8RO-Q,5147
74
+ spacr/resources/MEDIAR/train_tools/data_utils/utils.py,sha256=yJo2BSLr9ARwTkuJwIoSJrZXPE4E3DlPRAT97hQzYwY,2556
75
+ spacr/resources/MEDIAR/train_tools/data_utils/custom/CellAware.py,sha256=bG100wH2okxnnEQh0ZRR3GM8n99azB2z5iu7aINXjm0,2865
76
+ spacr/resources/MEDIAR/train_tools/data_utils/custom/LoadImage.py,sha256=wK69UHjCzq2L2_Ny5m9I5H6DGYRF8yCfmhCA39DOCW4,5431
77
+ spacr/resources/MEDIAR/train_tools/data_utils/custom/NormalizeImage.py,sha256=7DfWVusYRRuEyA8eXujNyGJz0dubx7b7uhgEzzrh3-4,2152
78
+ spacr/resources/MEDIAR/train_tools/data_utils/custom/__init__.py,sha256=SalCNvPyiy0rqLpjdoXPXGoWlKf-8K9vtDQ70HXOXe0,80
79
+ spacr/resources/MEDIAR/train_tools/data_utils/custom/modalities.pkl,sha256=C1D7NkUZ5er7Kdeyhhwjo0IGUvCsVfKPBzcwfaORd8Q,3762
80
+ spacr/resources/MEDIAR/train_tools/models/MEDIARFormer.py,sha256=UN8BYjraTNNdZUAGjl3yF566ERHAHQvj3GAQ6OETUOI,3615
81
+ spacr/resources/MEDIAR/train_tools/models/__init__.py,sha256=CkY6rZxr-c9XxXNpQbYUYvHXDpf9E6rUmY1bQ47aEP8,28
82
+ spacr/resources/MEDIAR_weights/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
29
83
  spacr/resources/font/open_sans/OFL.txt,sha256=bGMoWBRrE2RcdzDiuYiB8A9OVFlJ0sA2imWwce2DAdo,4484
30
84
  "spacr/resources/font/open_sans/OpenSans-Italic-VariableFont_wdth,wght.ttf",sha256=QSoWv9h46CRX_fdlqFM3O2d3-PF3R1srnb4zUezcLm0,580280
31
85
  "spacr/resources/font/open_sans/OpenSans-VariableFont_wdth,wght.ttf",sha256=E3RLvAefD0kuT7OxShXSQrjZYA-qzUI9WM35N_6nzms,529700
@@ -66,6 +120,7 @@ spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-MediumItalic.ttf,sh
66
120
  spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-Regular.ttf,sha256=skg4DCl15zL9ZD4MAL9fOt4WjonKYBUOMj46ItSAe5Q,130848
67
121
  spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBold.ttf,sha256=uCiR97jg6sUHtGKVPNtJEg1zZG5Y9ArQ-raqBGjaeGg,130856
68
122
  spacr/resources/font/open_sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf,sha256=a5-0oOIrtJltQRa64uFKCdtcjzPvEJ71f_cYavG2i3E,137132
123
+ spacr/resources/icons/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
69
124
  spacr/resources/icons/abort.png,sha256=avtIRT7aCJsdZ1WnY_rZStm6cCji5bYPLnlptdcTNcM,6583
70
125
  spacr/resources/icons/annotate.png,sha256=GFgh7DiUMwPG_-xE6W1qU8V_qzSwBi1xKenfoaQxeFA,15495
71
126
  spacr/resources/icons/cellpose_all.png,sha256=HVWOIOBF8p3-On-2UahwMyQXp7awsoC5yWExU1ahDag,20271
@@ -81,6 +136,7 @@ spacr/resources/icons/map_barcodes.png,sha256=ED6yCopk3hP7tICSvT8U_qA1bOOb0WHqmx
81
136
  spacr/resources/icons/mask.png,sha256=DcBes-3UJ7XjRfj_P4RttRp680ZKZeH9a-DSk7bIF5U,37658
82
137
  spacr/resources/icons/measure.png,sha256=Gd-dlN-3Z8D_XngJnChNme8D63KEJMFs_cBv7wT2vOY,40938
83
138
  spacr/resources/icons/ml_analyze.png,sha256=Wc9a_LpG2XffiMfXxn0yUmGP40IXzlAV7bHXQf7m_2o,15754
139
+ spacr/resources/icons/plaque.png,sha256=NWt7C8thV0iQ1YuRvW_NfUJSFG6XK_iGpoW0R9Xfsyc,45033
84
140
  spacr/resources/icons/recruitment.png,sha256=dlVh2ebV_f3rhRFBiL0hDtlUeBSIeg0d4vny8A8IAdo,25067
85
141
  spacr/resources/icons/regression.png,sha256=WIrKY4fSojBOCDkHno4Qb-KH7jcHh6G67dOKzczaU1I,42267
86
142
  spacr/resources/icons/run.png,sha256=ICzyAvsRBCXNAbdn5N3PxCxxVyqxkfC4zOI5Zc8vbxQ,8974
@@ -89,12 +145,15 @@ spacr/resources/icons/settings.png,sha256=y5Ow5BxJDDsrqom0VNbOMDGGUs6odxbSMDy6y4
89
145
  spacr/resources/icons/spacr_logo_rotation.gif,sha256=bgIx1Hx41Ob90SY-q3PBa3CSxtVRnF9XX-ApUSr0wvY,1502560
90
146
  spacr/resources/icons/train_cellpose.png,sha256=_PZ_R_B6azuUACmscScAkugmgLZvCPKQFGIAsszqNLk,3858
91
147
  spacr/resources/icons/umap.png,sha256=dOLF3DeLYy9k0nkUybiZMe1wzHQwLJFRmgccppw-8bI,27457
148
+ spacr/resources/images/plate1_E01_T0001F001L01A01Z01C02.tif,sha256=Tl0ZUfZ_AYAbu0up_nO0tPRtF1BxXhWQ3T3pURBCCRo,7958528
149
+ spacr/resources/images/plate1_E01_T0001F001L01A02Z01C01.tif,sha256=m8N-V71rA1TT4dFlENNg8s0Q0YEXXs8slIn7yObmZJQ,7958528
150
+ spacr/resources/images/plate1_E01_T0001F001L01A03Z01C03.tif,sha256=Pbhk7xn-KUP6RSIhJsxQcrHFImBm3GEpLkzx7WOc-5M,7958528
92
151
  spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model,sha256=z8BbHWZPRnE9D_BHO0fBREE85c1vkltDs-incs2ytXQ,26566572
93
152
  spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv,sha256=fBAGuL_B8ERVdVizO3BHozTDSbZUh1yFzsYK3wkQN68,420
94
153
  spacr/resources/models/cp/toxo_pv_lumen.CP_model,sha256=2y_CindYhmTvVwBH39SNILF3rI3x9SsRn6qrMxHy3l0,26562451
95
- spacr-0.2.81.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
96
- spacr-0.2.81.dist-info/METADATA,sha256=-3NGByY_rn0wM09SI0-XgrLr9UBdK09AlU3TtaaGJOg,5389
97
- spacr-0.2.81.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
98
- spacr-0.2.81.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
99
- spacr-0.2.81.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
100
- spacr-0.2.81.dist-info/RECORD,,
154
+ spacr-0.3.0.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
155
+ spacr-0.3.0.dist-info/METADATA,sha256=gPhwJrEAVxewekQKy4X9qiLlDr3Q4JvwXnq941vcpew,5646
156
+ spacr-0.3.0.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
157
+ spacr-0.3.0.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
158
+ spacr-0.3.0.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
159
+ spacr-0.3.0.dist-info/RECORD,,
File without changes