deepliif 1.2.0__tar.gz → 1.2.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.
Files changed (217) hide show
  1. {deepliif-1.2.0 → deepliif-1.2.2}/PKG-INFO +2 -2
  2. {deepliif-1.2.0 → deepliif-1.2.2}/README.md +1 -1
  3. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/postprocessing.py +41 -13
  4. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/__init__.py +6 -4
  5. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif.egg-info/PKG-INFO +2 -2
  6. deepliif-1.2.2/deepliif.egg-info/SOURCES.txt +47 -0
  7. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif.egg-info/requires.txt +1 -1
  8. {deepliif-1.2.0 → deepliif-1.2.2}/setup.cfg +1 -1
  9. {deepliif-1.2.0 → deepliif-1.2.2}/setup.py +2 -2
  10. deepliif-1.2.0/.gitignore +0 -147
  11. deepliif-1.2.0/Datasets/Sample_Dataset/test/22_2.png +0 -0
  12. deepliif-1.2.0/Datasets/Sample_Dataset/test/34_3.png +0 -0
  13. deepliif-1.2.0/Datasets/Sample_Dataset/test/6_2.png +0 -0
  14. deepliif-1.2.0/Datasets/Sample_Dataset/test/799_2.png +0 -0
  15. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_fake_B_1.png +0 -0
  16. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_fake_B_2.png +0 -0
  17. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_fake_B_3.png +0 -0
  18. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_fake_B_4.png +0 -0
  19. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_fake_B_5.png +0 -0
  20. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/22_2_real_A.png +0 -0
  21. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_fake_B_1.png +0 -0
  22. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_fake_B_2.png +0 -0
  23. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_fake_B_3.png +0 -0
  24. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_fake_B_4.png +0 -0
  25. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_fake_B_5.png +0 -0
  26. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/34_3_real_A.png +0 -0
  27. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_fake_B_1.png +0 -0
  28. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_fake_B_2.png +0 -0
  29. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_fake_B_3.png +0 -0
  30. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_fake_B_4.png +0 -0
  31. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_fake_B_5.png +0 -0
  32. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/6_2_real_A.png +0 -0
  33. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_fake_B_1.png +0 -0
  34. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_fake_B_2.png +0 -0
  35. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_fake_B_3.png +0 -0
  36. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_fake_B_4.png +0 -0
  37. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_fake_B_5.png +0 -0
  38. deepliif-1.2.0/Datasets/Sample_Dataset/test_DeepLIIF_results/799_2_real_A.png +0 -0
  39. deepliif-1.2.0/Datasets/Sample_Dataset/test_cli/22_2.png +0 -0
  40. deepliif-1.2.0/Datasets/Sample_Dataset/test_cli/34_3.png +0 -0
  41. deepliif-1.2.0/Datasets/Sample_Dataset/test_cli/6_2.png +0 -0
  42. deepliif-1.2.0/Datasets/Sample_Dataset/test_cli/799_2.png +0 -0
  43. deepliif-1.2.0/Datasets/Sample_Dataset/test_groundtruth/22_2.png +0 -0
  44. deepliif-1.2.0/Datasets/Sample_Dataset/test_groundtruth/34_3.png +0 -0
  45. deepliif-1.2.0/Datasets/Sample_Dataset/test_groundtruth/6_2.png +0 -0
  46. deepliif-1.2.0/Datasets/Sample_Dataset/test_groundtruth/799_2.png +0 -0
  47. deepliif-1.2.0/Datasets/Sample_Dataset/train/Bladder1.png +0 -0
  48. deepliif-1.2.0/Datasets/Sample_Dataset/train/Lung1.png +0 -0
  49. deepliif-1.2.0/Datasets/Sample_Dataset/val/Bladder1.json +0 -10
  50. deepliif-1.2.0/Datasets/Sample_Dataset/val/Bladder1.png +0 -0
  51. deepliif-1.2.0/Datasets/Sample_Dataset/val/Lung1.json +0 -10
  52. deepliif-1.2.0/Datasets/Sample_Dataset/val/Lung1.png +0 -0
  53. deepliif-1.2.0/Datasets/Sample_Dataset/val/metrics.json +0 -22
  54. deepliif-1.2.0/DeepLIIF_Statistics/ComputeStatistics.py +0 -236
  55. deepliif-1.2.0/DeepLIIF_Statistics/Create_Loss_Diagram.py +0 -81
  56. deepliif-1.2.0/DeepLIIF_Statistics/HelperFunctions.py +0 -667
  57. deepliif-1.2.0/DeepLIIF_Statistics/PostProcessSegmentationMask.py +0 -171
  58. deepliif-1.2.0/DeepLIIF_Statistics/README.md +0 -42
  59. deepliif-1.2.0/DeepLIIF_Statistics/Segmentation_Metrics.py +0 -233
  60. deepliif-1.2.0/DeepLIIF_Statistics/environment.yml +0 -69
  61. deepliif-1.2.0/DeepLIIF_Statistics/fid.py +0 -334
  62. deepliif-1.2.0/DeepLIIF_Statistics/fid_official_tf.py +0 -370
  63. deepliif-1.2.0/DeepLIIF_Statistics/inception_score.py +0 -100
  64. deepliif-1.2.0/DeepLIIF_Statistics/swd.py +0 -158
  65. deepliif-1.2.0/Dockerfile +0 -19
  66. deepliif-1.2.0/ImageJ_Plugin/.gitignore +0 -2
  67. deepliif-1.2.0/ImageJ_Plugin/README.md +0 -104
  68. deepliif-1.2.0/ImageJ_Plugin/images/roi_step01.png +0 -0
  69. deepliif-1.2.0/ImageJ_Plugin/images/roi_step02.png +0 -0
  70. deepliif-1.2.0/ImageJ_Plugin/images/roi_step03.png +0 -0
  71. deepliif-1.2.0/ImageJ_Plugin/images/roi_step04.png +0 -0
  72. deepliif-1.2.0/ImageJ_Plugin/images/roi_step05.png +0 -0
  73. deepliif-1.2.0/ImageJ_Plugin/images/roi_step06.png +0 -0
  74. deepliif-1.2.0/ImageJ_Plugin/images/roi_step07.png +0 -0
  75. deepliif-1.2.0/ImageJ_Plugin/images/roi_step08.png +0 -0
  76. deepliif-1.2.0/ImageJ_Plugin/images/roi_step09.png +0 -0
  77. deepliif-1.2.0/ImageJ_Plugin/images/roi_step10.png +0 -0
  78. deepliif-1.2.0/ImageJ_Plugin/images/step01.png +0 -0
  79. deepliif-1.2.0/ImageJ_Plugin/images/step02.png +0 -0
  80. deepliif-1.2.0/ImageJ_Plugin/images/step03.png +0 -0
  81. deepliif-1.2.0/ImageJ_Plugin/images/step04.png +0 -0
  82. deepliif-1.2.0/ImageJ_Plugin/images/step05.png +0 -0
  83. deepliif-1.2.0/ImageJ_Plugin/images/step06.png +0 -0
  84. deepliif-1.2.0/ImageJ_Plugin/images/step07.png +0 -0
  85. deepliif-1.2.0/ImageJ_Plugin/images/step08.png +0 -0
  86. deepliif-1.2.0/ImageJ_Plugin/images/step10.png +0 -0
  87. deepliif-1.2.0/ImageJ_Plugin/pom.xml +0 -106
  88. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/DeepliifClient.java +0 -181
  89. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/DeepliifException.java +0 -9
  90. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/FileHelper.java +0 -81
  91. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/InferencePlugin.java +0 -152
  92. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/InteractionPlugin.java +0 -228
  93. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/MutableHTMLDialog.java +0 -161
  94. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/OverlayCreator.java +0 -137
  95. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/ResultHandler.java +0 -140
  96. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/RoisInferencePlugin.java +0 -259
  97. deepliif-1.2.0/ImageJ_Plugin/src/main/java/org/nadeemlab/deepliif/UIHelper.java +0 -30
  98. deepliif-1.2.0/ImageJ_Plugin/src/main/resources/plugins.config +0 -3
  99. deepliif-1.2.0/Image_Processing/Augmentation.py +0 -84
  100. deepliif-1.2.0/Image_Processing/Image_Processing_Helper_Functions.py +0 -567
  101. deepliif-1.2.0/Multi-GPU Training.md +0 -156
  102. deepliif-1.2.0/PostProcessSegmentationMask.py +0 -61
  103. deepliif-1.2.0/Registration/README.md +0 -42
  104. deepliif-1.2.0/Registration/Registration_App.py +0 -281
  105. deepliif-1.2.0/Sample_Large_Tissues/ROI_1.png +0 -0
  106. deepliif-1.2.0/Sample_Large_Tissues/ROI_127.png +0 -0
  107. deepliif-1.2.0/Sample_Large_Tissues/ROI_153.png +0 -0
  108. deepliif-1.2.0/Sample_Large_Tissues/ROI_46.png +0 -0
  109. deepliif-1.2.0/Sample_Large_Tissues/ROI_7.png +0 -0
  110. deepliif-1.2.0/Scripts/download_pre_trained_model.sh +0 -12
  111. deepliif-1.2.0/Scripts/download_training_sets.sh +0 -41
  112. deepliif-1.2.0/assets/.METADATA/.gitkeep +0 -0
  113. deepliif-1.2.0/assets/.METADATA/.version.json +0 -1
  114. deepliif-1.2.0/assettypes/.gitkeep +0 -0
  115. deepliif-1.2.0/conftest.py +0 -65
  116. deepliif-1.2.0/deepliif/models/__init__ - different weighted.py +0 -762
  117. deepliif-1.2.0/deepliif/models/__init__ - multiprocessing (failure).py +0 -980
  118. deepliif-1.2.0/deepliif/models/__init__ - run_dask_multi dev.py +0 -943
  119. deepliif-1.2.0/deepliif/models/__init__ - time gens.py +0 -792
  120. deepliif-1.2.0/deepliif/models/__init__ - timings.py +0 -764
  121. deepliif-1.2.0/deepliif/models/__init__ - weights, empty, zarr, tile count.py +0 -792
  122. deepliif-1.2.0/deepliif/postprocessing__OLD__DELETE.py +0 -440
  123. deepliif-1.2.0/deepliif/scripts/train.py +0 -513
  124. deepliif-1.2.0/deepliif/stat/__init__.py +0 -83
  125. deepliif-1.2.0/deepliif/util/util - modified tensor_to_pil.py +0 -255
  126. deepliif-1.2.0/deepliif.egg-info/SOURCES.txt +0 -215
  127. deepliif-1.2.0/docs/ImageJ/README.md +0 -104
  128. deepliif-1.2.0/docs/ImageJ/images/roi_step01.png +0 -0
  129. deepliif-1.2.0/docs/ImageJ/images/roi_step02.png +0 -0
  130. deepliif-1.2.0/docs/ImageJ/images/roi_step03.png +0 -0
  131. deepliif-1.2.0/docs/ImageJ/images/roi_step04.png +0 -0
  132. deepliif-1.2.0/docs/ImageJ/images/roi_step05.png +0 -0
  133. deepliif-1.2.0/docs/ImageJ/images/roi_step06.png +0 -0
  134. deepliif-1.2.0/docs/ImageJ/images/roi_step07.png +0 -0
  135. deepliif-1.2.0/docs/ImageJ/images/roi_step08.png +0 -0
  136. deepliif-1.2.0/docs/ImageJ/images/roi_step09.png +0 -0
  137. deepliif-1.2.0/docs/ImageJ/images/roi_step10.png +0 -0
  138. deepliif-1.2.0/docs/ImageJ/images/step01.png +0 -0
  139. deepliif-1.2.0/docs/ImageJ/images/step02.png +0 -0
  140. deepliif-1.2.0/docs/ImageJ/images/step03.png +0 -0
  141. deepliif-1.2.0/docs/ImageJ/images/step04.png +0 -0
  142. deepliif-1.2.0/docs/ImageJ/images/step05.png +0 -0
  143. deepliif-1.2.0/docs/ImageJ/images/step06.png +0 -0
  144. deepliif-1.2.0/docs/ImageJ/images/step07.png +0 -0
  145. deepliif-1.2.0/docs/ImageJ/images/step08.png +0 -0
  146. deepliif-1.2.0/docs/ImageJ/images/step10.png +0 -0
  147. deepliif-1.2.0/docs/README.md +0 -42
  148. deepliif-1.2.0/docs/cloud/README.md +0 -72
  149. deepliif-1.2.0/docs/deployment/README.md +0 -171
  150. deepliif-1.2.0/docs/deployment/images/deepliif_torchserve_workflow.png +0 -0
  151. deepliif-1.2.0/docs/images/DeepLIIF_logo.png +0 -0
  152. deepliif-1.2.0/docs/images/overview.png +0 -0
  153. deepliif-1.2.0/docs/installation/README.md +0 -35
  154. deepliif-1.2.0/docs/testing/README.md +0 -29
  155. deepliif-1.2.0/docs/training/README.md +0 -250
  156. deepliif-1.2.0/docs/training/images/IHC_Gen.jpg +0 -0
  157. deepliif-1.2.0/environment.yml +0 -145
  158. deepliif-1.2.0/images/DeepLIIF_logo.png +0 -0
  159. deepliif-1.2.0/images/IHC_Gen3.png +0 -0
  160. deepliif-1.2.0/images/deepliif-imagej-demo.gif +0 -0
  161. deepliif-1.2.0/images/deepliif-imagej-roi-demo.gif +0 -0
  162. deepliif-1.2.0/images/deepliif-stitch-demo-01.gif +0 -0
  163. deepliif-1.2.0/images/deepliif-website-demo-04.gif +0 -0
  164. deepliif-1.2.0/images/deepliif_torchserve_workflow.png +0 -0
  165. deepliif-1.2.0/images/overview.png +0 -0
  166. deepliif-1.2.0/images/target.png +0 -0
  167. deepliif-1.2.0/mkdocs.yml +0 -29
  168. deepliif-1.2.0/model-server/config.properties +0 -12
  169. deepliif-1.2.0/model-server/deepliif_workflow.yaml +0 -42
  170. deepliif-1.2.0/model-server/deepliif_workflow_handler.py +0 -41
  171. deepliif-1.2.0/model-server/model_requirements.txt +0 -1
  172. deepliif-1.2.0/model-server/net_handler.py +0 -16
  173. deepliif-1.2.0/model-server/resnet.py +0 -14
  174. deepliif-1.2.0/model-server/unet.py +0 -13
  175. deepliif-1.2.0/notes_for_code_testing.md +0 -39
  176. deepliif-1.2.0/test.py +0 -129
  177. deepliif-1.2.0/tests/util.py +0 -50
  178. deepliif-1.2.0/train.py +0 -517
  179. {deepliif-1.2.0 → deepliif-1.2.2}/LICENSE.md +0 -0
  180. {deepliif-1.2.0 → deepliif-1.2.2}/cli.py +0 -0
  181. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/__init__.py +0 -0
  182. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/__init__.py +0 -0
  183. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/aligned_dataset.py +0 -0
  184. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/base_dataset.py +0 -0
  185. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/colorization_dataset.py +0 -0
  186. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/image_folder.py +0 -0
  187. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/single_dataset.py +0 -0
  188. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/template_dataset.py +0 -0
  189. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/data/unaligned_dataset.py +0 -0
  190. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/CycleGAN_model.py +0 -0
  191. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/DeepLIIFExt_model.py +0 -0
  192. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/DeepLIIFKD_model.py +0 -0
  193. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/DeepLIIF_model.py +0 -0
  194. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/SDG_model.py +0 -0
  195. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/__init__.py +0 -0
  196. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/att_unet.py +0 -0
  197. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/base_model.py +0 -0
  198. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/models/networks.py +0 -0
  199. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/options/__init__.py +0 -0
  200. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/options/base_options.py +0 -0
  201. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/options/processing_options.py +0 -0
  202. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/options/test_options.py +0 -0
  203. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/options/train_options.py +0 -0
  204. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/checks.py +0 -0
  205. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/get_data.py +0 -0
  206. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/html.py +0 -0
  207. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/image_pool.py +0 -0
  208. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/util.py +0 -0
  209. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif/util/visualizer.py +0 -0
  210. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif.egg-info/dependency_links.txt +0 -0
  211. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif.egg-info/entry_points.txt +0 -0
  212. {deepliif-1.2.0 → deepliif-1.2.2}/deepliif.egg-info/top_level.txt +0 -0
  213. {deepliif-1.2.0 → deepliif-1.2.2}/tests/test_args.py +0 -0
  214. {deepliif-1.2.0 → deepliif-1.2.2}/tests/test_cli_inference.py +0 -0
  215. {deepliif-1.2.0 → deepliif-1.2.2}/tests/test_cli_serialize.py +0 -0
  216. {deepliif-1.2.0 → deepliif-1.2.2}/tests/test_cli_train.py +0 -0
  217. {deepliif-1.2.0 → deepliif-1.2.2}/tests/test_cli_trainlaunch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deepliif
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: DeepLIIF: Deep-Learning Inferred Multiplex Immunofluorescence for Immunohistochemical Image Quantification
5
5
  Home-page: https://github.com/nadeemlab/DeepLIIF
6
6
  Author: Parmida93
@@ -53,7 +53,7 @@ segmentation.*
53
53
 
54
54
  © This code is made available for non-commercial academic purposes.
55
55
 
56
- ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.0&color=darkgreen)
56
+ ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.2&color=darkgreen)
57
57
  [![Total Downloads](https://static.pepy.tech/personalized-badge/deepliif?period=total&units=international_system&left_color=grey&right_color=blue&left_text=total%20downloads)](https://pepy.tech/project/deepliif?&left_text=totalusers)
58
58
 
59
59
  ![overview_image](./images/overview.png)*Overview of DeepLIIF pipeline and sample input IHCs (different
@@ -42,7 +42,7 @@ segmentation.*
42
42
 
43
43
  © This code is made available for non-commercial academic purposes.
44
44
 
45
- ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.0&color=darkgreen)
45
+ ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.2&color=darkgreen)
46
46
  [![Total Downloads](https://static.pepy.tech/personalized-badge/deepliif?period=total&units=international_system&left_color=grey&right_color=blue&left_text=total%20downloads)](https://pepy.tech/project/deepliif?&left_text=totalusers)
47
47
 
48
48
  ![overview_image](./images/overview.png)*Overview of DeepLIIF pipeline and sample input IHCs (different
@@ -938,16 +938,11 @@ def create_cell_classification(mask, cellsinfo,
938
938
  idx = (seed[0] + n[0], seed[1] + n[1])
939
939
  if in_bounds(mask, idx) and mask[idx] == LABEL_CELL:
940
940
  seeds.append(idx)
941
- is_boundary = False
942
941
  for n in border_neighbors:
943
942
  idx2 = (idx[0] + n[0], idx[1] + n[1])
944
943
  if in_bounds(mask, idx2) and mask[idx2] == LABEL_BACKGROUND:
945
- is_boundary = True
946
- break
947
- if is_boundary:
948
- mask[idx] = label_border
949
- else:
950
- mask[idx] = label
944
+ mask[idx2] = label_border
945
+ mask[idx] = label
951
946
 
952
947
  num_total = num_pos + num_neg
953
948
  return {
@@ -976,7 +971,7 @@ def enlarge_cell_boundaries(mask):
976
971
  value = LABEL_BORDER_POS2 if mask[y, x] == LABEL_BORDER_POS else LABEL_BORDER_NEG2
977
972
  for n in neighbors:
978
973
  idx = (y + n[0], x + n[1])
979
- if in_bounds(mask, idx) and mask[idx] != LABEL_BORDER_POS and mask[idx] != LABEL_BORDER_NEG:
974
+ if in_bounds(mask, idx) and mask[idx] == LABEL_BACKGROUND:
980
975
  mask[idx] = value
981
976
 
982
977
  for y in range(mask.shape[0]):
@@ -1048,22 +1043,52 @@ def fill_cells(mask):
1048
1043
  else:
1049
1044
  mask[y, x] = LABEL_NEGATIVE
1050
1045
 
1046
+ for y in range(mask.shape[0]):
1047
+ for x in range(mask.shape[1]):
1048
+ if mask[y, x] == LABEL_BORDER_POS:
1049
+ mask[y, x] = LABEL_POSITIVE
1050
+ elif mask[y, x] == LABEL_BORDER_NEG:
1051
+ mask[y, x] = LABEL_NEGATIVE
1052
+
1053
+
1054
+ @jit(nopython=True)
1055
+ def create_outer_boundary(mask):
1056
+ """
1057
+ For a mask with positive and negative cell labels,
1058
+ set pixels neighboring the cells in-place to border labels.
1059
+
1060
+ Parameters
1061
+ ----------
1062
+ mask : ndarray
1063
+ 2D uint8 label map.
1064
+ """
1065
+
1066
+ border_neighbors = [(0, -1), (-1, 0), (1, 0), (0, 1)]
1067
+
1068
+ for y in range(mask.shape[0]):
1069
+ for x in range(mask.shape[1]):
1070
+ if mask[y, x] == LABEL_POSITIVE or mask[y, x] == LABEL_NEGATIVE:
1071
+ for n in border_neighbors:
1072
+ idx2 = (y + n[0], x + n[1])
1073
+ if in_bounds(mask, idx2) and mask[idx2] == LABEL_BACKGROUND:
1074
+ mask[idx2] = LABEL_BORDER_POS if mask[y, x] == LABEL_POSITIVE else LABEL_BORDER_NEG
1075
+
1051
1076
 
1052
1077
  def calculate_large_noise_thresh(large_noise_thresh, resolution):
1053
1078
  if large_noise_thresh != 'default':
1054
1079
  return large_noise_thresh
1055
1080
  if resolution == '10x':
1056
- return 250
1057
- elif resolution == '20x':
1058
1081
  return 1000
1059
- else: # 40x
1082
+ elif resolution == '20x':
1060
1083
  return 4000
1084
+ else: # 40x
1085
+ return 16000
1061
1086
 
1062
1087
 
1063
1088
  def compute_cell_results(seg, marker, resolution, version=3,
1064
1089
  seg_thresh=DEFAULT_SEG_THRESH,
1065
1090
  noise_thresh=DEFAULT_NOISE_THRESH,
1066
- large_noise_thresh='default'):
1091
+ large_noise_thresh=None):
1067
1092
  """
1068
1093
  Perform postprocessing to compute individual cell results.
1069
1094
 
@@ -1134,7 +1159,7 @@ def compute_final_results(orig, seg, marker, resolution,
1134
1159
  size_thresh_upper=None,
1135
1160
  seg_thresh=DEFAULT_SEG_THRESH,
1136
1161
  noise_thresh=DEFAULT_NOISE_THRESH,
1137
- large_noise_thresh='default'):
1162
+ large_noise_thresh=None):
1138
1163
  """
1139
1164
  Perform postprocessing to compute final count and image results.
1140
1165
 
@@ -1184,6 +1209,7 @@ def compute_final_results(orig, seg, marker, resolution,
1184
1209
 
1185
1210
  counts = create_cell_classification(mask, cellsinfo, size_thresh, marker_thresh, size_thresh_upper)
1186
1211
  enlarge_cell_boundaries(mask)
1212
+ enlarge_cell_boundaries(mask)
1187
1213
  overlay, refined = create_final_images(np.array(orig), mask)
1188
1214
 
1189
1215
  scoring = {
@@ -1260,6 +1286,8 @@ def cells_to_final_results(data, orig,
1260
1286
  mark_background(mask)
1261
1287
  fill_cells(mask)
1262
1288
 
1289
+ create_outer_boundary(mask)
1290
+ enlarge_cell_boundaries(mask)
1263
1291
  enlarge_cell_boundaries(mask)
1264
1292
  overlay, refined = create_final_images(np.array(orig), mask)
1265
1293
 
@@ -489,9 +489,8 @@ class WSIReader:
489
489
  self._file.close()
490
490
 
491
491
  self._bfreader = None
492
- if self._tif is None:
493
- self._rescale = (self._pixel_type != 'uint8')
494
- self._bfreader = bioformats.ImageReader(path)
492
+ self._rescale = (self._pixel_type != 'uint8')
493
+ self._bfreader = bioformats.ImageReader(path)
495
494
 
496
495
  if self._tif is None and self._bfreader is None:
497
496
  raise Exception('Cannot read WSI file.')
@@ -520,7 +519,10 @@ class WSIReader:
520
519
  def read(self, xywh):
521
520
  if self._tif is not None:
522
521
  x, y, w, h = xywh
523
- return self._zarr[y:y+h, x:x+w]
522
+ try:
523
+ return self._zarr[y:y+h, x:x+w]
524
+ except Exception as e:
525
+ pass
524
526
 
525
527
  px = self._bfreader.read(XYWH=xywh, rescale=self._rescale)
526
528
  if self._rescale:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deepliif
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: DeepLIIF: Deep-Learning Inferred Multiplex Immunofluorescence for Immunohistochemical Image Quantification
5
5
  Home-page: https://github.com/nadeemlab/DeepLIIF
6
6
  Author: Parmida93
@@ -53,7 +53,7 @@ segmentation.*
53
53
 
54
54
  © This code is made available for non-commercial academic purposes.
55
55
 
56
- ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.0&color=darkgreen)
56
+ ![Version](https://img.shields.io/static/v1?label=latest&message=v1.2.2&color=darkgreen)
57
57
  [![Total Downloads](https://static.pepy.tech/personalized-badge/deepliif?period=total&units=international_system&left_color=grey&right_color=blue&left_text=total%20downloads)](https://pepy.tech/project/deepliif?&left_text=totalusers)
58
58
 
59
59
  ![overview_image](./images/overview.png)*Overview of DeepLIIF pipeline and sample input IHCs (different
@@ -0,0 +1,47 @@
1
+ LICENSE.md
2
+ README.md
3
+ cli.py
4
+ setup.cfg
5
+ setup.py
6
+ deepliif/__init__.py
7
+ deepliif/postprocessing.py
8
+ deepliif.egg-info/PKG-INFO
9
+ deepliif.egg-info/SOURCES.txt
10
+ deepliif.egg-info/dependency_links.txt
11
+ deepliif.egg-info/entry_points.txt
12
+ deepliif.egg-info/requires.txt
13
+ deepliif.egg-info/top_level.txt
14
+ deepliif/data/__init__.py
15
+ deepliif/data/aligned_dataset.py
16
+ deepliif/data/base_dataset.py
17
+ deepliif/data/colorization_dataset.py
18
+ deepliif/data/image_folder.py
19
+ deepliif/data/single_dataset.py
20
+ deepliif/data/template_dataset.py
21
+ deepliif/data/unaligned_dataset.py
22
+ deepliif/models/CycleGAN_model.py
23
+ deepliif/models/DeepLIIFExt_model.py
24
+ deepliif/models/DeepLIIFKD_model.py
25
+ deepliif/models/DeepLIIF_model.py
26
+ deepliif/models/SDG_model.py
27
+ deepliif/models/__init__.py
28
+ deepliif/models/att_unet.py
29
+ deepliif/models/base_model.py
30
+ deepliif/models/networks.py
31
+ deepliif/options/__init__.py
32
+ deepliif/options/base_options.py
33
+ deepliif/options/processing_options.py
34
+ deepliif/options/test_options.py
35
+ deepliif/options/train_options.py
36
+ deepliif/util/__init__.py
37
+ deepliif/util/checks.py
38
+ deepliif/util/get_data.py
39
+ deepliif/util/html.py
40
+ deepliif/util/image_pool.py
41
+ deepliif/util/util.py
42
+ deepliif/util/visualizer.py
43
+ tests/test_args.py
44
+ tests/test_cli_inference.py
45
+ tests/test_cli_serialize.py
46
+ tests/test_cli_train.py
47
+ tests/test_cli_trainlaunch.py
@@ -1,5 +1,5 @@
1
1
  opencv-python==4.8.1.78
2
- torch==1.13.1
2
+ torch==2.8.0
3
3
  torchvision==0.14.1
4
4
  scikit-image==0.18.3
5
5
  dominate==2.6.0
@@ -3,7 +3,7 @@ name = deepliif
3
3
  description_file = README.md
4
4
  author = Parmida93
5
5
  author_email = ghahremani.parmida@gmail.com
6
- version = 1.2.0
6
+ version = 1.2.2
7
7
  url = https://github.com/nadeemlab/DeepLIIF
8
8
 
9
9
  [egg_info]
@@ -6,7 +6,7 @@ README = (HERE / "README.md").read_text()
6
6
 
7
7
  setup(
8
8
  name='deepliif',
9
- version='1.2.0',
9
+ version='1.2.2',
10
10
  packages=['deepliif', 'deepliif.data', 'deepliif.models', 'deepliif.util', 'deepliif.options'],
11
11
 
12
12
  description='DeepLIIF: Deep-Learning Inferred Multiplex Immunofluorescence for Immunohistochemical Image Quantification',
@@ -21,7 +21,7 @@ setup(
21
21
  py_modules=['cli'],
22
22
  install_requires=[
23
23
  "opencv-python==4.8.1.78",
24
- "torch==1.13.1",
24
+ "torch==2.8.0",
25
25
  "torchvision==0.14.1",
26
26
  "scikit-image==0.18.3",
27
27
  "dominate==2.6.0",
deepliif-1.2.0/.gitignore DELETED
@@ -1,147 +0,0 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- .idea/*
7
-
8
- # C extensions
9
- *.so
10
-
11
- # Distribution / packaging
12
- .Python
13
- build/
14
- develop-eggs/
15
- dist/
16
- downloads/
17
- eggs/
18
- .eggs/
19
- lib/
20
- lib64/
21
- parts/
22
- sdist/
23
- var/
24
- wheels/
25
- pip-wheel-metadata/
26
- share/python-wheels/
27
- *.egg-info/
28
- .installed.cfg
29
- *.egg
30
- MANIFEST
31
-
32
- # PyInstaller
33
- # Usually these files are written by a python script from a template
34
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
- *.manifest
36
- *.spec
37
-
38
- # Installer logs
39
- pip-log.txt
40
- pip-delete-this-directory.txt
41
-
42
- # Unit test / coverage reports
43
- htmlcov/
44
- .tox/
45
- .nox/
46
- .coverage
47
- .coverage.*
48
- .cache
49
- nosetests.xml
50
- coverage.xml
51
- *.cover
52
- *.py,cover
53
- .hypothesis/
54
- .pytest_cache/
55
-
56
- # Translations
57
- *.mo
58
- *.pot
59
-
60
- # Django stuff:
61
- *.log
62
- *.out
63
- local_settings.py
64
- db.sqlite3
65
- db.sqlite3-journal
66
-
67
- # Flask stuff:
68
- instance/
69
- .webassets-cache
70
-
71
- # Scrapy stuff:
72
- .scrapy
73
-
74
- # Sphinx documentation
75
- docs/_build/
76
-
77
- # PyBuilder
78
- target/
79
-
80
- # Jupyter Notebook
81
- .ipynb_checkpoints
82
-
83
- # IPython
84
- profile_default/
85
- ipython_config.py
86
-
87
- # pyenv
88
- .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
- __pypackages__/
99
-
100
- # Celery stuff
101
- celerybeat-schedule
102
- celerybeat.pid
103
-
104
- # SageMath parsed files
105
- *.sage.py
106
-
107
- # Environments
108
- .env
109
- .venv
110
- env/
111
- venv/
112
- ENV/
113
- env.bak/
114
- venv.bak/
115
-
116
- # Spyder project settings
117
- .spyderproject
118
- .spyproject
119
-
120
- # Rope project settings
121
- .ropeproject
122
-
123
- # mkdocs documentation
124
- /site
125
-
126
- # mypy
127
- .mypy_cache/
128
- .dmypy.json
129
- dmypy.json
130
-
131
- # Pyre type checker
132
- .pyre/
133
-
134
-
135
- # Checkpoints and results
136
- /checkpoints/
137
- /model-server/
138
- /results/*
139
-
140
- **/.ipynb_checkpoints/*
141
- **/.virtual_documents/*
142
- assets/.METADATA/job_run.*
143
- assets/job_run
144
- cover/
145
- .pybuilder/
146
- .pytype/
147
- cython_debug/
@@ -1,10 +0,0 @@
1
- {
2
- "num_total": 183,
3
- "num_pos": 15,
4
- "num_neg": 168,
5
- "percent_pos": 8.2,
6
- "prob_thresh": 150,
7
- "size_thresh": 30,
8
- "size_thresh_upper": null,
9
- "marker_thresh": null
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "num_total": 60,
3
- "num_pos": 11,
4
- "num_neg": 49,
5
- "percent_pos": 18.3,
6
- "prob_thresh": 150,
7
- "size_thresh": 78,
8
- "size_thresh_upper": null,
9
- "marker_thresh": null
10
- }
@@ -1,22 +0,0 @@
1
- {
2
- "Lung1": {
3
- "num_total": 60,
4
- "num_pos": 11,
5
- "num_neg": 49,
6
- "percent_pos": 18.3,
7
- "prob_thresh": 150,
8
- "size_thresh": 78,
9
- "size_thresh_upper": null,
10
- "marker_thresh": null
11
- },
12
- "Bladder1": {
13
- "num_total": 183,
14
- "num_pos": 15,
15
- "num_neg": 168,
16
- "percent_pos": 8.2,
17
- "prob_thresh": 150,
18
- "size_thresh": 30,
19
- "size_thresh_upper": null,
20
- "marker_thresh": null
21
- }
22
- }