philippendres commited on
Commit
907462b
·
verified ·
1 Parent(s): b3711f9

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +57 -0
  2. CellPilot/.gitmodules +6 -0
  3. CellPilot/README.md +72 -0
  4. CellPilot/cellpilot/__init__.py +0 -0
  5. CellPilot/cellpilot/__pycache__/LoRA_Sam.cpython-310.pyc +0 -0
  6. CellPilot/cellpilot/__pycache__/__init__.cpython-310.pyc +0 -0
  7. CellPilot/cellpilot/__pycache__/__init__.cpython-312.pyc +0 -0
  8. CellPilot/cellpilot/__pycache__/data_utils.cpython-310.pyc +0 -0
  9. CellPilot/cellpilot/__pycache__/samhi.cpython-310.pyc +0 -0
  10. CellPilot/cellpilot/data_processing/__pycache__/data_fetching.cpython-310.pyc +0 -0
  11. CellPilot/cellpilot/data_processing/__pycache__/data_utils.cpython-310.pyc +0 -0
  12. CellPilot/cellpilot/data_processing/__pycache__/dataset.cpython-310.pyc +0 -0
  13. CellPilot/cellpilot/data_processing/data_fetching.py +473 -0
  14. CellPilot/cellpilot/data_processing/data_processing.md +33 -0
  15. CellPilot/cellpilot/data_processing/data_utils.py +368 -0
  16. CellPilot/cellpilot/data_processing/dataset.py +110 -0
  17. CellPilot/cellpilot/inference/__pycache__/app_tools.cpython-310.pyc +0 -0
  18. CellPilot/cellpilot/inference/__pycache__/display.cpython-310.pyc +0 -0
  19. CellPilot/cellpilot/inference/__pycache__/evaluation_tools.cpython-310.pyc +0 -0
  20. CellPilot/cellpilot/inference/__pycache__/inference.cpython-310.pyc +0 -0
  21. CellPilot/cellpilot/inference/__pycache__/inference.cpython-312.pyc +0 -0
  22. CellPilot/cellpilot/inference/app_tools.py +195 -0
  23. CellPilot/cellpilot/inference/display.py +32 -0
  24. CellPilot/cellpilot/inference/evaluation_tools.py +328 -0
  25. CellPilot/cellpilot/inference/inference.py +140 -0
  26. CellPilot/cellpilot/modeling/LoRA_Sam.py +224 -0
  27. CellPilot/cellpilot/modeling/__pycache__/LoRA_Sam.cpython-310.pyc +0 -0
  28. CellPilot/cellpilot/modeling/__pycache__/LoRA_Sam.cpython-312.pyc +0 -0
  29. CellPilot/cellpilot/modeling/__pycache__/model.cpython-310.pyc +0 -0
  30. CellPilot/cellpilot/modeling/__pycache__/model.cpython-312.pyc +0 -0
  31. CellPilot/cellpilot/modeling/__pycache__/predictor.cpython-310.pyc +0 -0
  32. CellPilot/cellpilot/modeling/model.py +237 -0
  33. CellPilot/cellpilot/modeling/predictor.py +174 -0
  34. CellPilot/environment.yml +344 -0
  35. CellPilot/images/app.png +0 -0
  36. CellPilot/images/model.png +3 -0
  37. CellPilot/notebooks/automatic.ipynb +0 -0
  38. CellPilot/notebooks/interactive.ipynb +0 -0
  39. CellPilot/notebooks/wandb/debug-cli.ubuntu.log +0 -0
  40. CellPilot/notebooks/wandb/debug-internal.log +0 -0
  41. CellPilot/notebooks/wandb/debug.log +57 -0
  42. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml +316 -0
  43. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml +35 -0
  44. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log +33 -0
  45. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/requirements.txt +378 -0
  46. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-metadata.json +87 -0
  47. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-summary.json +1 -0
  48. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug-internal.log +486 -0
  49. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug.log +88 -0
  50. CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/run-2vmzqu3d.wandb +0 -0
.gitattributes CHANGED
@@ -33,3 +33,60 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ CellPilot/images/model.png filter=lfs diff=lfs merge=lfs -text
37
+ CellPilot/resources/CellViT/docs/figures/example.gif filter=lfs diff=lfs merge=lfs -text
38
+ CellPilot/resources/CellViT/docs/figures/network_large.png filter=lfs diff=lfs merge=lfs -text
39
+ CellPilot/resources/CellViT/docs/figures/qupath.gif filter=lfs diff=lfs merge=lfs -text
40
+ CellPilot/resources/SimpleClick/assets/test_imgs/ssTEM_00.tiff filter=lfs diff=lfs merge=lfs -text
41
+ MTdata/data_analysis/.ipynb_checkpoints/camelyon17-checkpoint.ipynb filter=lfs diff=lfs merge=lfs -text
42
+ MTdata/data_analysis/CATCH.ipynb filter=lfs diff=lfs merge=lfs -text
43
+ MTdata/data_analysis/Janow.ipynb filter=lfs diff=lfs merge=lfs -text
44
+ MTdata/data_analysis/PAIP.ipynb filter=lfs diff=lfs merge=lfs -text
45
+ MTdata/data_analysis/camelyon17.ipynb filter=lfs diff=lfs merge=lfs -text
46
+ SAMHI/images/model.png filter=lfs diff=lfs merge=lfs -text
47
+ SAMHI/resources/CellViT/docs/figures/example.gif filter=lfs diff=lfs merge=lfs -text
48
+ SAMHI/resources/CellViT/docs/figures/network_large.png filter=lfs diff=lfs merge=lfs -text
49
+ SAMHI/resources/CellViT/docs/figures/qupath.gif filter=lfs diff=lfs merge=lfs -text
50
+ SAMHI/resources/SimpleClick/assets/test_imgs/ssTEM_00.tiff filter=lfs diff=lfs merge=lfs -text
51
+ aws/dist/_awscrt.abi3.so filter=lfs diff=lfs merge=lfs -text
52
+ aws/dist/_ruamel_yaml.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
53
+ aws/dist/aws filter=lfs diff=lfs merge=lfs -text
54
+ aws/dist/aws_completer filter=lfs diff=lfs merge=lfs -text
55
+ aws/dist/awscli/data/ac.index filter=lfs diff=lfs merge=lfs -text
56
+ aws/dist/cryptography/hazmat/bindings/_openssl.abi3.so filter=lfs diff=lfs merge=lfs -text
57
+ aws/dist/lib-dynload/_decimal.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
58
+ aws/dist/lib-dynload/_hashlib.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
59
+ aws/dist/lib-dynload/_ssl.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
60
+ aws/dist/lib-dynload/pyexpat.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
61
+ aws/dist/lib-dynload/unicodedata.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
62
+ aws/dist/libpython3.11.so.1.0 filter=lfs diff=lfs merge=lfs -text
63
+ aws/dist/libsqlite3.so.0 filter=lfs diff=lfs merge=lfs -text
64
+ repositories/CellViT/docs/figures/example.gif filter=lfs diff=lfs merge=lfs -text
65
+ repositories/CellViT/docs/figures/network_large.png filter=lfs diff=lfs merge=lfs -text
66
+ repositories/CellViT/docs/figures/qupath.gif filter=lfs diff=lfs merge=lfs -text
67
+ repositories/SimpleClick/assets/test_imgs/ssTEM_00.tiff filter=lfs diff=lfs merge=lfs -text
68
+ samples/CRAG_image.png filter=lfs diff=lfs merge=lfs -text
69
+ samples/CoCaHis_image.png filter=lfs diff=lfs merge=lfs -text
70
+ samples/Janowczyk_image.png filter=lfs diff=lfs merge=lfs -text
71
+ samples/Kumar_image.png filter=lfs diff=lfs merge=lfs -text
72
+ samples/MoNuSAC_image.png filter=lfs diff=lfs merge=lfs -text
73
+ samples/TIGER_bulk_image.png filter=lfs diff=lfs merge=lfs -text
74
+ samples/cellseg.png filter=lfs diff=lfs merge=lfs -text
75
+ samples/cellvit_output.png filter=lfs diff=lfs merge=lfs -text
76
+ samples/final/cellseg_0.png filter=lfs diff=lfs merge=lfs -text
77
+ samples/final/cellseg_2.png filter=lfs diff=lfs merge=lfs -text
78
+ samples/final/cellseg_6.png filter=lfs diff=lfs merge=lfs -text
79
+ samples/results/cellseg_box_medsam.png filter=lfs diff=lfs merge=lfs -text
80
+ samples/results/cellseg_box_ours.png filter=lfs diff=lfs merge=lfs -text
81
+ samples/results/crag_box_gt.png filter=lfs diff=lfs merge=lfs -text
82
+ samples/results/crag_box_medsam.png filter=lfs diff=lfs merge=lfs -text
83
+ samples/results/crag_box_ours.png filter=lfs diff=lfs merge=lfs -text
84
+ samples/results/crag_box_sam.png filter=lfs diff=lfs merge=lfs -text
85
+ samples/results/monusac_box_gt.png filter=lfs diff=lfs merge=lfs -text
86
+ samples/results/monusac_boxes_gt.png filter=lfs diff=lfs merge=lfs -text
87
+ samples/results/monusac_boxes_medsam.png filter=lfs diff=lfs merge=lfs -text
88
+ samples/results/monusac_boxes_ours.png filter=lfs diff=lfs merge=lfs -text
89
+ samples/results/monusac_boxes_sam.png filter=lfs diff=lfs merge=lfs -text
90
+ segment-anything/assets/masks1.png filter=lfs diff=lfs merge=lfs -text
91
+ segment-anything/assets/minidemo.gif filter=lfs diff=lfs merge=lfs -text
92
+ segment-anything/assets/notebook2.png filter=lfs diff=lfs merge=lfs -text
CellPilot/.gitmodules ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [submodule "resources/SimpleClick"]
2
+ path = resources/SimpleClick
3
+ url = https://github.com/philippendres/SimpleClick.git
4
+ [submodule "resources/CellViT"]
5
+ path = resources/CellViT
6
+ url = https://github.com/philippendres/CellViT.git
CellPilot/README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CellPilot
2
+ This repository contains the code of CellPilot, a deep learning-based method for the automatic and interactive segmentation of cells and glands in histological images. CellPilot uses [SAM](https://arxiv.org/abs/2304.02643) and [CellViT](https://arxiv.org/abs/2306.15350) and is fine-tuned on large-scale segmentation datasets of histological images.
3
+ ![Model](./images/model.png)
4
+
5
+ ## Key Features
6
+ - **Automatic Segmentation**: CellPilot allows users to automatically segment cells in histological images.
7
+ - **Interactive Segmentation**: CellPilot allows users to interactively segment cells and glands in histological images.
8
+
9
+ ## Setup
10
+ 1. Clone the repository with: `git clone https://github.com/philippendres/CellPilot.git`
11
+ 2. Create a new conda environment with the provided environment.yml file:
12
+ ```
13
+ conda env create -f environment.yml
14
+ conda activate histo3.10
15
+ ```
16
+ 3. Install the resources:
17
+ ```
18
+ cd resources
19
+ cd CellViT
20
+ git submodule init
21
+ git submodule update
22
+ pip install -e .
23
+ cd ..
24
+ cd SimpleClick
25
+ git submodule init
26
+ git submodule update
27
+ pip install -e .
28
+ cd ..
29
+ cd ..
30
+ ```
31
+ 4. Install our package:
32
+ ```
33
+ pip install -e .
34
+ ```
35
+ 5. - For inference: Download the weights of the CellPilot model and the CellViT model: [CellPilot](https://1drv.ms/u/c/696e40c0eaa91ac3/EfwN6MP4IqpHityPWHnHkkgBh5MyZEdYGVf9soXDs0gKOg?e=M8DVNQ), [CellViT](https://drive.google.com/uc?export=download&id=1tVYAapUo1Xt8QgCN22Ne1urbbCZkah8q)
36
+ - For training: Download the weights of the SAM model: [SAM](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth)
37
+ - For model comparisons: Download the weights of the SimpleClick and the MedSAM model: [SimpleClick](https://drive.google.com/file/d/1dLAEFXhnk_Nebq3Net11sf6MjRCBEe0O/view?usp=drive_link), [MedSAM](https://drive.google.com/file/d/1UAmWL88roYR7wKlnApw5Bcuzf2iQgk6_/view?usp=drive_link)
38
+
39
+ ## Usage
40
+ ### App
41
+ Run the gradio webapplication with the following command:
42
+ ```
43
+ python app.py --model_dir <model_dir> --model_name <model_name> --cellvit_model <cellvit_model>
44
+ ```
45
+ The app has the following arguments:
46
+ - **model_dir**: The directory where the CellPilot and the CellViT model are stored.
47
+ - **model_name**: The name of the CellPilot model.
48
+ - **cellvit_model**: The name of the CellViT model.
49
+
50
+ The command above will generate a link to a webapplication where you can upload your own images and segment them with SAMHI.
51
+ The app will look like this:
52
+ ![App](./images/app.png)
53
+ The app has the following features:
54
+ - **Upload Image**: Upload your own image to segment in the upper left corner.
55
+ - **Auto Segment**: Automatically segment the uploaded image with CellPilot.
56
+ - **Add Mask**: Interactively add a mask with CellPilot by drawing points and bounding boxes on the image.
57
+ - **Refine Mask**: Refine an existing mask by drawing points and bounding boxes on the image.
58
+ - **Remove Mask**: Remove an existing mask by clicking on it.
59
+ - **Move the Image**: Move the image with the arrow symbols.
60
+ - **Zoom the Image**: Zoom the image with the zoom bar.
61
+
62
+ <!-- ### Training
63
+ Check that the data is stored in the structure given in [data_processing.md](./samhi/data_processing/data_processing.md)
64
+ Run the training script with the following command:
65
+ ```
66
+ python train.py
67
+ ```
68
+ The evaluation script has the following arguments:
69
+ - **cluster**: The cluster to run the training on.
70
+ - **model_dir**: The directory where the SAMHI and the CellViT model are stored. -->
71
+
72
+
CellPilot/cellpilot/__init__.py ADDED
File without changes
CellPilot/cellpilot/__pycache__/LoRA_Sam.cpython-310.pyc ADDED
Binary file (6.75 kB). View file
 
CellPilot/cellpilot/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (154 Bytes). View file
 
CellPilot/cellpilot/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (148 Bytes). View file
 
CellPilot/cellpilot/__pycache__/data_utils.cpython-310.pyc ADDED
Binary file (29.8 kB). View file
 
CellPilot/cellpilot/__pycache__/samhi.cpython-310.pyc ADDED
Binary file (3.58 kB). View file
 
CellPilot/cellpilot/data_processing/__pycache__/data_fetching.cpython-310.pyc ADDED
Binary file (17.9 kB). View file
 
CellPilot/cellpilot/data_processing/__pycache__/data_utils.cpython-310.pyc ADDED
Binary file (12.4 kB). View file
 
CellPilot/cellpilot/data_processing/__pycache__/dataset.cpython-310.pyc ADDED
Binary file (4.39 kB). View file
 
CellPilot/cellpilot/data_processing/data_fetching.py ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import numpy as np
3
+
4
+ class DataFetcher:
5
+ def __init__(self, data_directory, cluster):
6
+ self.data_directory = data_directory
7
+ self.cluster = cluster
8
+
9
+ def len_bcss(self):
10
+ return len(os.listdir(os.path.join(self.data_directory, 'BCSS/0_Public-data-Amgad2019_0.25MPP', 'masks')))
11
+
12
+ def len_camelyon(self):
13
+ self.cam_len = [len(os.listdir(os.path.join(self.data_directory, 'CAMELYON/CAMELYON16/images/'))),
14
+ len(os.listdir(os.path.join(self.data_directory, 'CAMELYON/CAMELYON17/images/')))]
15
+ return self.cam_len[0] + self.cam_len[1]
16
+
17
+ def len_cellseg(self):
18
+ self.cellseg_len = [
19
+ len(os.listdir(os.path.join(self.data_directory, 'CellSeg/NeurIPS22-CellSeg', 'Testing/Hidden/images/'))),
20
+ len(os.listdir(os.path.join(self.data_directory, 'CellSeg/NeurIPS22-CellSeg', 'Testing/Public/images/'))),
21
+ len(os.listdir(os.path.join(self.data_directory, 'CellSeg/NeurIPS22-CellSeg', 'Training/images/'))),
22
+ len(os.listdir(os.path.join(self.data_directory, 'CellSeg/NeurIPS22-CellSeg', 'Tuning/images/')))
23
+ ]
24
+ return sum(self.cellseg_len)
25
+
26
+ def len_cocahis(self):
27
+ return 82
28
+
29
+ def len_conic(self):
30
+ return len(os.listdir(os.path.join(self.data_directory, 'CoNIC/labels_png/')))
31
+
32
+ def len_cpm(self):
33
+ self.cpm_len = [len(os.listdir(os.path.join(self.data_directory, 'CPM_15_and_17/cpm15/Labels_png/'))),
34
+ len(os.listdir(os.path.join(self.data_directory, 'CPM_15_and_17/cpm17/test/Labels_png/'))),
35
+ len(os.listdir(os.path.join(self.data_directory, 'CPM_15_and_17/cpm17/train/Labels_png/')))]
36
+ return self.cpm_len[0] + self.cpm_len[1] + self.cpm_len[2]
37
+
38
+ def len_crag(self):
39
+ self.crag_len = [len(os.listdir(os.path.join(self.data_directory, 'CRAG/cell_CRAG/train2017/labels/'))),
40
+ len(os.listdir(os.path.join(self.data_directory, 'CRAG/cell_CRAG/val2017/labels/')))]
41
+ return self.crag_len[0] + self.crag_len[1]
42
+
43
+ def len_cryonuseg(self):
44
+ return 30
45
+
46
+ def len_glas(self):
47
+ return 60 + 20 + 85
48
+
49
+ def len_icia2018(self):
50
+ return 10
51
+
52
+ def len_janowczyk(self):
53
+ return 141
54
+
55
+ def len_kpi(self):
56
+ if self.cluster != "denbi":
57
+ data_directories = [os.path.join(self.data_directory, 'KPI/', 'Task1_patch_level/data'), os.path.join(self.data_directory, 'KPI/', 'val/Task1_patch_level/data')]
58
+ else:
59
+ data_directories = [os.path.join(self.data_directory, 'KPI/', 'KPIs24 Training Data/Task1_patch_level/data'), os.path.join(self.data_directory, 'KPI/', 'KPIs24 Validation Data/Task1_patch_level/data')]
60
+ arr_length = 2
61
+ for (i0, data_directory) in enumerate(data_directories):
62
+ dir_list = sorted(os.listdir(data_directory))
63
+ arr_length += len(dir_list)
64
+ for (i1, d1) in enumerate(dir_list):
65
+ subdir_list = sorted(os.listdir(os.path.join(data_directory, d1)))
66
+ arr_length += len(subdir_list)
67
+ pointer = np.zeros(arr_length, dtype=int)
68
+ length = np.zeros(arr_length, dtype=int)
69
+ pointer[0] = len(data_directories)
70
+ len_last_dir_list = 0
71
+ len_last_subdir_list = 0
72
+ for (i0, data_directory) in enumerate(data_directories):
73
+ dir_list = sorted(os.listdir(data_directory))
74
+ len_last_dir_list = len(dir_list)
75
+ pointer[pointer[i0]] = pointer[i0] + len_last_dir_list
76
+ for (i1, d1) in enumerate(dir_list):
77
+ subdir_list = sorted(os.listdir(os.path.join(data_directory, d1)))
78
+ len_last_subdir_list = len(subdir_list)
79
+ for (i2, d2) in enumerate(subdir_list):
80
+ file_list = os.listdir(os.path.join(data_directory, d1, d2,'img'))
81
+ length[pointer[pointer[i0] + i1] + i2] = len(file_list)
82
+ length[pointer[i0] + i1] += len(file_list)
83
+ length[i0] += len(file_list)
84
+ if i1 < len(dir_list) - 1:
85
+ pointer[pointer[i0] + i1 + 1] = pointer[pointer[i0] + i1] + len(subdir_list)
86
+
87
+ if i0 < len(data_directories) - 1:
88
+ pointer[i0 + 1] = pointer[pointer[i0] + len_last_dir_list - 1] + len_last_subdir_list
89
+ self.pointer = pointer
90
+ self.length = length
91
+ # pointer = array([ 2, 36, 6, 11, 16, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 42, 44, 46, 0, 0, 0, 0, 0, 0, 0, 0])
92
+ # length = array([5214, 1643, 558, 607, 2263, 1786, 92, 96, 141, 86, 143, 135, 134, 71, 129, 138, 143, 187, 166, 146, 133, 111, 156, 177, 152, 147, 150, 93, 156, 218, 128, 358, 390, 313, 370, 355, 274, 299, 209, 861, 144, 130, 182, 117, 106, 103, 415, 446])
93
+ return self.length[0] + self.length[1]
94
+
95
+ def len_kumar(self):
96
+ self.kumar_len = [len(os.listdir(os.path.join(self.data_directory, 'Kumar', 'train/Labels_png'))),
97
+ len(os.listdir(os.path.join(self.data_directory, 'Kumar', 'test_same/Labels_png'))),
98
+ len(os.listdir(os.path.join(self.data_directory, 'Kumar', 'test_diff/Labels_png')))]
99
+ return self.kumar_len[0] + self.kumar_len[1] + self.kumar_len[2]
100
+
101
+ def len_monusac(self):
102
+ return len(os.listdir(os.path.join(self.data_directory, 'MoNuSAC/masks/')))
103
+
104
+ def len_monuseg(self):
105
+ return 37
106
+
107
+ def len_nuclick(self):
108
+ return 1213 + 250 + 462 + 150
109
+
110
+ def len_paip2023(self):
111
+ return 50 + 50 + 3 + 3
112
+
113
+ def len_pannuke(self):
114
+ return 2656 #7466
115
+
116
+ def len_segpath(self):
117
+ return 10647 + 26509 + 24805 + 12273 + 14135 + 13231 + 25909 + 31178
118
+
119
+ def len_segpc(self):
120
+ return 298 + 199
121
+
122
+ def len_tiger(self):
123
+ return 1879
124
+
125
+ def len_tnbc(self):
126
+ return 7 + 3 + 5 + 8 + 4 + 3 + 3 + 4 + 6 + 4 + 3
127
+
128
+ def len_wsss4luad(self):
129
+ return 40
130
+
131
+ def get_cpm(self, idx):
132
+ data_directory = os.path.join(self.data_directory, 'CPM_15_and_17/')
133
+ if idx < self.cpm_len[0]:
134
+ mask_names = os.listdir(data_directory + 'cpm15/Labels_png/')
135
+ image_name = data_directory + 'cpm15/Images/' + mask_names[idx][:8] + ".png"
136
+ mask_name = data_directory + 'cpm15/Labels_png/' + mask_names[idx]
137
+ elif idx < self.cpm_len[0] + self.cpm_len[1]:
138
+ mask_names = os.listdir(data_directory + 'cpm17/test/Labels_png/')
139
+ image_name = data_directory + 'cpm17/test/Images/' + mask_names[idx-self.cpm_len[0]][:8] + ".png"
140
+ mask_name = data_directory + 'cpm17/test/Labels_png/' + mask_names[idx-self.cpm_len[0]]
141
+ else:
142
+ mask_names = os.listdir(data_directory + 'cpm17/train/Labels_png/')
143
+ image_name = data_directory + 'cpm17/train/Images/' + mask_names[idx-self.cpm_len[0]-self.cpm_len[1]][:8] + ".png"
144
+ mask_name = data_directory + 'cpm17/train/Labels_png/' + mask_names[idx-self.cpm_len[0]-self.cpm_len[1]]
145
+ return image_name, mask_name
146
+
147
+ def get_bcss(self, idx):
148
+ data_directory = os.path.join(self.data_directory, 'BCSS/0_Public-data-Amgad2019_0.25MPP/')
149
+ if self.cluster != "denbi":
150
+ mask_names = os.listdir(data_directory + 'masks/')
151
+ image_name = data_directory + 'rgbs_colorNormalized/' + mask_names[idx]
152
+ mask_name = data_directory + 'masks/' + mask_names[idx]
153
+ else:
154
+ image_names = os.listdir(data_directory + 'images/')
155
+ image_name = data_directory + 'images/' + image_names[idx]
156
+ mask_name = data_directory + 'masks/' + image_names[idx]
157
+ return image_name, mask_name
158
+
159
+
160
+ def get_camelyon(self, idx):
161
+ if idx < self.cam_len[0]:
162
+ data_directory = os.path.join(self.data_directory, 'CAMELYON/CAMELYON16/')
163
+ else:
164
+ data_directory = os.path.join(self.data_directory, 'CAMELYON/CAMELYON17/')
165
+ idx -= self.cam_len[0]
166
+ image_names = os.listdir(data_directory + 'images/')
167
+ image_name = data_directory + 'images/' + image_names[idx]
168
+ mask_name = data_directory + 'masks/' + image_names[idx][:-4] + '_mask.tif'
169
+ return image_name, mask_name
170
+
171
+ def get_cellseg(self, idx):
172
+ data_directory = os.path.join(self.data_directory, 'CellSeg/NeurIPS22-CellSeg/')
173
+ if idx < self.cellseg_len[0]:
174
+ image_names = os.listdir(data_directory + 'Testing/Hidden/images/')
175
+ image_name = data_directory + 'Testing/Hidden/images/' + image_names[idx]
176
+ mask_name = data_directory + 'Testing/Hidden/osilab_seg/' + image_names[idx][:14] + '_label.tiff'
177
+ elif idx < self.cellseg_len[0] + self.cellseg_len[1]:
178
+ image_names = os.listdir(data_directory + 'Testing/Public/images/')
179
+ image_name = data_directory + 'Testing/Public/images/' + image_names[idx-self.cellseg_len[0]]
180
+ mask_name = data_directory + 'Testing/Public/labels/' + image_names[idx-self.cellseg_len[0]][:12] + '_label.tiff'
181
+ elif idx < self.cellseg_len[0] + self.cellseg_len[1] + self.cellseg_len[2]:
182
+ image_names = os.listdir(data_directory + 'Training/images/')
183
+ image_name = data_directory + 'Training/images/' + image_names[idx-self.cellseg_len[0]-self.cellseg_len[1]]
184
+ mask_name = data_directory + 'Training/labels/' + image_names[idx-self.cellseg_len[0]-self.cellseg_len[1]][:10] + '_label.tiff'
185
+ else:
186
+ image_names = os.listdir(data_directory + 'Tuning/images/')
187
+ image_name = data_directory + 'Tuning/images/' + image_names[idx-self.cellseg_len[0]-self.cellseg_len[1]-self.cellseg_len[2]]
188
+ mask_name = data_directory + 'Tuning/labels/' + image_names[idx-self.cellseg_len[0]-self.cellseg_len[1]-self.cellseg_len[2]][:10] + '_label.tiff'
189
+ return image_name, mask_name
190
+
191
+ def get_cocahis(self, idx):
192
+ data_directory = os.path.join(self.data_directory, 'CoCaHis/')
193
+ #image_names = os.listdir(data_directory + 'images/')
194
+ image_name = data_directory + 'images/' + "HE_raw_" + str(idx) + ".png"
195
+ if self.cluster != "denbi":
196
+ mask_name = data_directory + 'GT/' + "GT_GT_majority_vote_" + str(idx) + ".png"
197
+ else:
198
+ mask_name = data_directory + 'labels/' + 'GT_GT_majority_vote_' + str(idx) + ".png"
199
+ return image_name, mask_name
200
+
201
+ def get_conic(self, idx):
202
+ data_directory = os.path.join(self.data_directory, 'CoNIC/')
203
+ mask_names = os.listdir(data_directory + 'labels_png/')
204
+ image_name = data_directory + 'images_png/' + mask_names[idx][:4] + ".png"
205
+ mask_name = data_directory + 'labels_png/' + mask_names[idx]
206
+ return image_name, mask_name
207
+
208
+ def get_crag(self, idx):
209
+ data_directory = os.path.join(self.data_directory, "CRAG/cell_CRAG/")
210
+ if idx < self.crag_len[0]:
211
+ mask_names = os.listdir(data_directory + 'train2017/labels/')
212
+ image_name = data_directory + 'train2017/' + mask_names[idx]
213
+ mask_name = data_directory + 'train2017/labels/' + mask_names[idx]
214
+ else:
215
+ mask_names = os.listdir(data_directory + 'val2017/labels/')
216
+ image_name = data_directory + 'val2017/' + mask_names[idx-self.crag_len[0]]
217
+ mask_name = data_directory + 'val2017/labels/' + mask_names[idx-self.crag_len[0]]
218
+ return image_name, mask_name
219
+
220
+ def get_cryonuseg(self, idx):
221
+ data_directory = os.path.join(self.data_directory, 'CryoNuSeg/')
222
+ image_names = os.listdir(data_directory + 'tissue images/')
223
+ image_name = data_directory + 'tissue images/' + image_names[idx]
224
+ mask_name = data_directory + 'Annotator 1 (biologist second round of manual marks up)/Annotator 1 (biologist second round of manual marks up)/label masks modify/' + image_names[idx]
225
+ return image_name, mask_name
226
+
227
+ def get_glas(self, idx):
228
+ data_directory = os.path.join(self.data_directory, 'GlaS/Warwick_QU_Dataset/')
229
+ if idx < 60:
230
+ image_name = data_directory + 'testA_' + str(idx + 1) + '.bmp'
231
+ mask_name = data_directory + 'testA_' + str(idx + 1) + '_anno.bmp'
232
+ elif idx < 60 + 20:
233
+ image_name = data_directory + 'testB_' + str(idx - 59) + '.bmp'
234
+ mask_name = data_directory + 'testB_' + str (idx - 59) + '_anno.bmp'
235
+ else:
236
+ image_name = data_directory + 'train_' + str(idx - 79) + '.bmp'
237
+ mask_name = data_directory + 'train_' + str(idx - 79) + '_anno.bmp'
238
+ return image_name, mask_name
239
+
240
+ def get_icia2018(self, idx):
241
+ data_directory = os.path.join(self.data_directory, 'ICIA2018/ICIAR2018_BACH_Challenge/WSI/')
242
+ image_name = data_directory + 'A' + str(idx + 1).zfill(2) + '.svs'
243
+ mask_name = data_directory + 'A' + str(idx + 1).zfill(2) + '.npy'
244
+ return image_name, mask_name
245
+
246
+ def get_janowczyk(self, idx):
247
+ data_directory = os.path.join(self.data_directory, 'Janowczyk/')
248
+ if self.cluster != "denbi":
249
+ names = os.listdir(data_directory)
250
+ image_names = [n for n in names if "original" in n]
251
+ image_names.sort()
252
+ image_name = data_directory + image_names[idx]
253
+ mask_name = data_directory + image_names[idx][:-12] + 'mask.png'
254
+ else:
255
+ image_names = os.listdir(data_directory + "images/")
256
+ image_names.sort()
257
+ image_name = data_directory + "images/" + image_names[idx]
258
+ mask_name = data_directory + "masks/" + image_names[idx][:-12] + 'mask.png'
259
+ return image_name, mask_name
260
+
261
+ def get_kpi(self, idx):
262
+ if self.cluster != "denbi":
263
+ data_directories = [os.path.join(self.data_directory, 'KPI/', 'Task1_patch_level/data'), os.path.join(self.data_directory, 'KPI/', 'val/Task1_patch_level/data')]
264
+ else:
265
+ data_directories = [os.path.join(self.data_directory, 'KPI/', "KPIs24 Training Data/Task1_patch_level/data"), os.path.join(self.data_directory, 'KPI/', "KPIs24 Validation Data/Task1_patch_level/data")]
266
+ position = 0
267
+ if idx < self.length[0]:
268
+ data_directory = data_directories[0]
269
+ position = self.pointer[0]
270
+ else:
271
+ data_directory = data_directories[1]
272
+ idx -= self.length[0]
273
+ position = self.pointer[1]
274
+ dir_list = sorted(os.listdir(data_directory))
275
+ for (i1, d1) in enumerate(dir_list):
276
+ if idx < self.length[position + i1]:
277
+ position = self.pointer[position + i1]
278
+ subdir_list = sorted(os.listdir(os.path.join(data_directory, d1)))
279
+ for (i2, d2) in enumerate(subdir_list):
280
+ if idx < self.length[position + i2]:
281
+ file_list = sorted(os.listdir(os.path.join(data_directory, d1, d2,'img')))
282
+ image_name = os.path.join(data_directory, d1, d2, 'img', file_list[idx])
283
+ mask_name = os.path.join(data_directory, d1, d2, 'mask', file_list[idx].replace('img', 'mask'))
284
+ return image_name, mask_name
285
+ else:
286
+ idx -= self.length[position + i2]
287
+ else:
288
+ idx -= self.length[position + i1]
289
+
290
+ def get_kumar(self, idx):
291
+ data_directory = os.path.join(self.data_directory, 'Kumar/')
292
+ if idx < self.kumar_len[0]:
293
+ mask_names = os.listdir(data_directory + 'train/Labels_png/')
294
+ image_name = data_directory + 'train/Images/' + mask_names[idx][:23] + ".tif"
295
+ mask_name = data_directory + 'train/Labels_png/' + mask_names[idx]
296
+ elif idx < self.kumar_len[0] + self.kumar_len[1]:
297
+ mask_names = os.listdir(data_directory + 'test_same/Labels_png/')
298
+ image_name = data_directory + 'test_same/Images/' + mask_names[idx-self.kumar_len[0]][:23] + ".tif"
299
+ mask_name = data_directory + 'test_same/Labels_png/' + mask_names[idx-self.kumar_len[0]]
300
+ else:
301
+ mask_names = os.listdir(data_directory + 'test_diff/Labels_png/')
302
+ image_name = data_directory + 'test_diff/Images/' + mask_names[idx-self.kumar_len[0]-self.kumar_len[1]][:23] + ".tif"
303
+ mask_name = data_directory + 'test_diff/Labels_png/' + mask_names[idx-self.kumar_len[0]-self.kumar_len[1]]
304
+ return image_name, mask_name
305
+
306
+ def get_monusac(self, idx):
307
+ data_directory = os.path.join(self.data_directory, 'MoNuSAC/')
308
+ mask_names = os.listdir(data_directory + 'masks/')
309
+ mask_name = data_directory + 'masks/' + mask_names[idx]
310
+ types = ["Epithelial", "Lymphocyte", "Macrophage", "Neutrophil"]
311
+ image_name = data_directory + 'images/' + mask_names[idx]
312
+ for t in types:
313
+ if mask_names[idx].endswith(t + '.png'):
314
+ image_name = data_directory + 'images/' + mask_names[idx][:-len(t)-5]
315
+ if os.path.exists(image_name + '.tif'):
316
+ image_name += '.tif'
317
+ else:
318
+ image_name += '.png'
319
+ break
320
+ return image_name, mask_name
321
+
322
+ def get_monuseg(self, idx):
323
+ data_directory = os.path.join(self.data_directory, 'MoNuSeg/MoNuSeg 2018 Training Data/')
324
+ mask_names = os.listdir(data_directory + 'Masks/')
325
+ mask_name = data_directory + 'Masks/' + mask_names[idx]
326
+ image_name = data_directory + 'Tissue Images/' + mask_names[idx][:23] + '.tif'
327
+ return image_name, mask_name
328
+
329
+ def get_nuclick(self, idx):
330
+ data_directory = os.path.join(self.data_directory, 'NuClick/')
331
+ if idx < 1213:
332
+ mask_names = os.listdir(data_directory + 'Hemato_Data/Train/masks/')
333
+ image_name = data_directory + 'Hemato_Data/Train/images/' + mask_names[idx][:-9] + ".png"
334
+ mask_name = data_directory + 'Hemato_Data/Train/masks/' + mask_names[idx]
335
+ elif idx < 1213 + 250:
336
+ mask_names = os.listdir(data_directory + 'Hemato_Data/Validation/masks/')
337
+ image_name = data_directory + 'Hemato_Data/Validation/images/' + mask_names[idx-1213][:-9] + ".png"
338
+ mask_name = data_directory + 'Hemato_Data/Validation/masks/' + mask_names[idx-1213]
339
+ elif idx < 1213 + 250 + 462:
340
+ mask_names = os.listdir(data_directory + 'IHC_nuclick/IHC/masks_png/Train/')
341
+ image_name = data_directory + 'IHC_nuclick/IHC/images/Train/' + mask_names[idx-1213-250]
342
+ mask_name = data_directory + 'IHC_nuclick/IHC/masks_png/Train/' + mask_names[idx-1213-250]
343
+ else:
344
+ mask_names = os.listdir(data_directory + 'IHC_nuclick/IHC/masks_png/Validation/')
345
+ image_name = data_directory + 'IHC_nuclick/IHC/images/Validation/' + mask_names[idx-1213-250-462]
346
+ mask_name = data_directory + 'IHC_nuclick/IHC/masks_png/Validation/' + mask_names[idx-1213-250-462]
347
+ return image_name, mask_name
348
+
349
+ def get_paip2023(self, idx):
350
+ data_directory = os.path.join(self.data_directory, 'PAIP2023/')
351
+ if idx < 50:
352
+ image_name = data_directory + 'tr_p' + str(idx + 1).zfill(3) + '.png'
353
+ mask_name = data_directory + "non_tumor/" + 'tr_p' + str(idx + 1).zfill(3) + '_nontumor.png'
354
+ elif idx < 50 + 50:
355
+ image_name = data_directory + 'tr_p' + str(idx - 50 + 1).zfill(3) + '.png'
356
+ mask_name = data_directory + "tumor/" + 'tr_p' + str(idx - 50 + 1).zfill(3) + '_tumor.png'
357
+ elif idx < 50 + 50 + 3:
358
+ image_name = data_directory + 'tr_c' + str(idx - 100 + 1).zfill(3) + '.png'
359
+ mask_name = data_directory + "non_tumor/" + 'tr_c' + str(idx -100 + 1).zfill(3) + '_nontumor.png'
360
+ else:
361
+ image_name = data_directory + 'tr_c' + str(idx - 103 + 1).zfill(3) + '.png'
362
+ mask_name = data_directory + "tumor/" + 'tr_c' + str(idx -103 + 1).zfill(3) + '_tumor.png'
363
+ return image_name, mask_name
364
+
365
+ def get_pannuke(self, idx):
366
+ data_directory = os.path.join(self.data_directory, 'PanNuke/')
367
+ image_name = data_directory + 'images_png/' + str(idx).zfill(4) + ".png"
368
+ mask_name = data_directory + 'masks_png/' + str(idx).zfill(4) + ".png"
369
+ return image_name, mask_name
370
+
371
+ def get_segpath(self, idx):
372
+ data_directory = os.path.join(self.data_directory, 'SegPath/')
373
+ if idx < 10647:
374
+ image_and_mask_names = os.listdir(data_directory + 'endothelial_cells/ERG_Endothelium/')
375
+ image_names = [x for x in image_and_mask_names if "HE" in x]
376
+ image_name = data_directory + 'endothelial_cells/ERG_Endothelium/' + image_names[idx]
377
+ mask_name = data_directory + 'endothelial_cells/ERG_Endothelium/' + image_names[idx][:-6] + 'mask.png'
378
+ elif idx < 10647 + 26509:
379
+ image_and_mask_names = os.listdir(data_directory + 'epithelial_cells/panCK_Epithelium/')
380
+ image_names = [x for x in image_and_mask_names if "HE" in x]
381
+ image_name = data_directory + 'epithelial_cells/panCK_Epithelium/' + image_names[idx-10647]
382
+ mask_name = data_directory + 'epithelial_cells/panCK_Epithelium/' + image_names[idx-10647][:-6] + 'mask.png'
383
+ elif idx < 10647 + 26509 + 24805:
384
+ image_and_mask_names = os.listdir(data_directory + 'leukocytes/CD45RB_Leukocyte/')
385
+ image_names = [x for x in image_and_mask_names if "HE" in x]
386
+ image_name = data_directory + 'leukocytes/CD45RB_Leukocyte/' + image_names[idx-10647-26509]
387
+ mask_name = data_directory + 'leukocytes/CD45RB_Leukocyte/' + image_names[idx-10647-26509][:-6] + 'mask.png'
388
+ elif idx < 10647 + 26509 + 24805 + 12273:
389
+ image_and_mask_names = os.listdir(data_directory + 'lymphocytes/CD3CD20_Lymphocyte/')
390
+ image_names = [x for x in image_and_mask_names if "HE" in x]
391
+ image_name = data_directory + 'lymphocytes/CD3CD20_Lymphocyte/' + image_names[idx-10647-26509-24805]
392
+ mask_name = data_directory + 'lymphocytes/CD3CD20_Lymphocyte/' + image_names[idx-10647-26509-24805][:-6] + 'mask.png'
393
+ elif idx < 10647 + 26509 + 24805 + 12273 + 14135:
394
+ image_and_mask_names = os.listdir(data_directory + 'myeloid_cells/MNDA_MyeloidCell/')
395
+ image_names = [x for x in image_and_mask_names if "HE" in x]
396
+ image_name = data_directory + 'myeloid_cells/MNDA_MyeloidCell/' + image_names[idx-10647-26509-24805-12273]
397
+ mask_name = data_directory + 'myeloid_cells/MNDA_MyeloidCell/' + image_names[idx-10647-26509-24805-12273][:-6] + 'mask.png'
398
+ elif idx < 10647 + 26509 + 24805 + 12273 + 14135 + 13231:
399
+ image_and_mask_names = os.listdir(data_directory + 'plasma_cells/MIST1_PlasmaCell/')
400
+ image_names = [x for x in image_and_mask_names if "HE" in x]
401
+ image_name = data_directory + 'plasma_cells/MIST1_PlasmaCell/' + image_names[idx-10647-26509-24805-12273-14135]
402
+ mask_name = data_directory + 'plasma_cells/MIST1_PlasmaCell/' + image_names[idx-10647-26509-24805-12273-14135][:-6] + 'mask.png'
403
+ elif idx < 10647 + 26509 + 24805 + 12273 + 14135 + 13231 + 25909:
404
+ image_and_mask_names = os.listdir(data_directory + 'red_blood_cells/CD235a_RBC/')
405
+ image_names = [x for x in image_and_mask_names if "HE" in x]
406
+ image_name = data_directory + 'red_blood_cells/CD235a_RBC/' + image_names[idx-10647-26509-24805-12273-14135-13231]
407
+ mask_name = data_directory + 'red_blood_cells/CD235a_RBC/' + image_names[idx-10647-26509-24805-12273-14135-13231][:-6] + 'mask.png'
408
+ else:
409
+ image_and_mask_names = os.listdir(data_directory + 'smooth_muscle_cells/aSMA_SmoothMuscle/')
410
+ image_names = [x for x in image_and_mask_names if "HE" in x]
411
+ image_name = data_directory + 'smooth_muscle_cells/aSMA_SmoothMuscle/' + image_names[idx-10647-26509-24805-12273-14135-13231-25909]
412
+ mask_name = data_directory + 'smooth_muscle_cells/aSMA_SmoothMuscle/' + image_names[idx-10647-26509-24805-12273-14135-13231-25909][:-6] + 'mask.png'
413
+ return image_name, mask_name
414
+
415
+ def get_segpc(self, idx):
416
+ data_directory = os.path.join(self.data_directory, 'SegPC/TCIA_SegPC_dataset/')
417
+ if idx < 298:
418
+ mask_names = os.listdir(data_directory + 'train/masks_png/')
419
+ image_name = data_directory + 'train/x/' + mask_names[idx][:-4] + ".bmp"
420
+ mask_name = data_directory + 'train/masks_png/' + mask_names[idx]
421
+ else:
422
+ mask_names = os.listdir(data_directory + 'validation/masks_png/')
423
+ image_name = data_directory + 'validation/x/' + mask_names[idx-298][:-4] + ".bmp"
424
+ mask_name = data_directory + 'validation/masks_png/' + mask_names[idx-298]
425
+ return image_name, mask_name
426
+
427
+ def get_tiger(self, idx):
428
+ data_directory = os.path.join(self.data_directory, 'TIGER/wsirois/roi-level-annotations/tissue-cells/')
429
+ image_names = os.listdir(data_directory + 'images/')
430
+ image_name = data_directory + 'images/' + image_names[idx]
431
+ mask_name = data_directory + 'masks/' + image_names[idx]
432
+ return image_name, mask_name
433
+
434
+ def get_tnbc(self, idx):
435
+ if self.cluster == "denbi":
436
+ data_directory = os.path.join(self.data_directory, 'TNBC/TNBC_NucleiSegmentation/')
437
+ else:
438
+ data_directory = os.path.join(self.data_directory, 'TNBC/TNBC_dataset/')
439
+ bucket = 1
440
+ idx = idx + 1
441
+ if idx > 7:
442
+ bucket += 1
443
+ idx -= 7
444
+ if idx > 3:
445
+ bucket += 1
446
+ idx -= 3
447
+ if idx > 5:
448
+ bucket += 1
449
+ idx -= 5
450
+ if idx > 8:
451
+ bucket += 1
452
+ idx -= 8
453
+ if idx > 4:
454
+ bucket += 1
455
+ idx -= 4
456
+ if idx > 3:
457
+ bucket += 1
458
+ idx -= 3
459
+ if idx > 3:
460
+ bucket += 1
461
+ idx -= 3
462
+ if idx > 4:
463
+ bucket += 1
464
+ idx -= 4
465
+ if idx > 6:
466
+ bucket += 1
467
+ idx -= 6
468
+ if idx > 4:
469
+ bucket += 1
470
+ idx -= 4
471
+ image_name = data_directory + 'Slide_' + str(bucket).zfill(2) + '/' + str(bucket).zfill(2) + '_' + str(idx) + '.png'
472
+ mask_name = data_directory + 'GT_' + str(bucket).zfill(2) + '/' + str(bucket).zfill(2) + '_' + str(idx) + '.png'
473
+ return image_name, mask_name
CellPilot/cellpilot/data_processing/data_processing.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Data Processing
2
+
3
+ This folder contains the following files:
4
+ - `dataset.py`: The Pytorch dataset used for training our model
5
+ - `data_fetching.py`: `len`and `get` methods for each dataset
6
+ - `data_utils.py`: DataProcessing and PromptProcessing methods
7
+
8
+ Detailed Description:
9
+ ## Dataset
10
+
11
+ ## Data Fetching
12
+ `data_fetching.py` implements `len`and `get` methods for all used datasets. For this we assume our own file structure. More details in the section [Our File Structure](#our-file-structure).
13
+ However you can easily implement `len` and `get` for your own dataset. For this have a look at the section [Using your own Dataset](#using-your-own-dataset).
14
+
15
+ ### Our File Structure
16
+ All of our data is stored in one `data_directory`. Each dataset has a subdirectory in this data_directory. The individual datasets are stored as follows:
17
+
18
+ #### BCSS
19
+ ```
20
+ BCSS
21
+ |--- 0_Public-data-Amgad2019_0.25MPP
22
+ |--- masks
23
+ |--- rgbs_colorNormalized
24
+ ```
25
+ #### CellSeg
26
+ ```
27
+
28
+ ```
29
+
30
+ ### Using your own Dataset
31
+ Entry in DATASET_DICT
32
+ Implement len and get
33
+ ## Data Utils
CellPilot/cellpilot/data_processing/data_utils.py ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import slideio
3
+ import torch
4
+ from PIL import Image
5
+ import torch.nn.functional as F
6
+ from skimage.transform import resize as sk_resize
7
+ import random
8
+ from segment_anything.utils.transforms import ResizeLongestSide
9
+ from scipy.ndimage import label, convolve
10
+ from torchvision.transforms.functional import resize, to_pil_image # type: ignore
11
+ import tifffile
12
+ import albumentations as A
13
+
14
+ class DataProcessing:
15
+
16
+ def preprocess(image_name, mask_name, pixel_mean, pixel_std, wsi_image, image_encoder_size, mask_augmentation_tries, data_augmentations, threshold_connected_components, coords=None):
17
+ image, gt, patch_coordinates, resized_size = DataProcessing.patch(image_name, mask_name, wsi_image, image_encoder_size=image_encoder_size, coords=coords)
18
+ if data_augmentations != ["NoOp"]:
19
+ image, gt = DataProcessing.augment(image, gt, data_augmentations, mask_augmentation_tries)
20
+ image = DataProcessing.preprocess_image(image, pixel_mean, pixel_std, image_encoder_size=image_encoder_size)
21
+ image = image.float()
22
+ gt = DataProcessing.preprocess_gt(gt, image_encoder_size=image_encoder_size)
23
+ gt = DataProcessing.connected_component_analysis(gt, threshold_connected_components)
24
+ nr_labels = torch.max(gt)
25
+ return image, gt, nr_labels, (image_name, mask_name), patch_coordinates, resized_size
26
+
27
+ def augment(image, gt, data_augmentations, mask_augmentation_tries=5):
28
+ image_augmentation_dict = {
29
+ "AdvancedBlur": A.AdvancedBlur(),
30
+ "Blur": A.Blur(),
31
+ "GaussianBlur": A.GaussianBlur(),
32
+ "ZoomBlur": A.ZoomBlur(),
33
+ "CLAHE": A.CLAHE(),
34
+ "Emboss": A.Emboss(),
35
+ "GaussNoise": A.GaussNoise(),
36
+ "IsoNoise": A.ISONoise(),
37
+ "ImageCompression": A.ImageCompression(),
38
+ "Posterize": A.Posterize(),
39
+ "RingingOvershoot": A.RingingOvershoot(),
40
+ "Sharpen": A.Sharpen(),
41
+ "ToGray": A.ToGray(),
42
+ "Downscale": A.Downscale(scale_range=(0.5, 0.9), p=0.5),
43
+ "ChannelShuffle": A.ChannelShuffle(),
44
+ "ChromaticAberration": A.ChromaticAberration(),
45
+ "ColorJitter": A.ColorJitter(),
46
+ "HueSaturationValue": A.HueSaturationValue(),
47
+ "MultiplicativeNoise": A.MultiplicativeNoise(),
48
+ "PlanckianJitter": A.PlanckianJitter(),
49
+ "RGBShift": A.RGBShift(),
50
+ "RandomBrightnessContrast": A.RandomBrightnessContrast(),
51
+ "RandomGamma": A.RandomGamma(),
52
+ "RandomToneCurve": A.RandomToneCurve(),
53
+ "FancyPCA": A.FancyPCA(),
54
+ }
55
+ mask_augmentation_dict = {
56
+ "Affine": A.Affine(),
57
+ "CropNonEmptyMaskIfExists": A.CropNonEmptyMaskIfExists(512, 512, p=0.5),
58
+ "ElasticTransform": A.ElasticTransform(),
59
+ "GridDistortion": A.GridDistortion(),
60
+ "OpticalDistortion": A.OpticalDistortion(),
61
+ "RandomCrop": A.RandomCrop(512, 512, p=0.5),
62
+ "RandomGridShuffle": A.RandomGridShuffle(),
63
+ "RandomResizedCrop": A.RandomResizedCrop(size=(1024, 1024),p=0.5),
64
+ "Rotate": A.Rotate(),
65
+ "ShiftScaleRotate": A.ShiftScaleRotate(),
66
+ "CropAndPad": A.CropAndPad(px=10, p=0.5),
67
+ "D4": A.D4(p=0.5),
68
+ "PadIfNeeded": A.PadIfNeeded(p=0.5),
69
+ "Perspective": A.Perspective(),
70
+ "RandomScale": A.RandomScale(),
71
+ }
72
+ image_augmentations = [image_augmentation_dict[da] for da in data_augmentations if da in image_augmentation_dict]
73
+ mask_augmentations = [mask_augmentation_dict[da] for da in data_augmentations if da in mask_augmentation_dict]
74
+ image_transform = A.Compose(image_augmentations)
75
+ mask_transform = A.Compose(mask_augmentations)
76
+ transformed = image_transform(image=image)
77
+ image = transformed["image"]
78
+ for i in range(mask_augmentation_tries):
79
+ transformed = mask_transform(image=image, mask=gt)
80
+ if np.unique(transformed["mask"]).shape[0] > 1:
81
+ image = transformed["image"]
82
+ gt = transformed["mask"]
83
+ break
84
+ return image, gt
85
+
86
+ def patch(image_name, gt_name, wsi_image=False, image_encoder_size=1024, coords=None):
87
+ if wsi_image:
88
+ image = slideio.open_slide(image_name)
89
+ image_scene = image.get_scene(0)
90
+ if gt_name.endswith(".npy"):
91
+ gt = np.load(gt_name).transpose()
92
+ else:
93
+ gt = slideio.open_slide(gt_name)
94
+ gt_scene = gt.get_scene(0)
95
+ h, w = image_scene.size
96
+ else:
97
+ if image_name.endswith(".tiff") or image_name.endswith(".tif"):
98
+ image = tifffile.imread(image_name)
99
+ else:
100
+ image = Image.open(image_name)
101
+ if gt_name.endswith(".tiff") or gt_name.endswith(".tif"):
102
+ gt = tifffile.imread(gt_name)
103
+ else:
104
+ gt = Image.open(gt_name)
105
+ image = np.array(image)
106
+ gt = np.array(gt)
107
+ h, w = image.shape[:2]
108
+
109
+ def random_patches(h, w):
110
+ if coords is not None:
111
+ left, right, upper, lower = coords
112
+ return left, upper, right, lower
113
+ else:
114
+ left = random.randint(0, max(0, h - image_encoder_size))
115
+ upper = random.randint(0, max(0, w - image_encoder_size))
116
+ right = random.randint(min(h,left + image_encoder_size), h)
117
+ lower = random.randint(min(w, upper + image_encoder_size), w)
118
+ return left, upper, right, lower
119
+
120
+ def grid_patches(i, h, w):
121
+ left = i % ((h // image_encoder_size) + 1) * image_encoder_size
122
+ upper = i // ((h // image_encoder_size) + 1) * image_encoder_size
123
+ right = min(h, left + image_encoder_size)
124
+ lower = min(w, upper + image_encoder_size)
125
+ return left, upper, right, lower
126
+
127
+ nr_of_random_samples = 10
128
+ i = 0
129
+ while True:
130
+ if i < nr_of_random_samples:
131
+ left, upper, right, lower = random_patches(h, w)
132
+ else:
133
+ left, upper, right, lower = grid_patches(i - nr_of_random_samples, h, w)
134
+ i += 1
135
+
136
+ new_h, new_w = ResizeLongestSide.get_preprocess_shape(right - left, lower - upper, image_encoder_size)
137
+ if wsi_image:
138
+ image_resized = image_scene.read_block((left, upper, right-left, lower-upper), (new_h, new_w))
139
+ if gt_name.endswith(".npy"):
140
+ gt_cropped = gt[left:right, upper:lower].astype(np.uint8)
141
+ gt_resized = sk_resize(gt_cropped, (new_h,new_w), preserve_range=True, order = 0)
142
+ else:
143
+ gt_resized = gt_scene.read_block((left, upper, right-left, lower-upper), (new_h, new_w))
144
+ else:
145
+ image_cropped = image[left:right, upper:lower]
146
+ try:
147
+ if np.max(image_cropped) > 255:
148
+ image_cropped = (255/np.max(image_cropped)) * image_cropped
149
+ except:
150
+ pass
151
+ image_resized = np.array(resize(to_pil_image(image_cropped.astype(np.uint8)), (new_h, new_w)))
152
+ gt_cropped = gt[left:right, upper:lower].astype(np.uint8)
153
+ gt_resized = sk_resize(gt_cropped, (new_h,new_w), preserve_range=True, order = 0)
154
+
155
+ if np.unique(gt_resized).shape[0] > 1:
156
+ return image_resized, gt_resized, (left, upper, right, lower), (new_h, new_w)
157
+
158
+ def preprocess_image(x, pixel_mean, pixel_std, image_encoder_size=1024):
159
+ """Normalize pixel values and pad to a square input."""
160
+ # Normalize colors
161
+ if len(x.shape) == 2:
162
+ x = np.repeat(x[:, :, np.newaxis], 3, axis=2)
163
+ if x.shape[2] == 4:
164
+ x = x[:, :, :3]
165
+ x = x.transpose((2,0,1))
166
+ x = torch.tensor(x)
167
+ x = (x - pixel_mean) / pixel_std
168
+ # Pad
169
+ h, w = x.shape[-2:]
170
+ padh = image_encoder_size - h
171
+ padw = image_encoder_size - w
172
+ x = F.pad(x, (0, padw, 0, padh))
173
+ return x
174
+
175
+ def preprocess_gt(x, image_encoder_size=1024):
176
+ """Pad to a square input."""
177
+ # Pad
178
+ h, w = x.shape[-2:]
179
+ padh = image_encoder_size - h
180
+ padw = image_encoder_size - w
181
+ x = torch.tensor(x)
182
+ x = F.pad(x, (0, padw, 0, padh))
183
+ return x
184
+
185
+ def connected_component_analysis(gt, threshold):
186
+ structure = np.ones((3, 3), dtype=np.int32)
187
+ mask_values= np.unique(gt)
188
+ mask_values= mask_values[1:]
189
+ counter = 0
190
+ cca_gt = np.zeros_like(gt, dtype=np.int32)
191
+ for v in mask_values:
192
+ binary_gt_mask = np.where(gt == v, 1.0, 0.0)
193
+ labeled_gt_mask, ncomponents = label(binary_gt_mask, structure)
194
+ counts = np.bincount(labeled_gt_mask.flatten())[1:]
195
+ j = 0
196
+ for (i, c) in enumerate(counts):
197
+ if c < threshold:
198
+ labeled_gt_mask = np.where(labeled_gt_mask == i + 1, 0, labeled_gt_mask)
199
+ else:
200
+ j += 1
201
+ labeled_gt_mask = np.where(labeled_gt_mask == i + 1, j, labeled_gt_mask)
202
+ labeled_gt_mask = np.where(labeled_gt_mask > 0, labeled_gt_mask+counter, 0)
203
+ counter += j
204
+ cca_gt += labeled_gt_mask
205
+ cca_gt = torch.tensor(cca_gt)
206
+ return cca_gt
207
+
208
+ def unconnected_component_analysis(gt):
209
+ mask_values= np.unique(gt)
210
+ mask_values= mask_values[1:]
211
+ uca_gt = np.zeros_like(gt, dtype=np.int32)
212
+ for (i, v) in enumerate(mask_values):
213
+ uca_gt = np.where(gt == v, i+1, uca_gt)
214
+ uca_gt = torch.tensor(uca_gt)
215
+ return uca_gt
216
+
217
+
218
+
219
+ class PromptProcessing:
220
+
221
+ @staticmethod
222
+ def get_prompts_and_targets(nr, target, device, prompt_config):
223
+ "Get prompts to be used in the model"
224
+ prompt_batch_size = prompt_config["prompt_batch_size"]
225
+ prompt_type = prompt_config["prompt_type"]
226
+ nr_of_points = prompt_config["nr_of_points"]
227
+ nr_of_pos_points = prompt_config["nr_of_positive_points"]
228
+ bbox_shift = prompt_config["bbox_shift"]
229
+ components = [[random.randint(1, nr[j]) for i in range(prompt_batch_size)] for j in range(len(nr))]
230
+ targets = []
231
+ target_nr = []
232
+ for i in range(len(components)):
233
+ for j in range(len(components[i])):
234
+ targets.append(torch.where(target[i] == components[i][j], 1, 0))
235
+ target_nr.append(components[i][j])
236
+ target = torch.stack(targets, dim=0)
237
+
238
+ if prompt_type == "both" or prompt_type == "points":
239
+ nr_of_points_per_component = [nr_of_points for j in range(len(components))]
240
+ nr_of_pos_points_per_component = [nr_of_pos_points for j in range(len(components))]
241
+ prompts = PromptProcessing.get_point_prompts(target, nr, prompt_batch_size, nr_of_points_per_component, nr_of_pos_points_per_component, device)
242
+ else:
243
+ prompts = PromptProcessing.get_box_prompts(target, components, device, bbox_shift)
244
+ if prompt_type == "both":
245
+ box_prompts = PromptProcessing.get_box_prompts(target, components, device, bbox_shift)
246
+ prompts = prompts + box_prompts
247
+ target = torch.cat((target, target), 0)
248
+ return prompts, target, target_nr
249
+
250
+ @staticmethod
251
+ def get_point_prompts(target, nr, prompt_batch_size, nr_of_points, nr_of_pos_points, device):
252
+ prompts = []
253
+ idx = 0
254
+ for i in range(len(nr)):
255
+ prompt = {}
256
+ point_coords = torch.zeros(prompt_batch_size, nr_of_points[i], 2)
257
+ point_labels = torch.ones(prompt_batch_size, nr_of_points[i])
258
+ point_labels[:, nr_of_pos_points[i]:] = 0
259
+ for j in range(prompt_batch_size):
260
+ x_indices, y_indices = PromptProcessing.filter_out_edge(target[idx])
261
+ for k in range(nr_of_pos_points[i]):
262
+ rand_idx = random.randrange(0, len(x_indices), 1)
263
+ point_coords[j, k, 0] = y_indices[rand_idx]
264
+ point_coords[j, k, 1] = x_indices[rand_idx]
265
+ x_indices, y_indices = PromptProcessing.filter_out_edge(1-target[idx])
266
+ for k in range(nr_of_points[i] - nr_of_pos_points[i]):
267
+ rand_idx = random.randrange(0, len(x_indices), 1)
268
+ point_coords[j, k + nr_of_pos_points[i], 0] = y_indices[rand_idx]
269
+ point_coords[j, k + nr_of_pos_points[i], 1] = x_indices[rand_idx]
270
+ idx += 1
271
+ point_coords, point_labels = point_coords.to(device), point_labels.to(device)
272
+ prompt.update({
273
+ "point_coords": point_coords,
274
+ "point_labels": point_labels,
275
+ })
276
+ prompts.append(prompt)
277
+ return prompts
278
+
279
+ @staticmethod
280
+ def filter_out_edge(target):
281
+ kernel = np.ones((3,3))
282
+ target_np = target.cpu().numpy()
283
+ inside = convolve(target_np, kernel, mode='constant', cval=0.0)
284
+ if np.any(inside == 9):
285
+ return np.where(inside == 9)
286
+ else:
287
+ return np.where(target_np == 1)
288
+
289
+ @staticmethod
290
+ def get_box_prompts(target, components, device, bbox_shift):
291
+ prompts = []
292
+ idx = 0
293
+ for i in range(len(components)):
294
+ prompt = {}
295
+ bboxes = torch.zeros(len(components[i]), 4)
296
+ for j in range(len(components[i])):
297
+ y_indices, x_indices = torch.where(target[idx] == 1)
298
+ x_min, x_max = torch.min(x_indices), torch.max(x_indices)
299
+ y_min, y_max = torch.min(y_indices), torch.max(y_indices)
300
+ # add perturbation to bounding box coordinates
301
+ _,H, W = target.shape
302
+ x_min = max(0, x_min - random.randint(0, bbox_shift))
303
+ x_max = min(W, x_max + random.randint(0, bbox_shift))
304
+ y_min = max(0, y_min - random.randint(0, bbox_shift))
305
+ y_max = min(H, y_max + random.randint(0, bbox_shift))
306
+ bboxes[j,0] = x_min
307
+ bboxes[j,1] = y_min
308
+ bboxes[j,2] = x_max
309
+ bboxes[j,3] = y_max
310
+ idx += 1
311
+ bboxes = bboxes.to(device)
312
+ prompt["boxes"] = bboxes
313
+ prompts.append(prompt)
314
+ return prompts
315
+
316
+ @staticmethod
317
+ def postprocess_masks(masks, input_size=(1024,1024), original_size=(1024,1024)):
318
+ masks = F.interpolate(
319
+ masks,
320
+ (1024, 1024),
321
+ mode="bilinear",
322
+ align_corners=False,
323
+ )
324
+ masks = masks[..., : input_size[0], : input_size[1]]
325
+ masks = F.interpolate(masks, original_size, mode="bilinear", align_corners=False)
326
+ return masks
327
+
328
+ @staticmethod
329
+ def refine_prompts(nr, target, previous_prompts, previous_prediction, device, prompt_batch_size):
330
+ binary_prediction = (previous_prediction > 0).float()
331
+ diff = target.unsqueeze(1) - binary_prediction
332
+ pos_diff = diff > 0
333
+ neg_diff = diff < 0
334
+ structure = np.ones((3, 3), dtype=np.int32)
335
+
336
+ for i in range(len(previous_prompts)):
337
+ prompt_list = []
338
+ prompt_label_list = []
339
+ for j in range(prompt_batch_size):
340
+ conn_comp_pos, threshold = label(pos_diff[prompt_batch_size * i + j][0].cpu().numpy(), structure)
341
+ conn_comp_neg = label(neg_diff[prompt_batch_size * i + j][0].cpu().numpy(), structure)[0]
342
+ conn_comp = conn_comp_pos + np.where(conn_comp_neg > 0, conn_comp_neg + threshold, 0)
343
+ component_size = np.bincount(conn_comp.flatten())[1:]
344
+ if "point_coords" in previous_prompts[i]:
345
+ prompt_list.append(previous_prompts[i]["point_coords"][j])
346
+ prompt_label_list.append(previous_prompts[i]["point_labels"][j])
347
+ if component_size.size == 0:
348
+ max_indices = [0]
349
+ else:
350
+ max_indices = [np.argmax(component_size) + 1]
351
+ for m in max_indices:
352
+ target_m = torch.tensor(np.where(conn_comp == m, 1, 0))
353
+ if m == 0:
354
+ label_m = torch.tensor([0]).float().to(device)
355
+ else:
356
+ label_m = torch.tensor([(m - 1 < threshold)]).float().to(device)
357
+ prompts = PromptProcessing.get_point_prompts(target_m.unsqueeze(0), [1], 1, [1], [1], device)
358
+ if "point_coords" in previous_prompts[i]:
359
+ prompt_list[j] = torch.cat((prompt_list[j], prompts[0]["point_coords"][0]), 0)
360
+ prompt_label_list[j] = torch.cat((prompt_label_list[j], label_m), 0)
361
+ else:
362
+ prompt_list.append(prompts[0]["point_coords"][0])
363
+ prompt_label_list.append(label_m)
364
+ prompt_stack = torch.stack(prompt_list, dim=0)
365
+ prompt_label_stack = torch.stack(prompt_label_list, dim=0)
366
+ previous_prompts[i]["point_coords"] = prompt_stack
367
+ previous_prompts[i]["point_labels"] = prompt_label_stack
368
+ return previous_prompts
CellPilot/cellpilot/data_processing/dataset.py ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from torch.utils.data import Dataset, DataLoader, random_split
2
+ import torch
3
+ from segment_anything.utils.transforms import ResizeLongestSide
4
+ from .data_fetching import DataFetcher
5
+ from .data_utils import DataProcessing
6
+
7
+ class HistologyDataset(Dataset):
8
+ def __init__(self, datasets, data_directory, cluster, image_encoder_size, mask_augmentation_tries, data_augmentations, threshold_connected_components):
9
+ self.datasets = datasets
10
+ self.data_fetcher = DataFetcher(data_directory, cluster)
11
+ self.image_encoder_size = image_encoder_size
12
+ self.mask_augmentation_tries = mask_augmentation_tries
13
+ self.data_augmentations = data_augmentations
14
+ self.threshold_connected_components = threshold_connected_components
15
+ self.pixel_mean = torch.Tensor([123.675, 116.28, 103.53]).view(-1, 1, 1)
16
+ self.pixel_std = torch.Tensor([58.395, 57.12, 57.375]).view(-1, 1, 1)
17
+ self.DATASET_DICT = {
18
+ "BCSS": [self.data_fetcher.len_bcss, self.data_fetcher.get_bcss, False, 0.0],
19
+ "CAMELYON": [self.data_fetcher.len_camelyon, self.data_fetcher.get_camelyon, True, 0.0],
20
+ "CellSeg": [self.data_fetcher.len_cellseg, self.data_fetcher.get_cellseg, False, 0.0],
21
+ "CoCaHis": [self.data_fetcher.len_cocahis, self.data_fetcher.get_cocahis, False, 0.0],
22
+ "CoNIC": [self.data_fetcher.len_conic, self.data_fetcher.get_conic, False, 0.0],
23
+ "CPM": [self.data_fetcher.len_cpm, self.data_fetcher.get_cpm, False, 0.0],
24
+ "CRAG": [self.data_fetcher.len_crag, self.data_fetcher.get_crag, False, 1.0],
25
+ "CryoNuSeg": [self.data_fetcher.len_cryonuseg, self.data_fetcher.get_cryonuseg, False, 0.0],
26
+ "GlaS": [self.data_fetcher.len_glas, self.data_fetcher.get_glas, False, 1.0],
27
+ "ICIA2018": [self.data_fetcher.len_icia2018, self.data_fetcher.get_icia2018, True, 0.0],
28
+ "Janowczyk": [self.data_fetcher.len_janowczyk, self.data_fetcher.get_janowczyk, False, 0.0],
29
+ "KPI": [self.data_fetcher.len_kpi, self.data_fetcher.get_kpi, False, 0.0],
30
+ "Kumar": [self.data_fetcher.len_kumar, self.data_fetcher.get_kumar, False, 0.0],
31
+ "MoNuSAC": [self.data_fetcher.len_monusac, self.data_fetcher.get_monusac, False, 0.0],
32
+ "MoNuSeg": [self.data_fetcher.len_monuseg, self.data_fetcher.get_monuseg, False, 0.0],
33
+ "NuClick": [self.data_fetcher.len_nuclick, self.data_fetcher.get_nuclick, False, 0.0],
34
+ "PAIP2023": [self.data_fetcher.len_paip2023, self.data_fetcher.get_paip2023, False, 0.0],
35
+ "PanNuke": [self.data_fetcher.len_pannuke, self.data_fetcher.get_pannuke, False, 0.0],
36
+ "SegPath": [self.data_fetcher.len_segpath, self.data_fetcher.get_segpath, False, 0.0],
37
+ "SegPC": [self.data_fetcher.len_segpc, self.data_fetcher.get_segpc, False, 0.0],
38
+ "TIGER": [self.data_fetcher.len_tiger, self.data_fetcher.get_tiger, False, 0.0],
39
+ "TNBC": [self.data_fetcher.len_tnbc, self.data_fetcher.get_tnbc, False, 0.0],
40
+ }
41
+ self.len = 0
42
+ for dataset in self.datasets:
43
+ self.DATASET_DICT[dataset][0] = self.DATASET_DICT[dataset][0]()
44
+ self.len += self.DATASET_DICT[dataset][0]
45
+ self.resize = ResizeLongestSide(image_encoder_size)
46
+
47
+
48
+ def __len__(self):
49
+ return self.len
50
+
51
+ def __getitem__(self, idx):
52
+ for dataset in self.datasets:
53
+ if idx < self.DATASET_DICT[dataset][0]:
54
+ image_name, mask_name = self.DATASET_DICT[dataset][1](idx)
55
+ return idx, DataProcessing.preprocess(
56
+ image_name, mask_name, self.pixel_mean, self.pixel_std, self.DATASET_DICT[dataset][2],
57
+ self.image_encoder_size, self.mask_augmentation_tries, self.data_augmentations, self.threshold_connected_components
58
+ ), self.DATASET_DICT[dataset][3]
59
+ else:
60
+ idx -= self.DATASET_DICT[dataset][0]
61
+
62
+ def get_image(self, idx):
63
+ for dataset in self.datasets:
64
+ if idx < self.DATASET_DICT[dataset][0]:
65
+ image_name, mask_name = self.DATASET_DICT[dataset][1](idx)
66
+ return image_name, mask_name
67
+ else:
68
+ idx -= self.DATASET_DICT[dataset][0]
69
+
70
+ def prepare_data(data_config):
71
+ """
72
+
73
+ """
74
+ datasets = data_config["datasets"]
75
+ data_directory = data_config["data_directory"]
76
+ cluster = data_config["cluster"]
77
+ image_encoder_size = data_config["image_encoder_size"]
78
+ batch_size = data_config["batch_size"]
79
+ drop_last = data_config["drop_last"]
80
+ num_workers = data_config["num_workers"]
81
+
82
+
83
+ # Parameters only for training
84
+ use_holdout_testset = data_config.get("use_holdout_testset", True)
85
+ holdout_testsets = data_config.get("test_datasets", datasets)
86
+ train_split = data_config.get("train_split", 0.8)
87
+ val_split = data_config.get("val_split", 0.1)
88
+ test_split = data_config.get("test_split", 0.1)
89
+ data_split = data_config.get("data_split", False)
90
+ shuffle = data_config.get("shuffle", False)
91
+ seed = data_config.get("seed", 1)
92
+ mask_augmentation_tries = data_config.get("mask_augmentation_tries", 5)
93
+ data_augmentations = data_config.get("data_augmentations", ["NoOp"])
94
+ threshold_connected_components = data_config.get("threshold_connected_components", 2)
95
+
96
+ dataset = HistologyDataset(datasets, data_directory, cluster, image_encoder_size, mask_augmentation_tries, data_augmentations, threshold_connected_components)
97
+ if data_split:
98
+ generator = torch.Generator().manual_seed(seed)
99
+ if use_holdout_testset:
100
+ train_set, val_set = random_split(dataset, [train_split + val_split, test_split],generator=generator)
101
+ test_set = HistologyDataset(holdout_testsets, data_directory, cluster, image_encoder_size, mask_augmentation_tries, ["NoOp"], threshold_connected_components)
102
+ else:
103
+ train_set, val_set, test_set = random_split(dataset, [train_split, val_split, test_split],generator=generator)
104
+ train_loader = DataLoader(train_set, batch_size=batch_size, shuffle=shuffle, drop_last=drop_last, num_workers=num_workers)
105
+ val_loader = DataLoader(val_set, batch_size=batch_size, shuffle=False, drop_last=drop_last, num_workers=num_workers)
106
+ test_loader = DataLoader(test_set, batch_size=batch_size, shuffle=False, drop_last=drop_last, num_workers=num_workers)
107
+ return train_loader, val_loader, test_loader
108
+ else:
109
+ dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=shuffle, drop_last=drop_last, num_workers=num_workers)
110
+ return dataset, dataloader
CellPilot/cellpilot/inference/__pycache__/app_tools.cpython-310.pyc ADDED
Binary file (7.5 kB). View file
 
CellPilot/cellpilot/inference/__pycache__/display.cpython-310.pyc ADDED
Binary file (1.84 kB). View file
 
CellPilot/cellpilot/inference/__pycache__/evaluation_tools.cpython-310.pyc ADDED
Binary file (14.3 kB). View file
 
CellPilot/cellpilot/inference/__pycache__/inference.cpython-310.pyc ADDED
Binary file (6.4 kB). View file
 
CellPilot/cellpilot/inference/__pycache__/inference.cpython-312.pyc ADDED
Binary file (10 kB). View file
 
CellPilot/cellpilot/inference/app_tools.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from torchvision.transforms.functional import resize, to_pil_image, InterpolationMode
3
+ from segment_anything.utils.transforms import ResizeLongestSide
4
+ import cv2
5
+ from .inference import Inference
6
+ import gradio as gr
7
+
8
+ class App(Inference):
9
+ def __init__(self, config):
10
+ self.config = config
11
+ self.inference_config = config["inference_config"]
12
+ super().__init__(self.inference_config)
13
+ self.zoom_factor = 1
14
+ self.middle = (512,512)
15
+ self.upper = int(512 + self.zoom_factor*self.middle[0])
16
+ self.left = int(512 + self.zoom_factor*self.middle[1])
17
+ self.current_refinement = None
18
+ self.prompts = []
19
+ self.transform = ResizeLongestSide(1024)
20
+
21
+ def load_image(self, image, interpolation_mode=InterpolationMode.BILINEAR):
22
+ img = image["image"]
23
+ self.orig_h, self.orig_w = img.shape[:2]
24
+ self.orig_masks = np.zeros((self.orig_h, self.orig_w), dtype=np.int16)
25
+ self.orig_img = img
26
+ self.h, self.w = ResizeLongestSide.get_preprocess_shape(img.shape[0], img.shape[1], 1024)
27
+ img = np.array(resize(to_pil_image(img), (self.h, self.w), interpolation_mode))
28
+ self.predictor.set_image(img)
29
+ self.img = img
30
+ self.masks = np.zeros((self.h, self.w), dtype=np.uint8)
31
+ self.zoom_factor = 1
32
+ self.middle = (512,512)
33
+ self.upper = int(512 + self.zoom_factor*self.middle[0])
34
+ self.left = int(512 + self.zoom_factor*self.middle[1])
35
+ self.current_refinement = None
36
+ self.prompts = []
37
+ self.transform = ResizeLongestSide(1024)
38
+ img = np.pad(img, ((0,1024-self.h), (0,1024-self.w), (0,0)))
39
+ self.current_image = np.pad(img, ((1024,1024), (1024,1024), (0,0)))
40
+ self.current_masks = np.zeros((3072,3072), dtype=np.int16)
41
+ self.masks = np.zeros((self.h, self.w))
42
+ self.orig_masks = np.array(resize(to_pil_image(self.masks.astype(np.int16)), (int(self.orig_h), int(self.orig_w)), InterpolationMode.NEAREST))
43
+ return {"image": img.astype(np.uint8)}
44
+
45
+ def zoom(self, zoom_factor, image):
46
+ points = image.get("points", [])
47
+ if points != []:
48
+ old_points = points
49
+ points = points.copy()
50
+ for i in range(len(points)):
51
+ orig_points = ((self.left -1024 + old_points[i][0])/self.zoom_factor, (self.upper - 1024 + old_points[i][1])/self.zoom_factor)
52
+ points[i][0] = int(orig_points[0] * zoom_factor)
53
+ points[i][1] = int(orig_points[1] * zoom_factor)
54
+ self.zoom_factor = zoom_factor
55
+ img = np.array(resize(to_pil_image(self.orig_img.astype(np.uint8)), (int(zoom_factor * self.h), int(zoom_factor*self.w)), InterpolationMode.BILINEAR))
56
+ self.current_image = np.pad(img, ((1024,1024), (1024,1024), (0,0)))
57
+ self.zoom_masks()
58
+ return self.display_current_image(points)
59
+
60
+ def zoom_masks(self):
61
+ self.current_masks = np.array(resize(to_pil_image(self.orig_masks.astype(np.int16)), (int(self.zoom_factor * self.h), int(self.zoom_factor*self.w)), InterpolationMode.NEAREST))
62
+ self.current_masks = np.pad(self.current_masks, ((1024,1024), (1024,1024)))
63
+
64
+ def color_mask(self, mask):
65
+ if self.current_refinement is not None:
66
+ mask = np.where(mask == self.current_refinement, -1, mask)
67
+ mask = np.where(mask > 0, 1, mask)
68
+ h, w = mask.shape[-2:]
69
+ color = np.array([30, 144, 255]).astype(np.uint8)
70
+ mask = mask.reshape(h, w, 1) * color.reshape(1, 1, -1)
71
+ mask = mask.astype(np.uint8)
72
+ return mask
73
+
74
+ def move_up(self, amount=10):
75
+ self.middle = (self.middle[0] - amount/self.zoom_factor, self.middle[1])
76
+ return self.display_current_image()
77
+
78
+ def move_down(self, amount=10):
79
+ self.middle = (self.middle[0] + amount/self.zoom_factor, self.middle[1])
80
+ return self.display_current_image()
81
+
82
+ def move_left(self, amount=10):
83
+ self.middle = (self.middle[0], self.middle[1] - amount/self.zoom_factor)
84
+ return self.display_current_image()
85
+
86
+ def move_right(self, amount=10):
87
+ self.middle = (self.middle[0], self.middle[1] + amount/self.zoom_factor)
88
+ return self.display_current_image()
89
+
90
+ def display_current_image(self, points=[]):
91
+ self.upper = int(512 + self.zoom_factor*self.middle[0])
92
+ self.left = int(512 + self.zoom_factor*self.middle[1])
93
+ img = self.current_image[self.upper:self.upper + 1024, self.left:self.left + 1024,:]
94
+ mask = self.current_masks[self.upper:self.upper + 1024, self.left:self.left + 1024]
95
+ color_mask = self.color_mask(mask)
96
+ img = np.where(color_mask > 0, 0.4 * img, img)
97
+ img = img.astype(np.uint8)
98
+ img = cv2.addWeighted(img, 1.0, color_mask, 0.6, 0.0)
99
+ if points != []:
100
+ for i in range(len(points)):
101
+ points[i][0] = points[i][0] - self.upper + 1024
102
+ points[i][1] = points[i][1] - self.left + 1024
103
+ return {"image": img.astype(np.uint8),"points": points}
104
+
105
+
106
+ def segment_automatically_app(self):
107
+ masks, self.prompts = self.segment_automatically(self.img)
108
+ self.masks = masks[:self.h, :self.w]
109
+ self.orig_masks = np.array(resize(to_pil_image(self.masks.astype(np.int16)), (int(self.orig_h), int(self.orig_w)), InterpolationMode.NEAREST))
110
+ self.zoom_masks()
111
+ return self.display_current_image()
112
+
113
+ def add_mask(self, input):
114
+ prompts = input.get("points", [])
115
+ if prompts == []:
116
+ return self.display_current_image()
117
+ new_prompt = self.new_prompt(prompts, [], [], [])
118
+ self.prompts.append(new_prompt)
119
+ new_mask = self.segment(new_prompt)
120
+ self.masks = np.where(new_mask == 1, len(self.prompts), self.masks)
121
+ self.orig_masks = np.array(resize(to_pil_image(self.masks.astype(np.int16)), (int(self.orig_h), int(self.orig_w)), InterpolationMode.NEAREST))
122
+ self.zoom_masks()
123
+ return self.display_current_image(points=[])
124
+
125
+ def new_prompt(self, prompts, point_coords=[], point_labels=[], boxes=[]):
126
+ for prompt in prompts:
127
+ p0 = (prompt[0]+self.left-1024)/self.zoom_factor
128
+ p1 = (prompt[1]+self.upper-1024)/self.zoom_factor
129
+ if prompt[3] == 0:
130
+ point_coords.append([p0, p1])
131
+ point_labels.append(1)
132
+ else:
133
+ p2= (prompt[3]+self.left-1024)/self.zoom_factor
134
+ p3 = (prompt[4]+self.upper-1024)/self.zoom_factor
135
+ boxes = [p0, p1, p2, p3]
136
+ if point_coords == []:
137
+ point_coords = None
138
+ point_labels = None
139
+ else:
140
+ point_coords = np.array(point_coords)
141
+ point_labels = np.array(point_labels)
142
+ if boxes == []:
143
+ boxes = None
144
+ else:
145
+ boxes = np.array(boxes)
146
+ new_prompt = {
147
+ "point_coords": point_coords,
148
+ "point_labels": point_labels,
149
+ "boxes": boxes
150
+ }
151
+ return new_prompt
152
+
153
+ def start_refine_mask(self, input):
154
+ prompts = input.get("points", [])
155
+ if prompts == []:
156
+ return self.display_current_image()
157
+ point = (int(input["points"][0][1]), int(input["points"][0][0]))
158
+ value = self.current_masks[self.upper + point[0], self.left + point[1]]
159
+ self.current_refinement = value
160
+ return self.display_current_image(), gr.Column(visible=True), gr.Column(visible=False)
161
+
162
+ def remove_mask(self, input):
163
+ prompts = input.get("points", [])
164
+ if prompts == []:
165
+ return self.display_current_image()
166
+ point = (int(input["points"][0][1]), int(input["points"][0][0]))
167
+ value = self.current_masks[self.upper + point[0], self.left + point[1]]
168
+ self.orig_masks = np.where(self.orig_masks == value, 0, self.orig_masks)
169
+ self.current_masks = np.where(self.current_masks == value, 0, self.current_masks)
170
+ self.masks = np.where(self.masks == value, 0, self.masks)
171
+ return self.display_current_image()
172
+
173
+ def refine_mask(self, input):
174
+ prompts = input.get("points", [])
175
+ if prompts == []:
176
+ return self.display_current_image()
177
+ prompts = input["points"]
178
+ point_coords = self.prompts[self.current_refinement-1].get("point_coords", np.array([]))
179
+ point_labels = self.prompts[self.current_refinement-1].get("point_labels", np.array([]))
180
+ boxes = self.prompts[self.current_refinement-1].get("boxes", np.array([]))
181
+ point_coords = point_coords.tolist() if point_coords is not None else []
182
+ point_labels = point_labels.tolist() if point_labels is not None else []
183
+ boxes = boxes.tolist() if boxes is not None else []
184
+ new_prompt = self.new_prompt(prompts, point_coords, point_labels, boxes)
185
+ self.prompts[self.current_refinement-1] = new_prompt
186
+ new_mask = self.segment(new_prompt, self.img)
187
+ self.masks = np.where(self.masks == self.current_refinement, 0, self.masks)
188
+ self.masks = np.where(new_mask == 1, self.current_refinement, self.masks)
189
+ self.orig_masks = np.array(resize(to_pil_image(self.masks.astype(np.int16)), (int(self.orig_h), int(self.orig_w)), InterpolationMode.NEAREST))
190
+ self.zoom_masks()
191
+ return self.display_current_image()
192
+
193
+ def finish_mask(self):
194
+ self.current_refinement = None
195
+ return self.display_current_image(), gr.Column(visible=True), gr.Column(visible=False)
CellPilot/cellpilot/inference/display.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import torch
3
+ import matplotlib.pyplot as plt
4
+
5
+ def show_mask(mask, ax, random_color=False):
6
+ if random_color:
7
+ color = np.concatenate([np.random.random(3), np.array([0.6])], axis=0)
8
+ else:
9
+ color = np.array([30/255, 144/255, 255/255, 0.6])
10
+ h, w = mask.shape[-2:]
11
+ mask_image = mask.reshape(h, w, 1) * color.reshape(1, 1, -1)
12
+ ax.imshow(mask_image)
13
+
14
+ def show_points(coords, labels, ax, marker_size=375):
15
+ pos_points = coords[labels==1]
16
+ neg_points = coords[labels==0]
17
+ ax.scatter(pos_points[:, 0], pos_points[:, 1], color='green', marker='*', s=marker_size, edgecolor='white', linewidth=1.25)
18
+ ax.scatter(neg_points[:, 0], neg_points[:, 1], color='red', marker='*', s=marker_size, edgecolor='white', linewidth=1.25)
19
+
20
+ def show_box(box, ax):
21
+ x0, y0 = box[0], box[1]
22
+ w, h = box[2] - box[0], box[3] - box[1]
23
+ ax.add_patch(plt.Rectangle((x0, y0), w, h, edgecolor='green', facecolor=(0,0,0,0), lw=2))
24
+
25
+ def show_boxes(boxes, ax):
26
+ for box in boxes:
27
+ show_box(box, ax)
28
+
29
+ def get_original_image(image, mean=torch.Tensor([123.675, 116.28, 103.53]).view(-1, 1, 1), std=torch.Tensor([58.395, 57.12, 57.375]).view(-1, 1, 1)):
30
+ image = (image * std + mean) #* 255
31
+ image = image.permute(1, 2, 0).cpu().numpy()
32
+ return image.astype(np.uint8)
CellPilot/cellpilot/inference/evaluation_tools.py ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from ..modeling.model import SamHI
3
+ from ..data_processing.data_utils import PromptProcessing
4
+ from ..data_processing.dataset import prepare_data
5
+ from pathlib import Path
6
+ import numpy as np
7
+ from PIL import Image
8
+ import os
9
+ import pandas as pd
10
+ from monai.metrics import compute_iou, compute_dice
11
+ import json
12
+ import random
13
+ from tqdm import tqdm
14
+ from segment_anything import SamAutomaticMaskGenerator, SamPredictor
15
+ import cv2
16
+ import torch.nn.functional as F
17
+ from isegm.inference.evaluation import evaluate_sample
18
+ from isegm.inference.predictors import get_predictor
19
+ from isegm.inference import utils
20
+ from .inference import Inference
21
+ from segment_anything.utils.transforms import ResizeLongestSide
22
+ from skimage.transform import resize as sk_resize
23
+
24
+ class Evaluation(Inference):
25
+ def __init__(self, config):
26
+ self.config = config
27
+ self.inference_config = config["inference_config"]
28
+ self.load_config(self.inference_config)
29
+ self.load_eval_config()
30
+ torch.manual_seed(self.seed)
31
+ np.random.seed(self.seed)
32
+ random.seed(self.seed)
33
+ if not os.path.exists(Path(self.model_dir + self.model_name + "_" + self.time + "_eval_config.json")):
34
+ os.mknod(Path(self.model_dir + self.model_name + "_" + self.time + "_eval_config.json"))
35
+ self.initialize_model_evaluation()
36
+
37
+ def load_eval_config(self):
38
+ self.data_config = self.config["data_config"]
39
+ self.eval_config = self.config["eval_config"]
40
+ self.prompt_config = self.config["prompt_config"]
41
+ self.interactive_or_auto = self.eval_config["interactive_or_auto"]
42
+ self.interactive_model = self.eval_config["interactive_model"]
43
+ self.auto_model = self.eval_config["auto_model"]
44
+ self.time = self.eval_config["time"]
45
+ self.seed = self.eval_config["seed"]
46
+ self.max_nr_of_points = self.eval_config["max_nr_of_points"]
47
+ self.batch_size = self.eval_config["batch_size"]
48
+ self.prompt_batch_size = self.eval_config.get("prompt_batch_size", 1)
49
+ self.nr_of_interactive_points_choices = self.eval_config.get("nr_of_interactive_points_choices", [0, 1, 2, 3, 4, 5])
50
+ self.prompt_choices = self.eval_config.get("prompt_choices", ["points", "boxes"])
51
+ self.dataset_choices = self.eval_config["dataset_choices"]
52
+ self.mask_threshold = self.eval_config.get("mask_threshold", 0.0)
53
+ self.model_type = self.eval_config["model_type"]
54
+ self.base_model = self.eval_config["base_model"]
55
+
56
+ def initialize_model_evaluation(self):
57
+ if self.interactive_or_auto == "interactive":
58
+ if self.interactive_model == "simpleclick":
59
+ self.initialize_simpleclick()
60
+ elif self.interactive_model == "sam":
61
+ self.initialize_sam()
62
+ else:
63
+ self.initialize_model()
64
+ else:
65
+ if self.auto_model == "cellvit":
66
+ self.initialize_cellvit()
67
+ elif self.auto_model == "sam":
68
+ self.initialize_sam()
69
+ else:
70
+ self.initialize_cellvit()
71
+ self.initialize_model()
72
+
73
+ def initialize_simpleclick(self):
74
+ checkpoint_path = self.model_dir + "SimpleClick/cocolvis_vit_base.pth"
75
+ self.model = utils.load_is_model(checkpoint_path, self.device, False)
76
+ self.model.eval()
77
+ self.predictor = get_predictor(self.model, 'NoBRS', self.device, prob_thresh=0.49, zoom_in_params=None)
78
+ self.max_iou_thr = 1.0
79
+ self.pixel_mean = torch.Tensor([123.675, 116.28, 103.53]).view(-1, 1, 1).cuda()
80
+ self.pixel_std = torch.Tensor([58.395, 57.12, 57.375]).view(-1, 1, 1).cuda()
81
+ self.data_config["image_encoder_size"] = 448
82
+ self.prompt_batch_size = 1
83
+
84
+ def initialize_sam(self):
85
+ model_config = {
86
+ "model_type": self.model_type,
87
+ "base_model": self.base_model,
88
+ "lora_rank": 1,
89
+ "lora_layer": [-1],
90
+ "model_mode": "inference",
91
+ "model_dir": self.model_dir,
92
+ }
93
+ model = SamHI({"model_config": model_config}).to(self.device)
94
+ model.eval()
95
+ self.model = model
96
+ self.predictor = SamPredictor(model.model)
97
+
98
+ @torch.no_grad()
99
+ def evaluate(self):
100
+ if self.interactive_or_auto == "auto":
101
+ self.evaluate_auto()
102
+ else:
103
+ self.initialize_eval_dict(self.max_nr_of_points)
104
+ self.predicted_masks = []
105
+ self.target_masks = []
106
+ for dataset_name in self.dataset_choices:
107
+ self.data_config["datasets"] = [dataset_name]
108
+ dataset, dataloader = prepare_data(self.data_config)
109
+ for (i1, p1) in enumerate(self.prompt_choices):
110
+ self.prompt_config["prompt_type"] = p1
111
+ for (i2, p2) in enumerate(self.nr_of_interactive_points_choices):
112
+ nr_of_interactive_points = p2
113
+ for (idx, (data, target, nr, (image_name, mask_name), (left, upper, right, lower), (new_h, new_w)), p_tune) in tqdm(dataloader):
114
+ self.update_eval_dict_first_part(dataset_name, nr_of_interactive_points, idx, image_name, mask_name, left, upper, right, lower)
115
+ data, target = data.to(self.device), target.to(self.device)
116
+ prompts, target, target_nr = PromptProcessing.get_prompts_and_targets(nr, target, self.device, self.prompt_config)
117
+ if self.interactive_model == "simpleclick":
118
+ self.evaluate_simpleclick(data, target, target_nr, nr_of_interactive_points + 1, new_h, new_w)
119
+ else:
120
+ output, _, image_embeddings = self.model.forward(data, prompts, p_tune=p_tune)
121
+ for i in range(nr_of_interactive_points):
122
+ prompts= PromptProcessing.refine_prompts(nr, target, prompts, output, self.device,self.prompt_batch_size)
123
+ output, _, _ = self.model.forward(data, prompts, image_embeddings=image_embeddings, p_tune=p_tune)
124
+ output = output > self.mask_threshold
125
+ self.predicted_masks.extend([m for m in output.squeeze().cpu().numpy()])
126
+ self.target_masks.extend([m for m in target.cpu().numpy()])
127
+ self.update_eval_dict_second_part( prompts, target_nr, output, target)
128
+ self.save_eval_results(self.predicted_masks, self.target_masks)
129
+
130
+
131
+ def evaluate_simpleclick(self, data, target, target_nr, max_clicks, new_h, new_w):
132
+ for i in range(len(data)):
133
+ image = data[i]
134
+ image = image[:, :new_h[i], :new_w[i]]
135
+ image = image * self.pixel_std + self.pixel_mean
136
+ image = F.pad(image, (0, 448 - new_w[i], 0, 448 - new_h[i]))
137
+ image = image.permute(1, 2, 0).cpu().numpy().astype(np.uint8)
138
+ gt = target[i].cpu().numpy()
139
+ clicks_list, ious, probs = evaluate_sample(image, gt, self.predictor, self.max_iou_thr, max_clicks=max_clicks)
140
+ prompt = {
141
+ "point_coords": torch.zeros(1, max_clicks, 2),
142
+ "point_labels": torch.zeros(1, max_clicks)
143
+ }
144
+ for (c, click) in enumerate(clicks_list):
145
+ prompt["point_coords"][0, c, 0] = click.coords[1]
146
+ prompt["point_coords"][0, c, 1] = click.coords[0]
147
+ prompt["point_labels"][0,c] = int(click.is_positive)
148
+ output = (probs > 0.49)
149
+ self.predicted_masks.extend([output])
150
+ self.target_masks.extend([target[i].cpu().numpy()])
151
+ self.update_eval_dict_second_part([prompt], [target_nr[i]], torch.tensor(output).unsqueeze(0).unsqueeze(1), target[i].cpu().unsqueeze(0))
152
+
153
+ def evaluate_auto(self):
154
+ transform = ResizeLongestSide(1024)
155
+ self.eval_dict = {
156
+ "Dataset": [],
157
+ "Index": [],
158
+ "Image name": [],
159
+ "Mask name": [],
160
+ "Left": [],
161
+ "Upper": [],
162
+ "Right": [],
163
+ "Lower": [],
164
+ "IoU": [],
165
+ "Dice": [],
166
+ }
167
+ self.predicted_masks = []
168
+ self.target_masks = []
169
+ pixel_mean = torch.Tensor([123.675, 116.28, 103.53]).view(-1, 1, 1).cuda()
170
+ pixel_std = torch.Tensor([58.395, 57.12, 57.375]).view(-1, 1, 1).cuda()
171
+ for dataset_name in self.dataset_choices:
172
+ self.data_config["datasets"] = [dataset_name]
173
+ dataset, dataloader = prepare_data(self.data_config)
174
+ for (idx, (data, target, _,(image_name, mask_name), (left, upper, right, lower), (new_h, new_w)), p_tune) in tqdm(dataloader):
175
+ with torch.no_grad():
176
+ data, target = data.to(self.device), target.to(self.device)
177
+ for (i,d) in enumerate(data):
178
+ img = np.array(Image.open(image_name[i]).convert("RGB"))
179
+ img = transform.apply_image(img)
180
+ h, w = img.shape[0], img.shape[1]
181
+ # img = d[:, :new_h[i], :new_w[i]]
182
+ # img = img * pixel_std + pixel_mean
183
+ # img = img.cpu().numpy().astype(np.uint8)
184
+ # img = img.transpose((1, 2, 0))
185
+ if self.auto_model=="cellvit":
186
+ mask = self.segment_automatically_cellvit(img)
187
+ elif self.auto_model=="sam":
188
+ mask, _ = self.segment_automatically_sam(img)
189
+ mask = np.pad(mask,((0, 1024-mask.shape[0]), (0, 1024-mask.shape[1])))
190
+ else:
191
+ mask,_ = self.segment_automatically(img)
192
+ mask = np.pad(mask,((0, 1024-mask.shape[0]), (0, 1024-mask.shape[1])))
193
+ mask = np.where(mask == 0, 0, 1)
194
+ gt = np.array(Image.open(mask_name[i]))
195
+ gt = np.where(gt == 0, 0, 1).astype(np.uint8)
196
+ gt = sk_resize(gt, (h,w), preserve_range=True, order = 0)
197
+ gt = np.pad(gt,((0, 1024-gt.shape[0]), (0, 1024-gt.shape[1])))
198
+ # gt = torch.where(target[i].unsqueeze(0).unsqueeze(1).cpu() == 0, 0, 1)
199
+ self.predicted_masks.extend([mask])
200
+ self.target_masks.extend([gt])
201
+ self.eval_dict["Dataset"].extend([dataset_name])
202
+ self.eval_dict["Index"].extend([idx[i].item()])
203
+ self.eval_dict["Image name"].extend([image_name[i]])
204
+ self.eval_dict["Mask name"].extend([mask_name[i]])
205
+ self.eval_dict["Left"].extend([left[i].item()])
206
+ self.eval_dict["Upper"].extend([upper[i].item()])
207
+ self.eval_dict["Right"].extend([right[i].item()])
208
+ self.eval_dict["Lower"].extend([lower[i].item()])
209
+ self.eval_dict["IoU"].extend([compute_iou(torch.tensor(mask[np.newaxis, np.newaxis, :, :]), torch.tensor(gt[np.newaxis, np.newaxis, :, :])).item()])
210
+ self.eval_dict["Dice"].extend([compute_dice(torch.tensor(mask[np.newaxis, np.newaxis, :, :]), torch.tensor(gt[np.newaxis, np.newaxis, :, :])).item()])
211
+ #self.save_eval_results(self.predicted_masks, self.target_masks)
212
+
213
+ def initialize_eval_dict(self, max_nr_of_prompts=4):
214
+ eval_dict = {
215
+ "Dataset": [],
216
+ "Prompt type": [],
217
+ "Nr of interactive points": [],
218
+ "Index": [],
219
+ "Image name": [],
220
+ "Mask name": [],
221
+ "Left": [],
222
+ "Upper": [],
223
+ "Right": [],
224
+ "Lower": [],
225
+ "Target nr": [],
226
+ "IoU": [],
227
+ "Dice": [],
228
+ }
229
+ for i in range(4):
230
+ eval_dict["Box_coord_" + str(i+1)] = []
231
+ for i in range(max_nr_of_prompts):
232
+ eval_dict["Point_coord_" + str(2*i+1)] = []
233
+ eval_dict["Point_coord_" + str(2*i+2)] = []
234
+ eval_dict["Point_label_" + str(i+1)] = []
235
+ self.eval_dict = eval_dict
236
+
237
+ def update_eval_dict_first_part(self, dataset, nr_of_interactive_points, idx, image_name, mask_name, left, upper, right, lower):
238
+ self.eval_dict["Dataset"].extend([dataset] * self.batch_size * self.prompt_batch_size)
239
+ self.eval_dict["Nr of interactive points"].extend([nr_of_interactive_points] * self.batch_size * self.prompt_batch_size)
240
+ self.eval_dict["Prompt type"].extend([self.prompt_config["prompt_type"]] * self.batch_size * self.prompt_batch_size)
241
+ self.eval_dict["Index"].extend([i.item() for i in idx for j in range(self.prompt_batch_size)])
242
+ self.eval_dict["Image name"].extend([i for i in image_name for j in range(self.prompt_batch_size)])
243
+ self.eval_dict["Mask name"].extend([m for m in mask_name for j in range(self.prompt_batch_size)])
244
+ self.eval_dict["Left"].extend([l.item() for l in left for j in range(self.prompt_batch_size)])
245
+ self.eval_dict["Upper"].extend([u.item() for u in upper for j in range(self.prompt_batch_size)])
246
+ self.eval_dict["Right"].extend([r.item() for r in right for j in range(self.prompt_batch_size)])
247
+ self.eval_dict["Lower"].extend([l.item() for l in lower for j in range(self.prompt_batch_size)])
248
+
249
+
250
+ def update_eval_dict_second_part(self, prompts, target_nr, output, target):
251
+ self.eval_dict["Target nr"].extend(target_nr)
252
+ for (i, p) in enumerate(prompts):
253
+ if "point_coords" in p.keys():
254
+ points = p["point_coords"].cpu().numpy()
255
+ labels = p["point_labels"].cpu().numpy()
256
+ for j in range(self.max_nr_of_points):
257
+ if j < points.shape[1]:
258
+ self.eval_dict["Point_coord_" + str(2*j+1)].extend([pt[j,0] for pt in points])
259
+ self.eval_dict["Point_coord_" + str(2*j+2)].extend([pt[j,1] for pt in points])
260
+ self.eval_dict["Point_label_" + str(j+1)].extend([l[j] for l in labels])
261
+ else:
262
+ self.eval_dict["Point_coord_" + str(2*j+1)].extend([0 for p in points])
263
+ self.eval_dict["Point_coord_" + str(2*j+2)].extend([0 for p in points])
264
+ self.eval_dict["Point_label_" + str(j+1)].extend([0 for l in labels])
265
+ else:
266
+ for j in range(self.max_nr_of_points):
267
+ self.eval_dict["Point_coord_" + str(2*j+1)].extend([0 for p in range(self.prompt_batch_size)])
268
+ self.eval_dict["Point_coord_" + str(2*j+2)].extend([0 for p in range(self.prompt_batch_size)])
269
+ self.eval_dict["Point_label_" + str(j+1)].extend([0 for l in range(self.prompt_batch_size)])
270
+
271
+ if "boxes" in p.keys():
272
+ boxes = p["boxes"].cpu().numpy()
273
+ for i in range(4):
274
+ self.eval_dict["Box_coord_" + str(i+1)].extend([b[i] for b in boxes])
275
+ else:
276
+ for i in range(4):
277
+ self.eval_dict["Box_coord_" + str(i+1)].extend([0 for b in range(self.prompt_batch_size)])
278
+ self.eval_dict["IoU"].extend(compute_iou(output, target.unsqueeze(1)).squeeze(1).cpu().numpy().tolist())
279
+ self.eval_dict["Dice"].extend(compute_dice(output, target.unsqueeze(1)).squeeze(1).cpu().numpy().tolist())
280
+
281
+ def save_eval_results(self, predicted_masks, target_masks):
282
+ os.makedirs(self.model_dir + self.model_name + "_" + self.time + "_eval_results", exist_ok=True)
283
+ for (i,p) in enumerate(predicted_masks):
284
+ p = np.where(p == 1, 255, 0).astype(np.uint8)
285
+ p = Image.fromarray(p)
286
+ p.save(self.model_dir + self.model_name + "_" + self.time + "_eval_results/" + str(i) + "_pred_mask.png")
287
+
288
+ for (i,t) in enumerate(target_masks):
289
+ t = np.where(t == 1, 255, 0).astype(np.uint8)
290
+ t = Image.fromarray(t)
291
+ t.save(self.model_dir + self.model_name + "_" + self.time + "_eval_results/" + str(i) + "_target_mask.png")
292
+
293
+ df = pd.DataFrame(self.eval_dict)
294
+ df.to_csv(Path(self.model_dir + self.model_name + "_" + self.time + "_eval_results.csv"))
295
+ with open(Path(self.model_dir + self.model_name + "_" + self.time + "_eval_config.json"), "w") as file:
296
+ self.device = str(self.device)
297
+ json.dump(self.config, file)
298
+
299
+ def segment_automatically_sam(self, image):
300
+ mask_generator = SamAutomaticMaskGenerator(self.model.model)
301
+ masks = mask_generator.generate(image)
302
+ sorted_masks = sorted(masks, key=lambda x: x['stability_score'], reverse=False)
303
+ # Get the masks and prompts
304
+ prel_masks = np.zeros(image.shape[:2])
305
+ prel_points = []
306
+ for (i, m) in enumerate(sorted_masks):
307
+ prel_masks[m["segmentation"]] = i
308
+ prel_points.append(m['point_coords'])
309
+ # filter out masks that are covered up by other masks
310
+ prompts = []
311
+ masks = np.zeros(image.shape[:2])
312
+ for (i, v) in enumerate(np.unique(prel_masks)):
313
+ masks = np.where(prel_masks == v, i, masks)
314
+ prompts.append({"point_coords":torch.tensor(prel_points[int(v)]).to(self.device), "point_labels":torch.tensor([1]).to(self.device)})
315
+ return masks, prompts
316
+
317
+ def segment_automatically_cellvit(self, image):
318
+ instance_types = self.detect_cellvit(image)
319
+ base = np.zeros((1024,1024))
320
+ masks = []
321
+ for k in instance_types[0].keys():
322
+ masks.append(cv2.drawContours(base, [instance_types[0][k]['contour'][:, np.newaxis,:]], 0, 1, cv2.FILLED))
323
+ try:
324
+ mask = np.array(masks).max(axis=0)
325
+ except:
326
+ mask = np.zeros((1024,1024))
327
+ return mask
328
+
CellPilot/cellpilot/inference/inference.py ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from ..modeling.model import SamHI
3
+ import wandb
4
+ from pathlib import Path
5
+ import numpy as np
6
+ import os
7
+ from segment_anything.utils.transforms import ResizeLongestSide
8
+ from torchvision.transforms.functional import resize, to_pil_image, InterpolationMode
9
+ from ..modeling.predictor import SamHIPredictor
10
+ from models.segmentation.cell_segmentation.cellvit import CellViT256
11
+ from torchvision import transforms as T
12
+ import torch.nn.functional as F
13
+ from typing import Dict, List, Tuple
14
+
15
+ class Inference:
16
+ def __init__(self, config):
17
+ self.load_config(config)
18
+ self.initialize_model()
19
+ self.initialize_cellvit()
20
+
21
+ def load_config(self, config):
22
+ self.device = config["device"]
23
+ self.model_dir = config["model_dir"]
24
+ self.model_name = config["model_name"]
25
+
26
+ def initialize_model(self):
27
+ model_path = os.path.join(self.model_dir, self.model_name + ".ckpt")
28
+ if not Path(model_path).is_file():
29
+ api = wandb.Api()
30
+ artifact = api.artifact("philippresearch/SAMHI/" + self.model_name, type="model")
31
+ artifact_dir = artifact.download(root=self.model_dir)
32
+ os.rename(artifact_dir + "model.ckpt", model_path)
33
+ model_config = torch.load(model_path, map_location=lambda storage, loc: storage)["hyper_parameters"]["config"]["model_config"]
34
+ model_config["model_mode"] = "inference"
35
+ model_config["model_dir"] = self.model_dir
36
+ config = {"model_config": model_config}
37
+ model = SamHI.load_from_checkpoint(model_path, config=config).to(self.device)
38
+ model.eval()
39
+ self.model = model
40
+ self.predictor = SamHIPredictor(model.model, p_tuning=model.p_tuning)
41
+
42
+ def initialize_cellvit(self, model_name="CellViT-256-x40.pth"):
43
+ checkpoint = torch.load(self.model_dir + model_name)
44
+ config = checkpoint['config']
45
+ model = CellViT256(model256_path=None,
46
+ num_nuclei_classes=config["data.num_nuclei_classes"],
47
+ num_tissue_classes=config["data.num_tissue_classes"],
48
+ regression_loss=False)
49
+ model.load_state_dict(checkpoint['model_state_dict'])
50
+ mean = (0.5, 0.5, 0.5)
51
+ std = (0.5, 0.5, 0.5)
52
+ inference_transforms = T.Compose(
53
+ [T.ToTensor(), T.Normalize(mean=mean, std=std)]
54
+ )
55
+ self.cellvit = model
56
+ self.cellvit_transforms = inference_transforms
57
+ self.cellvit_mean = mean
58
+ self.cellvit_std = std
59
+ self.cellvit.eval()
60
+
61
+
62
+ def segment(
63
+ self,
64
+ prompt,
65
+ image = None
66
+ ) -> np.ndarray:
67
+ """
68
+ Segment the image based on the prompt
69
+
70
+ Arguments:
71
+ prompt (dict): The prompt for the segmentation. It should contain the following keys:
72
+ - point_coords (np.ndarray): The coordinates of the points.
73
+ A Nx2 array of point prompts to the model.
74
+ Each point is in (X,Y) in pixels.
75
+ - point_labels (np.ndarray): The labels of the points.
76
+ A length N array of labels for the point prompts.
77
+ 1 indicates a foreground point and 0 indicates background point.
78
+ - boxes (np.ndarray): The bounding boxes.
79
+ A length 4 array given a box prompt to the model, in XYXY format.
80
+ image (np.ndarray): The image to segment. If None, it is assumed that the image is already set.
81
+ Expects an image in HWC uint8 format, with pixel values in [0, 255].
82
+
83
+ Returns:
84
+ np.ndarray: The mask of the segmentation. A binary mask of the same shape as the input image.
85
+ """
86
+ if image is not None:
87
+ try:
88
+ self.predictor.set_image(image)
89
+ except:
90
+ raise("Error: Please provide an image")
91
+ mask, _, _ = self.predictor.predict(point_coords=prompt.get("point_coords", None), point_labels=prompt.get("point_labels", None), box=prompt.get("boxes", None), multimask_output=False)
92
+ return mask[0]
93
+
94
+ def segment_automatically(
95
+ self,
96
+ image
97
+ ) -> Tuple[np.ndarray, List[Dict]]:
98
+ """
99
+ Segment the image automatically using CellViT
100
+
101
+ Arguments:
102
+ image (np.ndarray): The image to segment.
103
+ Expects an image in HWC uint8 format, with pixel values in [0, 255].
104
+
105
+ Returns:
106
+ Tuple[np.ndarray, List[Dict]]: The segmented image and the prompts for the segmentation.
107
+ """
108
+ if image.shape[0] > 1024 or image.shape[1] > 1024:
109
+ h, w = ResizeLongestSide.get_preprocess_shape(img.shape[0], img.shape[1], 1024)
110
+ img = resize(to_pil_image(img), (h, w), InterpolationMode.BILINEAR)
111
+ instance_types = self.detect_cellvit(image)
112
+ self.predictor.set_image(image)
113
+ masks = np.zeros(image.shape[:2])
114
+ prompts = []
115
+ for k in instance_types[0].keys():
116
+ box = instance_types[0][k]["bbox"]
117
+ box = np.array([box[0,1], box[0,0], box[1,1], box[1,0]])
118
+ mask, _, _ = self.predictor.predict(box=np.array(box), multimask_output=False)
119
+ masks[mask[0] == 1] = int(k)
120
+ prompts.append({"boxes":np.array(box)})
121
+ return masks, prompts
122
+
123
+ def detect_cellvit(self, image):
124
+ """
125
+ Detect the nuclei in the image using CellViT
126
+
127
+ Arguments:
128
+ image (np.ndarray): The image to segment.
129
+ Expects an image in HWC uint8 format, with pixel values in [0, 255].
130
+ """
131
+ img = torch.tensor(image).unsqueeze(0).float()
132
+ img = img.permute(0, 3, 1, 2)
133
+ img = torch.nn.functional.pad(img, (0, 1024-img.shape[3], 0, 1024-img.shape[2]), value=0)
134
+ img_norm = (img/256-torch.tensor(self.cellvit_mean).view(3, 1, 1)/torch.tensor(self.cellvit_std).view(3, 1, 1))
135
+ with torch.no_grad():
136
+ predictions = self.cellvit(img_norm)
137
+ predictions["nuclei_binary_map"] = F.softmax(predictions["nuclei_binary_map"], dim=1) # shape: (batch_size, 2, H, W)
138
+ predictions["nuclei_type_map"] = F.softmax(predictions["nuclei_type_map"], dim=1) # shape: (batch_size, num_nuclei_classes, H, W)
139
+ (_, instance_types,) = self.cellvit.calculate_instance_map(predictions)
140
+ return instance_types
CellPilot/cellpilot/modeling/LoRA_Sam.py ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Adapted from: https://github.com/hitachinsk/SAMed/blob/main/sam_lora_image_encoder.py
2
+ import torch
3
+ import lightning.pytorch as pl
4
+ from segment_anything.modeling import Sam
5
+ from torch import nn
6
+ import math
7
+ from torch.nn.parameter import Parameter
8
+
9
+ class _LoRA_qkv(nn.Module):
10
+ """In Sam it is implemented as
11
+ self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
12
+ B, N, C = x.shape
13
+ qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, self.head_dim).permute(2, 0, 3, 1, 4)
14
+ q, k, v = qkv.unbind(0)
15
+ """
16
+
17
+ def __init__(
18
+ self,
19
+ qkv: nn.Module,
20
+ linear_a_q: nn.Module,
21
+ linear_b_q: nn.Module,
22
+ linear_a_v: nn.Module,
23
+ linear_b_v: nn.Module,
24
+ ):
25
+ super().__init__()
26
+ self.qkv = qkv
27
+ self.linear_a_q = linear_a_q
28
+ self.linear_b_q = linear_b_q
29
+ self.linear_a_v = linear_a_v
30
+ self.linear_b_v = linear_b_v
31
+ self.dim = qkv.in_features
32
+ self.w_identity = torch.eye(qkv.in_features)
33
+
34
+ def forward(self, x):
35
+ qkv = self.qkv(x) # B,N,N,3*org_C
36
+ new_q = self.linear_b_q(self.linear_a_q(x))
37
+ new_v = self.linear_b_v(self.linear_a_v(x))
38
+ qkv[:, :, :, : self.dim] += new_q
39
+ qkv[:, :, :, -self.dim:] += new_v
40
+ return qkv
41
+
42
+
43
+ class LoRA_Sam(pl.LightningModule):
44
+ """
45
+ Applies low-rank adaptation to a Sam model's image encoder.
46
+ """
47
+
48
+ def __init__(self, sam_model: Sam, r: int, lora_layer=None, p_tuning = False):
49
+ super(LoRA_Sam, self).__init__()
50
+ self.p_tuning = p_tuning
51
+ assert r > 0
52
+ # base_vit_dim = sam_model.image_encoder.patch_embed.proj.out_channels
53
+ # dim = base_vit_dim
54
+ if lora_layer:
55
+ self.lora_layer = lora_layer
56
+ else:
57
+ self.lora_layer = list(
58
+ range(len(sam_model.image_encoder.blocks))) # Only apply lora to the image encoder by default
59
+ # create for storage, then we can init them or load weights
60
+ self.w_As = [] # These are linear layers
61
+ self.w_Bs = []
62
+
63
+ # lets freeze first
64
+ for param in sam_model.image_encoder.parameters():
65
+ param.requires_grad = False
66
+
67
+ # Here, we do the surgery
68
+ for t_layer_i, blk in enumerate(sam_model.image_encoder.blocks):
69
+ # If we only want few lora layer instead of all
70
+ if t_layer_i not in self.lora_layer:
71
+ continue
72
+ w_qkv_linear = blk.attn.qkv
73
+ self.dim = w_qkv_linear.in_features
74
+ w_a_linear_q = nn.Linear(self.dim, r, bias=False)
75
+ w_b_linear_q = nn.Linear(r, self.dim, bias=False)
76
+ w_a_linear_v = nn.Linear(self.dim, r, bias=False)
77
+ w_b_linear_v = nn.Linear(r, self.dim, bias=False)
78
+ self.w_As.append(w_a_linear_q)
79
+ self.w_Bs.append(w_b_linear_q)
80
+ self.w_As.append(w_a_linear_v)
81
+ self.w_Bs.append(w_b_linear_v)
82
+ blk.attn.qkv = _LoRA_qkv(
83
+ w_qkv_linear,
84
+ w_a_linear_q,
85
+ w_b_linear_q,
86
+ w_a_linear_v,
87
+ w_b_linear_v,
88
+ )
89
+ if p_tuning:
90
+ self.embed_dim = sam_model.prompt_encoder.embed_dim
91
+ self.image_embedding_size = sam_model.prompt_encoder.image_embedding_size
92
+ p = torch.nn.Linear(1, self.embed_dim * self.image_embedding_size[0] * self.image_embedding_size[1], bias=False)
93
+ sam_model.p = p
94
+ self.reset_parameters()
95
+ self.sam = sam_model
96
+
97
+
98
+
99
+ def save_lora_parameters(self, filename: str) -> None:
100
+ r"""Only safetensors is supported now.
101
+
102
+ pip install safetensor if you do not have one installed yet.
103
+
104
+ save both lora and fc parameters.
105
+ """
106
+
107
+ assert filename.endswith(".pt") or filename.endswith('.pth')
108
+
109
+ num_layer = len(self.w_As) # actually, it is half
110
+ a_tensors = {f"w_a_{i:03d}": self.w_As[i].weight for i in range(num_layer)}
111
+ b_tensors = {f"w_b_{i:03d}": self.w_Bs[i].weight for i in range(num_layer)}
112
+ prompt_encoder_tensors = {}
113
+ mask_decoder_tensors = {}
114
+
115
+ # save prompt encoder, only `state_dict`, the `named_parameter` is not permitted
116
+ if isinstance(self.sam, torch.nn.DataParallel) or isinstance(self.sam, torch.nn.parallel.DistributedDataParallel):
117
+ state_dict = self.sam.module.state_dict()
118
+ else:
119
+ state_dict = self.sam.state_dict()
120
+ for key, value in state_dict.items():
121
+ if 'prompt_encoder' in key:
122
+ prompt_encoder_tensors[key] = value
123
+ if 'mask_decoder' in key:
124
+ mask_decoder_tensors[key] = value
125
+
126
+ merged_dict = {**a_tensors, **b_tensors, **prompt_encoder_tensors, **mask_decoder_tensors}
127
+ torch.save(merged_dict, filename)
128
+
129
+ def load_lora_parameters(self, filename: str) -> None:
130
+ r"""Only safetensors is supported now.
131
+
132
+ pip install safetensor if you do not have one installed yet.\
133
+
134
+ load both lora and fc parameters.
135
+ """
136
+
137
+ assert filename.endswith(".pt") or filename.endswith('.pth')
138
+
139
+ state_dict = torch.load(filename)
140
+
141
+ for i, w_A_linear in enumerate(self.w_As):
142
+ saved_key = f"w_a_{i:03d}"
143
+ saved_tensor = state_dict[saved_key]
144
+ w_A_linear.weight = Parameter(saved_tensor)
145
+
146
+ for i, w_B_linear in enumerate(self.w_Bs):
147
+ saved_key = f"w_b_{i:03d}"
148
+ saved_tensor = state_dict[saved_key]
149
+ w_B_linear.weight = Parameter(saved_tensor)
150
+
151
+ sam_dict = self.sam.state_dict()
152
+ sam_keys = sam_dict.keys()
153
+
154
+ # load prompt encoder
155
+ prompt_encoder_keys = [k for k in sam_keys if 'prompt_encoder' in k]
156
+ prompt_encoder_values = [state_dict[k] for k in prompt_encoder_keys]
157
+ prompt_encoder_new_state_dict = {k: v for k, v in zip(prompt_encoder_keys, prompt_encoder_values)}
158
+ sam_dict.update(prompt_encoder_new_state_dict)
159
+
160
+ # load mask decoder
161
+ mask_decoder_keys = [k for k in sam_keys if 'mask_decoder' in k]
162
+ mask_decoder_values = [state_dict[k] for k in mask_decoder_keys]
163
+ mask_decoder_new_state_dict = {k: v for k, v in zip(mask_decoder_keys, mask_decoder_values)}
164
+ sam_dict.update(mask_decoder_new_state_dict)
165
+ self.sam.load_state_dict(sam_dict)
166
+
167
+
168
+
169
+ def reset_parameters(self) -> None:
170
+ for w_A in self.w_As:
171
+ nn.init.kaiming_uniform_(w_A.weight, a=math.sqrt(5))
172
+ for w_B in self.w_Bs:
173
+ nn.init.zeros_(w_B.weight)
174
+
175
+ def forward(self, batched_input, batched_prompts, multimask_output, image_size, image_embeddings=None, p_tune=None):
176
+ sam = self.sam
177
+ if image_embeddings is None:
178
+ image_embeddings = sam.image_encoder(batched_input)
179
+ outputs = []
180
+ low_res_outputs = []
181
+ if p_tune is None:
182
+ p_tune = torch.zeros(len(batched_prompts)).to(self.device)
183
+ for i, (image_record, curr_embedding) in enumerate(zip(batched_prompts, image_embeddings)):
184
+ masks, low_res_masks = self.forward_prompts(image_record, curr_embedding, multimask_output, image_size, p_tune[i])
185
+ outputs.append(
186
+ masks
187
+ )
188
+ low_res_outputs.append(
189
+ low_res_masks
190
+ )
191
+ outputs = torch.cat(outputs, dim = 0)
192
+ low_res_outputs = torch.cat(low_res_outputs, dim = 0)
193
+ return outputs, low_res_outputs, image_embeddings
194
+
195
+ def forward_prompts(self, image_record, curr_embedding, multimask_output, image_size, p_tune):
196
+ sam = self.sam
197
+ if "point_coords" in image_record:
198
+ points = (image_record["point_coords"], image_record["point_labels"])
199
+ else:
200
+ points = None
201
+ sparse_embeddings, dense_embeddings = sam.prompt_encoder(
202
+ points=points,
203
+ boxes=image_record.get("boxes", None),
204
+ masks=image_record.get("mask_inputs", None),
205
+ )
206
+ if self.p_tuning:
207
+ bs = sam.prompt_encoder._get_batch_size(points, image_record.get("boxes", None), image_record.get("mask_inputs", None))
208
+ tuning = sam.p(p_tune.unsqueeze(0).float()).reshape(
209
+ 1, self.embed_dim, self.image_embedding_size[0], self.image_embedding_size[1]
210
+ ).expand(bs, -1, -1, -1)
211
+ dense_embeddings = dense_embeddings + tuning
212
+ low_res_masks, iou_predictions = sam.mask_decoder(
213
+ image_embeddings=curr_embedding.unsqueeze(0),
214
+ image_pe=sam.prompt_encoder.get_dense_pe(),
215
+ sparse_prompt_embeddings=sparse_embeddings,
216
+ dense_prompt_embeddings=dense_embeddings,
217
+ multimask_output=multimask_output,
218
+ )
219
+ masks = sam.postprocess_masks(
220
+ low_res_masks,
221
+ input_size=(image_size, image_size),
222
+ original_size=(image_size, image_size)
223
+ )
224
+ return masks, low_res_masks
CellPilot/cellpilot/modeling/__pycache__/LoRA_Sam.cpython-310.pyc ADDED
Binary file (7.25 kB). View file
 
CellPilot/cellpilot/modeling/__pycache__/LoRA_Sam.cpython-312.pyc ADDED
Binary file (12.4 kB). View file
 
CellPilot/cellpilot/modeling/__pycache__/model.cpython-310.pyc ADDED
Binary file (9.58 kB). View file
 
CellPilot/cellpilot/modeling/__pycache__/model.cpython-312.pyc ADDED
Binary file (20.6 kB). View file
 
CellPilot/cellpilot/modeling/__pycache__/predictor.cpython-310.pyc ADDED
Binary file (6.95 kB). View file
 
CellPilot/cellpilot/modeling/model.py ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .LoRA_Sam import LoRA_Sam
2
+ from segment_anything import sam_model_registry
3
+ import schedulefree
4
+ from ..data_processing.data_utils import PromptProcessing
5
+ import monai
6
+ import random
7
+ import torch
8
+ import numpy as np
9
+ import wandb
10
+ from monai.metrics import compute_iou, compute_dice
11
+
12
+ class SamHI (LoRA_Sam):
13
+ def __init__(self, config):
14
+ self.config = config
15
+ self.model_config = config["model_config"]
16
+ self.load_config()
17
+ super().__init__(sam_model_registry[self.model_type](checkpoint=self.model_dir + self.base_model), self.lora_rank, self.lora_layer, self.p_tuning)
18
+ self.model = self.sam
19
+ if self.model_mode == "train":
20
+ self.training_config = config["training_config"]
21
+ self.prompt_config = config["prompt_config"]
22
+ self.random_prompt_config = config["random_prompt_config"]
23
+ self.training_init()
24
+
25
+
26
+ def load_config(self):
27
+ self.base_model = self.model_config["base_model"]
28
+ self.model_type = self.model_config["model_type"]
29
+ self.lora_layer = self.model_config["lora_layer"]
30
+ self.lora_rank = self.model_config["lora_rank"]
31
+ self.model_mode = self.model_config["model_mode"]
32
+ self.model_dir = self.model_config["model_dir"]
33
+ self.p_tuning = self.model_config.get("p_tuning", False)
34
+
35
+ def training_init(self):
36
+ self.load_training_config()
37
+ loss_dict = {
38
+ "diceCE": monai.losses.DiceCELoss(sigmoid=True),
39
+ "diceFocal": monai.losses.DiceFocalLoss(sigmoid=True),
40
+ "dice": monai.losses.DiceLoss(sigmoid=True),
41
+ "generalized_dice": monai.losses.GeneralizedDiceLoss(sigmoid=True),
42
+ "generalized_diceFocal": monai.losses.GeneralizedDiceFocalLoss(sigmoid=True),
43
+ "tversky": monai.losses.TverskyLoss(sigmoid=True),
44
+ }
45
+ self.loss = loss_dict[self.loss]
46
+ self.save_hyperparameters()
47
+ self.freeze_parameters()
48
+
49
+
50
+ def load_training_config(self):
51
+ self.loss = self.training_config["loss"]
52
+ self.freeze = self.training_config["freeze"]
53
+ self.learning_rate = self.training_config["learning_rate"]
54
+ self.batch_size = self.training_config["batch_size"]
55
+ self.prompt_batch_size = self.training_config["prompt_batch_size"]
56
+ self.mode = self.training_config["mode"]
57
+ self.prompt_type = self.training_config["prompt_type"]
58
+ self.nr_of_interactive_points = self.training_config["nr_of_interactive_points"]
59
+ self.compile_model = self.training_config["compile_model"]
60
+ self.mask_threshold = self.training_config["mask_threshold"]
61
+
62
+ def randomization(self):
63
+ if self.random_prompt_config["random_mode"]:
64
+ self.mode = random.choice(["random", "interactive"])
65
+ if self.random_prompt_config["random_prompt_type"]:
66
+ self.prompt_type = random.choice(["points", "boxes"])
67
+ if self.random_prompt_config["random_nr_of_interactive_points"]:
68
+ self.nr_of_interactive_points = random.randint(1, self.random_prompt_config["max_nr_of_interactive_points"])
69
+ if self.random_prompt_config["random_nr_of_points"]:
70
+ self.prompt_config["nr_of_points"] = random.randint(1, self.random_prompt_config["max_nr_of_points"])
71
+ if self.random_prompt_config["random_nr_of_positive_points"]:
72
+ self.prompt_config["nr_of_positive_points"] = random.randint(1, self.random_prompt_config["max_nr_of_positive_points"])
73
+ if self.random_prompt_config["only_positive_points"]:
74
+ self.prompt_config["nr_of_positive_points"] = self.prompt_config["nr_of_points"]
75
+
76
+
77
+ def freeze_parameters(self):
78
+ if "image" in self.freeze:
79
+ for param in self.model.image_encoder.parameters():
80
+ param.requires_grad = False
81
+ if "prompt" in self.freeze:
82
+ for param in self.model.prompt_encoder.parameters():
83
+ param.requires_grad = False
84
+ if "mask" in self.freeze:
85
+ for param in self.model.mask_decoder.parameters():
86
+ param.requires_grad = False
87
+
88
+ def forward(self, data, prompts, image_embeddings=None, p_tune=None):
89
+ return super().forward(data, prompts, False, 1024, image_embeddings, p_tune)
90
+
91
+ def configure_optimizers(self):
92
+ optimizer = schedulefree.AdamWScheduleFree(filter(lambda p: p.requires_grad, self.model.parameters()), lr=self.learning_rate)
93
+ return optimizer
94
+
95
+ def working_step(self, batch):
96
+ self.randomization()
97
+ idx, (data, target, nr, _, _, size), p_tune = batch
98
+ prompts, target, _ = PromptProcessing.get_prompts_and_targets(nr, target, self.device, self.prompt_config)
99
+ if self.mode == "interactive":
100
+ with torch.no_grad():
101
+ output, low_res_output, image_embeddings = self.forward(data, prompts, p_tune=p_tune)
102
+ if self.prompt_type == "both":
103
+ box_output, _, _ = self.forward(data, prompts[int(len(prompts)/2):], image_embeddings, p_tune=p_tune)
104
+ output = torch.cat([output, box_output], dim=0)
105
+ for i in range(self.nr_of_interactive_points):
106
+ prompts = PromptProcessing.refine_prompts(nr, target, prompts, output, self.device, self.prompt_batch_size)
107
+ output, low_res_output, _ = self.forward(data, prompts, image_embeddings, p_tune=p_tune)
108
+ if self.prompt_type == "both":
109
+ box_output, _, _ = self.forward(data, prompts[int(len(prompts)/2):], image_embeddings, p_tune=p_tune)
110
+ output = torch.cat([output, box_output], dim=0)
111
+ output, _, image_embeddings = self.forward(data, prompts, p_tune=p_tune)
112
+ if self.prompt_type == "both":
113
+ box_output, _, _ = self.forward(data, prompts[int(len(prompts)/2):], image_embeddings, p_tune=p_tune)
114
+ output = torch.cat([output, box_output], dim=0)
115
+ return data, target, prompts, output
116
+
117
+ #@torch.compile
118
+ def compiled_working_step(self, batch):
119
+ return self.working_step(batch)
120
+
121
+ def unified_step(self, batch):
122
+ if self.compile_model:
123
+ return self.compiled_working_step(batch)
124
+ else:
125
+ return self.working_step(batch)
126
+
127
+ def training_step(self, batch, batch_idx):
128
+ data, target, prompts, output = self.unified_step(batch)
129
+ loss = self.loss(output.squeeze().unsqueeze(1), target.float().squeeze().unsqueeze(1))
130
+ self.log("train_loss", loss, on_epoch=True, batch_size=self.batch_size)
131
+ return loss
132
+
133
+ def validation_step(self, batch, batch_idx):
134
+ data, target, prompts, output = self.unified_step(batch)
135
+ loss = self.loss(output.squeeze().unsqueeze(1), target.float().squeeze().unsqueeze(1))
136
+ if batch_idx == 0:
137
+ self.display_samples(data, target, prompts, output, "val")
138
+ self.log("val_loss", loss, on_epoch=True, batch_size=self.batch_size)
139
+
140
+ def display_samples(self, data, target, prompts, output, mode):
141
+ img = []
142
+ output = output > self.mask_threshold
143
+ d = data.shape[0]
144
+ for i in range(d):
145
+ image = data[i].squeeze().cpu().numpy().transpose(1, 2, 0)
146
+ if self.prompt_type == "both":
147
+ image_masks = {
148
+ "target": {"mask_data": target[(i) * self.prompt_batch_size].squeeze().cpu().numpy()},
149
+ "output_box": {"mask_data": 2*output[(i) * self.prompt_batch_size].squeeze().cpu().numpy()},
150
+ "output_point": {"mask_data": 3*output[(d + i) * self.prompt_batch_size].squeeze().cpu().numpy()}
151
+ }
152
+ else:
153
+ image_masks = {
154
+ "target": {"mask_data": target[i * self.prompt_batch_size].squeeze().cpu().numpy()},
155
+ "output": {"mask_data": 2*output[i * self.prompt_batch_size].squeeze().cpu().numpy()}
156
+ }
157
+ k = i
158
+ if self.prompt_type in ["points", "both"]:
159
+ points = prompts[k]['point_coords'][0]
160
+ point_mask = np.zeros((image.shape[0], image.shape[1]))
161
+ for (j, point) in enumerate(points):
162
+ point = point.cpu().numpy()
163
+ point_mask[int(point[1]) - 2:int(point[1]) + 2, int(point[0]) - 2:int(point[0]) + 2] = 4 + int(prompts[i]['point_labels'][0][j].item())
164
+ image_masks["point"] = {"mask_data": point_mask}
165
+ if self.prompt_type == "both":
166
+ k = d + i
167
+ if self.prompt_type in ["boxes", "both"]:
168
+ boxes = prompts[k]['boxes'][0].squeeze().cpu().numpy()
169
+ box_mask = np.zeros((image.shape[0], image.shape[1]))
170
+ box_mask[int(boxes[1]):int(boxes[3]), int(boxes[0]):int(boxes[2])] = 6
171
+ image_masks["box"] = {"mask_data": box_mask}
172
+ if "point_coords" in prompts[k]:
173
+ points = prompts[k]['point_coords'][0]
174
+ point_mask = np.zeros((image.shape[0], image.shape[1]))
175
+ for (j, point) in enumerate(points):
176
+ point = point.cpu().numpy()
177
+ point_mask[int(point[1]) - 2:int(point[1]) + 2, int(point[0]) - 2:int(point[0]) + 2] = 7 + int(prompts[k]['point_labels'][0][j].item())
178
+ image_masks["box_point"] = {"mask_data": point_mask}
179
+ img.append(wandb.Image(image, masks=image_masks))
180
+ self.trainer.logger.experiment.log({mode + "_samples": img})
181
+
182
+ def test_step(self, batch, batch_idx):
183
+ data, target, prompts, output = self.unified_step(batch)
184
+ if batch_idx == 0:
185
+ self.display_samples(data, target, prompts, output, "test")
186
+ output = output > self.mask_threshold
187
+ if self.prompt_type == "both":
188
+ point_iou = compute_iou(output[:int(len(output)/2)], target[:int(len(output)/2)].unsqueeze(1))
189
+ point_dice = compute_dice(output[:int(len(output)/2)], target[:int(len(output)/2)].unsqueeze(1))
190
+ box_iou = compute_iou(output[int(len(output)/2):], target[int(len(output)/2):].unsqueeze(1))
191
+ box_dice = compute_dice(output[int(len(output)/2):], target[int(len(output)/2):].unsqueeze(1))
192
+ self.log("test_point_iou", torch.mean(point_iou), on_epoch=True, batch_size=self.batch_size)
193
+ self.log("test_point_dice", torch.mean(point_dice), on_epoch=True, batch_size=self.batch_size)
194
+ self.log("test_point_iou_std", torch.std(point_iou), on_epoch=True, batch_size=self.batch_size)
195
+ self.log("test_point_dice_std", torch.std(point_dice), on_epoch=True, batch_size=self.batch_size)
196
+ self.log("test_box_iou", torch.mean(box_iou), on_epoch=True, batch_size=self.batch_size)
197
+ self.log("test_box_dice", torch.mean(box_dice), on_epoch=True, batch_size=self.batch_size)
198
+ self.log("test_box_iou_std", torch.std(box_iou), on_epoch=True, batch_size=self.batch_size)
199
+ self.log("test_box_dice_std", torch.std(box_dice), on_epoch=True, batch_size=self.batch_size)
200
+ else:
201
+ iou = compute_iou(output, target.unsqueeze(1))
202
+ dice = compute_dice(output, target.unsqueeze(1))
203
+ self.log("test_iou", torch.mean(iou), on_epoch=True, batch_size=self.batch_size)
204
+ self.log("test_dice", torch.mean(dice), on_epoch=True, batch_size=self.batch_size)
205
+ self.log("test_iou_std", torch.std(iou), on_epoch=True, batch_size=self.batch_size)
206
+ self.log("test_dice_std", torch.std(dice), on_epoch=True, batch_size=self.batch_size)
207
+
208
+
209
+
210
+
211
+
212
+ # make schedulefree work
213
+ def on_fit_start(self) -> None:
214
+ self.optimizers().train()
215
+
216
+ def on_predict_start(self) -> None:
217
+ self.optimizers().eval()
218
+
219
+ def on_validation_model_eval(self) -> None:
220
+ self.model.eval()
221
+ self.optimizers().eval()
222
+
223
+ def on_validation_model_train(self) -> None:
224
+ self.model.train()
225
+ self.optimizers().train()
226
+
227
+ def on_test_model_eval(self) -> None:
228
+ self.model.eval()
229
+ #self.optimizers().eval()
230
+
231
+ def on_test_model_train(self) -> None:
232
+ self.model.train()
233
+ self.optimizers().train()
234
+
235
+ def on_predict_model_eval(self) -> None: # redundant with on_predict_start()
236
+ self.model.eval()
237
+ self.optimizers().eval()
CellPilot/cellpilot/modeling/predictor.py ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from segment_anything import SamPredictor
2
+ import torch
3
+ import numpy as np
4
+ from typing import Optional, Tuple
5
+
6
+ class SamHIPredictor(SamPredictor):
7
+ def __init__(self, model, p_tuning=False):
8
+ self.p_tuning = p_tuning
9
+ super().__init__(model)
10
+
11
+ def predict(
12
+ self,
13
+ point_coords: Optional[np.ndarray] = None,
14
+ point_labels: Optional[np.ndarray] = None,
15
+ box: Optional[np.ndarray] = None,
16
+ p_tune: Optional[np.ndarray] = None,
17
+ mask_input: Optional[np.ndarray] = None,
18
+ multimask_output: bool = True,
19
+ return_logits: bool = False,
20
+ ) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
21
+ """
22
+ Predict masks for the given input prompts, using the currently set image.
23
+
24
+ Arguments:
25
+ point_coords (np.ndarray or None): A Nx2 array of point prompts to the
26
+ model. Each point is in (X,Y) in pixels.
27
+ point_labels (np.ndarray or None): A length N array of labels for the
28
+ point prompts. 1 indicates a foreground point and 0 indicates a
29
+ background point.
30
+ box (np.ndarray or None): A length 4 array given a box prompt to the
31
+ model, in XYXY format.
32
+ mask_input (np.ndarray): A low resolution mask input to the model, typically
33
+ coming from a previous prediction iteration. Has form 1xHxW, where
34
+ for SAM, H=W=256.
35
+ multimask_output (bool): If true, the model will return three masks.
36
+ For ambiguous input prompts (such as a single click), this will often
37
+ produce better masks than a single prediction. If only a single
38
+ mask is needed, the model's predicted quality score can be used
39
+ to select the best mask. For non-ambiguous prompts, such as multiple
40
+ input prompts, multimask_output=False can give better results.
41
+ return_logits (bool): If true, returns un-thresholded masks logits
42
+ instead of a binary mask.
43
+
44
+ Returns:
45
+ (np.ndarray): The output masks in CxHxW format, where C is the
46
+ number of masks, and (H, W) is the original image size.
47
+ (np.ndarray): An array of length C containing the model's
48
+ predictions for the quality of each mask.
49
+ (np.ndarray): An array of shape CxHxW, where C is the number
50
+ of masks and H=W=256. These low resolution logits can be passed to
51
+ a subsequent iteration as mask input.
52
+ """
53
+ if not self.is_image_set:
54
+ raise RuntimeError("An image must be set with .set_image(...) before mask prediction.")
55
+
56
+ # Transform input prompts
57
+ coords_torch, labels_torch, box_torch, mask_input_torch = None, None, None, None
58
+ if point_coords is not None:
59
+ assert (
60
+ point_labels is not None
61
+ ), "point_labels must be supplied if point_coords is supplied."
62
+ point_coords = self.transform.apply_coords(point_coords, self.original_size)
63
+ coords_torch = torch.as_tensor(point_coords, dtype=torch.float, device=self.device)
64
+ labels_torch = torch.as_tensor(point_labels, dtype=torch.int, device=self.device)
65
+ coords_torch, labels_torch = coords_torch[None, :, :], labels_torch[None, :]
66
+ if box is not None:
67
+ box = self.transform.apply_boxes(box, self.original_size)
68
+ box_torch = torch.as_tensor(box, dtype=torch.float, device=self.device)
69
+ box_torch = box_torch[None, :]
70
+ if mask_input is not None:
71
+ mask_input_torch = torch.as_tensor(mask_input, dtype=torch.float, device=self.device)
72
+ mask_input_torch = mask_input_torch[None, :, :, :]
73
+ if p_tune is not None:
74
+ p_tune = torch.as_tensor(p_tune, dtype=torch.float, device=self.device)
75
+ p_tune = p_tune[None, :]
76
+
77
+ masks, iou_predictions, low_res_masks = self.predict_torch(
78
+ coords_torch,
79
+ labels_torch,
80
+ box_torch,
81
+ p_tune,
82
+ mask_input_torch,
83
+ multimask_output,
84
+ return_logits=return_logits,
85
+ )
86
+
87
+ masks_np = masks[0].detach().cpu().numpy()
88
+ iou_predictions_np = iou_predictions[0].detach().cpu().numpy()
89
+ low_res_masks_np = low_res_masks[0].detach().cpu().numpy()
90
+ return masks_np, iou_predictions_np, low_res_masks_np
91
+
92
+ @torch.no_grad()
93
+ def predict_torch(
94
+ self,
95
+ point_coords: Optional[torch.Tensor],
96
+ point_labels: Optional[torch.Tensor],
97
+ boxes: Optional[torch.Tensor] = None,
98
+ p_tune: Optional[torch.Tensor] = None,
99
+ mask_input: Optional[torch.Tensor] = None,
100
+ multimask_output: bool = True,
101
+ return_logits: bool = False,
102
+ ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
103
+ """
104
+ Predict masks for the given input prompts, using the currently set image.
105
+ Input prompts are batched torch tensors and are expected to already be
106
+ transformed to the input frame using ResizeLongestSide.
107
+
108
+ Arguments:
109
+ point_coords (torch.Tensor or None): A BxNx2 array of point prompts to the
110
+ model. Each point is in (X,Y) in pixels.
111
+ point_labels (torch.Tensor or None): A BxN array of labels for the
112
+ point prompts. 1 indicates a foreground point and 0 indicates a
113
+ background point.
114
+ boxes (np.ndarray or None): A Bx4 array given a box prompt to the
115
+ model, in XYXY format.
116
+ mask_input (np.ndarray): A low resolution mask input to the model, typically
117
+ coming from a previous prediction iteration. Has form Bx1xHxW, where
118
+ for SAM, H=W=256. Masks returned by a previous iteration of the
119
+ predict method do not need further transformation.
120
+ multimask_output (bool): If true, the model will return three masks.
121
+ For ambiguous input prompts (such as a single click), this will often
122
+ produce better masks than a single prediction. If only a single
123
+ mask is needed, the model's predicted quality score can be used
124
+ to select the best mask. For non-ambiguous prompts, such as multiple
125
+ input prompts, multimask_output=False can give better results.
126
+ return_logits (bool): If true, returns un-thresholded masks logits
127
+ instead of a binary mask.
128
+
129
+ Returns:
130
+ (torch.Tensor): The output masks in BxCxHxW format, where C is the
131
+ number of masks, and (H, W) is the original image size.
132
+ (torch.Tensor): An array of shape BxC containing the model's
133
+ predictions for the quality of each mask.
134
+ (torch.Tensor): An array of shape BxCxHxW, where C is the number
135
+ of masks and H=W=256. These low res logits can be passed to
136
+ a subsequent iteration as mask input.
137
+ """
138
+ if not self.is_image_set:
139
+ raise RuntimeError("An image must be set with .set_image(...) before mask prediction.")
140
+
141
+ if point_coords is not None:
142
+ points = (point_coords, point_labels)
143
+ else:
144
+ points = None
145
+
146
+ # Embed prompts
147
+ sparse_embeddings, dense_embeddings = self.model.prompt_encoder(
148
+ points=points,
149
+ boxes=boxes,
150
+ masks=mask_input,
151
+ )
152
+ if self.p_tuning:
153
+ bs = self.model.prompt_encoder._get_batch_size(points, boxes, mask_input)
154
+ tuning = self.model.p(p_tune.unsqueeze(0).float()).reshape(
155
+ 1, self.embed_dim, self.image_embedding_size[0], self.image_embedding_size[1]
156
+ ).expand(bs, -1, -1, -1)
157
+ dense_embeddings = dense_embeddings + tuning
158
+
159
+ # Predict masks
160
+ low_res_masks, iou_predictions = self.model.mask_decoder(
161
+ image_embeddings=self.features,
162
+ image_pe=self.model.prompt_encoder.get_dense_pe(),
163
+ sparse_prompt_embeddings=sparse_embeddings,
164
+ dense_prompt_embeddings=dense_embeddings,
165
+ multimask_output=multimask_output,
166
+ )
167
+
168
+ # Upscale the masks to the original image resolution
169
+ masks = self.model.postprocess_masks(low_res_masks, self.input_size, self.original_size)
170
+
171
+ if not return_logits:
172
+ masks = masks > self.model.mask_threshold
173
+
174
+ return masks, iou_predictions, low_res_masks
CellPilot/environment.yml ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: histo3.10
2
+ channels:
3
+ - pytorch
4
+ - nvidia
5
+ - conda-forge
6
+ - defaults
7
+ dependencies:
8
+ - _libgcc_mutex=0.1=conda_forge
9
+ - _openmp_mutex=4.5=2_gnu
10
+ - anyio=4.3.0=pyhd8ed1ab_0
11
+ - argon2-cffi=23.1.0=pyhd8ed1ab_0
12
+ - argon2-cffi-bindings=21.2.0=py310h2372a71_4
13
+ - arrow=1.3.0=pyhd8ed1ab_0
14
+ - asttokens=2.4.1=pyhd8ed1ab_0
15
+ - async-lru=2.0.4=pyhd8ed1ab_0
16
+ - attrs=23.2.0=pyh71513ae_0
17
+ - babel=2.14.0=pyhd8ed1ab_0
18
+ - beautifulsoup4=4.12.3=pyha770c72_0
19
+ - blas=1.0=mkl
20
+ - bleach=6.1.0=pyhd8ed1ab_0
21
+ - brotli-python=1.0.9=py310hd8f1fbe_7
22
+ - bzip2=1.0.8=hd590300_5
23
+ - ca-certificates=2024.3.11=h06a4308_0
24
+ - cached-property=1.5.2=hd8ed1ab_1
25
+ - cached_property=1.5.2=pyha770c72_1
26
+ - cairo=1.18.0=h3faef2a_0
27
+ - certifi=2024.2.2=pyhd8ed1ab_0
28
+ - cffi=1.16.0=py310h2fee648_0
29
+ - charset-normalizer=3.3.2=pyhd8ed1ab_0
30
+ - colorama=0.4.6=pyhd8ed1ab_0
31
+ - comm=0.2.2=pyhd8ed1ab_0
32
+ - cuda-cudart=12.1.105=0
33
+ - cuda-cupti=12.1.105=0
34
+ - cuda-libraries=12.1.0=0
35
+ - cuda-nvrtc=12.1.105=0
36
+ - cuda-nvtx=12.1.105=0
37
+ - cuda-opencl=12.4.127=0
38
+ - cuda-runtime=12.1.0=0
39
+ - decorator=5.1.1=pyhd8ed1ab_0
40
+ - defusedxml=0.7.1=pyhd8ed1ab_0
41
+ - entrypoints=0.4=pyhd8ed1ab_0
42
+ - exceptiongroup=1.2.0=pyhd8ed1ab_2
43
+ - executing=2.0.1=pyhd8ed1ab_0
44
+ - expat=2.6.2=h6a678d5_0
45
+ - ffmpeg=4.3=hf484d3e_0
46
+ - font-ttf-dejavu-sans-mono=2.37=hd3eb1b0_0
47
+ - font-ttf-inconsolata=2.001=hcb22688_0
48
+ - font-ttf-source-code-pro=2.030=hd3eb1b0_0
49
+ - font-ttf-ubuntu=0.83=h8b1ccd4_0
50
+ - fontconfig=2.14.2=h14ed4e7_0
51
+ - fonts-anaconda=1=h8fa9717_0
52
+ - fonts-conda-ecosystem=1=hd3eb1b0_0
53
+ - fqdn=1.5.1=pyhd8ed1ab_0
54
+ - freetype=2.12.1=h4a9f257_0
55
+ - gdk-pixbuf=2.42.11=hb9ae30d_0
56
+ - gmp=6.2.1=h295c915_3
57
+ - gmpy2=2.1.2=py310heeb90bb_0
58
+ - gnutls=3.6.15=he1e5248_0
59
+ - h11=0.14.0=pyhd8ed1ab_0
60
+ - h2=4.1.0=pyhd8ed1ab_0
61
+ - hpack=4.0.0=pyh9f0ad1d_0
62
+ - httpcore=1.0.5=pyhd8ed1ab_0
63
+ - httpx=0.27.0=pyhd8ed1ab_0
64
+ - hyperframe=6.0.1=pyhd8ed1ab_0
65
+ - icu=73.2=h59595ed_0
66
+ - idna=3.7=pyhd8ed1ab_0
67
+ - importlib_metadata=7.1.0=hd8ed1ab_0
68
+ - importlib_resources=6.4.0=pyhd8ed1ab_0
69
+ - intel-openmp=2023.1.0=hdb19cb5_46306
70
+ - ipykernel=6.29.3=pyhd33586a_0
71
+ - ipython=8.22.2=pyh707e725_0
72
+ - isoduration=20.11.0=pyhd8ed1ab_0
73
+ - jedi=0.19.1=pyhd8ed1ab_0
74
+ - jinja2=3.1.3=pyhd8ed1ab_0
75
+ - json5=0.9.25=pyhd8ed1ab_0
76
+ - jsonpointer=2.4=py310hff52083_3
77
+ - jsonschema=4.21.1=pyhd8ed1ab_0
78
+ - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
79
+ - jsonschema-with-format-nongpl=4.21.1=pyhd8ed1ab_0
80
+ - jupyter-lsp=2.2.5=pyhd8ed1ab_0
81
+ - jupyter_client=8.6.1=pyhd8ed1ab_0
82
+ - jupyter_core=5.7.2=py310hff52083_0
83
+ - jupyter_events=0.10.0=pyhd8ed1ab_0
84
+ - jupyter_server=2.14.0=pyhd8ed1ab_0
85
+ - jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
86
+ - jupyterlab=4.1.6=pyhd8ed1ab_0
87
+ - jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
88
+ - jupyterlab_server=2.27.1=pyhd8ed1ab_0
89
+ - lame=3.100=h7b6447c_0
90
+ - lcms2=2.16=hb7c19ff_0
91
+ - ld_impl_linux-64=2.40=h55db66e_0
92
+ - lerc=4.0.0=h27087fc_0
93
+ - libcublas=12.1.0.26=0
94
+ - libcufft=11.0.2.4=0
95
+ - libcufile=1.9.1.3=0
96
+ - libcurand=10.3.5.147=0
97
+ - libcusolver=11.4.4.55=0
98
+ - libcusparse=12.0.2.55=0
99
+ - libdeflate=1.20=hd590300_0
100
+ - libdicom=1.0.5=hd590300_1
101
+ - libffi=3.4.4=h6a678d5_0
102
+ - libgcc-ng=13.2.0=hc881cc4_6
103
+ - libglib=2.80.0=hf2295e7_6
104
+ - libgomp=13.2.0=hc881cc4_6
105
+ - libiconv=1.17=hd590300_2
106
+ - libidn2=2.3.4=h5eee18b_0
107
+ - libjpeg-turbo=3.0.0=hd590300_1
108
+ - libnpp=12.0.2.50=0
109
+ - libnsl=2.0.1=hd590300_0
110
+ - libnvjitlink=12.1.105=0
111
+ - libnvjpeg=12.1.1.14=0
112
+ - libpng=1.6.43=h2797004_0
113
+ - libsodium=1.0.18=h36c2ea0_1
114
+ - libsqlite=3.45.3=h2797004_0
115
+ - libstdcxx-ng=13.2.0=h95c4c6d_6
116
+ - libtasn1=4.19.0=h5eee18b_0
117
+ - libtiff=4.6.0=h1dd3fc0_3
118
+ - libunistring=0.9.10=h27cfd23_0
119
+ - libuuid=2.38.1=h0b41bf4_0
120
+ - libwebp-base=1.3.2=h5eee18b_0
121
+ - libxcb=1.15=h7f8727e_0
122
+ - libxcrypt=4.4.36=hd590300_1
123
+ - libxml2=2.12.6=h232c23b_2
124
+ - libzlib=1.2.13=hd590300_5
125
+ - lightning=2.2.5=pyhd8ed1ab_0
126
+ - lightning-utilities=0.11.2=pyhd8ed1ab_0
127
+ - llvm-openmp=14.0.6=h9e868ea_0
128
+ - lz4-c=1.9.4=h6a678d5_0
129
+ - markupsafe=2.1.5=py310h2372a71_0
130
+ - matplotlib-inline=0.1.7=pyhd8ed1ab_0
131
+ - mistune=3.0.2=pyhd8ed1ab_0
132
+ - mkl=2023.1.0=h213fc3f_46344
133
+ - mkl-service=2.4.0=py310h5eee18b_1
134
+ - mkl_fft=1.3.8=py310h5eee18b_0
135
+ - mkl_random=1.2.4=py310hdb19cb5_0
136
+ - mpc=1.1.0=h10f8cd9_1
137
+ - mpfr=4.0.2=hb69a4c5_1
138
+ - mpmath=1.3.0=py310h06a4308_0
139
+ - nbclient=0.10.0=pyhd8ed1ab_0
140
+ - nbconvert-core=7.16.3=pyhd8ed1ab_1
141
+ - nbformat=5.10.4=pyhd8ed1ab_0
142
+ - ncurses=6.4.20240210=h59595ed_0
143
+ - nest-asyncio=1.6.0=pyhd8ed1ab_0
144
+ - nettle=3.7.3=hbbd107a_1
145
+ - networkx=3.1=py310h06a4308_0
146
+ - notebook-shim=0.2.4=pyhd8ed1ab_0
147
+ - numpy=1.26.4=py310h5f9d8c6_0
148
+ - numpy-base=1.26.4=py310hb5e798b_0
149
+ - openh264=2.1.1=h4ff587b_0
150
+ - openjpeg=2.5.2=h488ebb8_0
151
+ - openslide=4.0.0=h58ba908_1
152
+ - openslide-python=1.3.1=py310h091d076_2
153
+ - openssl=3.3.0=h4ab18f5_3
154
+ - overrides=7.7.0=pyhd8ed1ab_0
155
+ - pandocfilters=1.5.0=pyhd8ed1ab_0
156
+ - parso=0.8.4=pyhd8ed1ab_0
157
+ - pcre2=10.43=hcad00b1_0
158
+ - pexpect=4.9.0=pyhd8ed1ab_0
159
+ - pickleshare=0.7.5=py_1003
160
+ - pillow=10.3.0=py310hf73ecf8_0
161
+ - pip=24.0=pyhd8ed1ab_0
162
+ - pixman=0.43.2=h59595ed_0
163
+ - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
164
+ - platformdirs=4.2.1=pyhd8ed1ab_0
165
+ - prometheus_client=0.20.0=pyhd8ed1ab_0
166
+ - prompt-toolkit=3.0.42=pyha770c72_0
167
+ - psutil=5.9.8=py310h2372a71_0
168
+ - ptyprocess=0.7.0=pyhd3deb0d_0
169
+ - pure_eval=0.2.2=pyhd8ed1ab_0
170
+ - pycparser=2.22=pyhd8ed1ab_0
171
+ - pygments=2.17.2=pyhd8ed1ab_0
172
+ - pysocks=1.7.1=pyha2e5f31_6
173
+ - python=3.10.14=hd12c33a_0_cpython
174
+ - python-dateutil=2.9.0=pyhd8ed1ab_0
175
+ - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
176
+ - python-json-logger=2.0.7=pyhd8ed1ab_0
177
+ - python_abi=3.10=2_cp310
178
+ - pytorch=2.3.0=py3.10_cuda12.1_cudnn8.9.2_0
179
+ - pytorch-cuda=12.1=ha16c6d3_5
180
+ - pytorch-lightning=2.2.2=pyhd8ed1ab_0
181
+ - pytorch-mutex=1.0=cuda
182
+ - pyyaml=6.0.1=py310h2372a71_1
183
+ - readline=8.2=h8228510_1
184
+ - referencing=0.34.0=pyhd8ed1ab_0
185
+ - rfc3339-validator=0.1.4=pyhd8ed1ab_0
186
+ - rfc3986-validator=0.1.1=pyh9f0ad1d_0
187
+ - rpds-py=0.18.0=py310hcb5633a_0
188
+ - send2trash=1.8.3=pyh0d859eb_0
189
+ - six=1.16.0=pyh6c4a22f_0
190
+ - sniffio=1.3.1=pyhd8ed1ab_0
191
+ - soupsieve=2.5=pyhd8ed1ab_1
192
+ - sqlite=3.45.3=h2c6b66d_0
193
+ - stack_data=0.6.2=pyhd8ed1ab_0
194
+ - sympy=1.12=py310h06a4308_0
195
+ - tbb=2021.8.0=hdb19cb5_0
196
+ - terminado=0.18.1=pyh0d859eb_0
197
+ - tinycss2=1.2.1=pyhd8ed1ab_0
198
+ - tk=8.6.13=noxft_h4845f30_101
199
+ - tomli=2.0.1=pyhd8ed1ab_0
200
+ - torchaudio=2.3.0=py310_cu121
201
+ - torchmetrics=1.4.0.post0=pyhd8ed1ab_0
202
+ - torchtriton=2.3.0=py310
203
+ - torchvision=0.18.0=py310_cu121
204
+ - tornado=6.4=py310h2372a71_0
205
+ - traitlets=5.14.3=pyhd8ed1ab_0
206
+ - types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
207
+ - typing_extensions=4.11.0=pyha770c72_0
208
+ - typing_utils=0.1.0=pyhd8ed1ab_0
209
+ - uri-template=1.3.0=pyhd8ed1ab_0
210
+ - wcwidth=0.2.13=pyhd8ed1ab_0
211
+ - webcolors=1.13=pyhd8ed1ab_0
212
+ - webencodings=0.5.1=pyhd8ed1ab_2
213
+ - websocket-client=1.8.0=pyhd8ed1ab_0
214
+ - wheel=0.43.0=pyhd8ed1ab_1
215
+ - xorg-kbproto=1.0.7=h7f98852_1002
216
+ - xorg-libice=1.1.1=hd590300_0
217
+ - xorg-libsm=1.2.4=h7391055_0
218
+ - xorg-libx11=1.8.9=h8ee46fc_0
219
+ - xorg-libxext=1.3.4=h0b41bf4_2
220
+ - xorg-libxrender=0.9.11=hd590300_0
221
+ - xorg-renderproto=0.11.1=h7f98852_1002
222
+ - xorg-xextproto=7.3.0=h0b41bf4_1003
223
+ - xorg-xproto=7.0.31=h27cfd23_1007
224
+ - xz=5.4.6=h5eee18b_0
225
+ - yaml=0.2.5=h7f98852_2
226
+ - zeromq=4.3.5=h6a678d5_0
227
+ - zipp=3.17.0=pyhd8ed1ab_0
228
+ - zlib=1.2.13=hd590300_5
229
+ - zstd=1.5.5=hc292b87_0
230
+ - pip:
231
+ - absl-py==2.1.0
232
+ - addict==2.4.0
233
+ - aiofiles==23.2.1
234
+ - albucore==0.0.12
235
+ - albumentations==1.4.11
236
+ - aliyun-python-sdk-core==2.15.1
237
+ - aliyun-python-sdk-kms==2.16.3
238
+ - altair==5.3.0
239
+ - annotated-types==0.7.0
240
+ - asciitree==0.3.3
241
+ - asyncio-atexit==1.0.1
242
+ - backoff==2.2.1
243
+ - click==8.1.7
244
+ - cloudpickle==3.0.0
245
+ - crcmod==1.7
246
+ - cryptography==43.0.0
247
+ - debugpy==1.8.1
248
+ - deprecated==1.2.14
249
+ - dnspython==2.6.1
250
+ - docker-pycreds==0.4.0
251
+ - email-validator==2.1.1
252
+ - eval-type-backport==0.2.0
253
+ - fastapi==0.111.0
254
+ - fastapi-cli==0.0.4
255
+ - fasteners==0.19
256
+ - ffmpy==0.3.2
257
+ - filelock==3.14.0
258
+ - fsspec==2024.3.1
259
+ - gdown==5.1.0
260
+ - googleapis-common-protos==1.63.0
261
+ - gradio==4.36.1
262
+ - gradio-client==1.0.1
263
+ - gradio-image-prompter==0.1.0
264
+ - grpcio==1.65.1
265
+ - h5py==3.11.0
266
+ - httptools==0.6.1
267
+ - huggingface-hub==0.23.3
268
+ - imagecodecs==2024.1.1
269
+ - importlib-metadata==6.11.0
270
+ - jmespath==0.10.0
271
+ - jupyter-capture-output==0.0.11
272
+ - loky==3.0.0
273
+ - markdown==3.6
274
+ - markdown-it-py==3.0.0
275
+ - mdurl==0.1.2
276
+ - mmcv==1.6.2
277
+ - mmengine==0.10.4
278
+ - model-index==0.1.11
279
+ - monai==1.3.1
280
+ - numcodecs==0.12.1
281
+ - nvidia-nccl-cu12==2.20.5
282
+ - opencv-python==4.9.0.80
283
+ - opencv-python-headless==4.10.0.84
284
+ - opendatalab==0.0.10
285
+ - openmim==0.3.9
286
+ - opentelemetry-api==1.21.0
287
+ - opentelemetry-exporter-otlp-proto-common==1.21.0
288
+ - opentelemetry-exporter-otlp-proto-http==1.21.0
289
+ - opentelemetry-proto==1.21.0
290
+ - opentelemetry-sdk==1.21.0
291
+ - opentelemetry-semantic-conventions==0.42b0
292
+ - openxlab==0.1.1
293
+ - ordered-set==4.1.0
294
+ - orjson==3.10.4
295
+ - oss2==2.17.0
296
+ - packaging==24.1
297
+ - pandas==2.2.2
298
+ - protobuf==4.25.3
299
+ - pycocotools==2.0.7
300
+ - pycryptodome==3.20.0
301
+ - pydantic==2.7.4
302
+ - pydantic-core==2.18.4
303
+ - pydub==0.25.1
304
+ - pyparsing==3.1.2
305
+ - python-multipart==0.0.9
306
+ - pytz==2023.4
307
+ - pyzmq==26.0.2
308
+ - requests==2.28.2
309
+ - rich==13.4.2
310
+ - ruff==0.4.8
311
+ - schedulefree==1.2.5
312
+ - segment-anything==1.0
313
+ - semantic-version==2.10.0
314
+ - sentry-sdk==2.2.1
315
+ - setproctitle==1.3.3
316
+ - setuptools==60.2.0
317
+ - shapely==2.0.4
318
+ - shellingham==1.5.4
319
+ - slideio==2.5.0
320
+ - starlette==0.37.2
321
+ - synapseclient==4.2.0
322
+ - tensorboard==2.17.0
323
+ - tensorboard-data-server==0.7.2
324
+ - termcolor==2.4.0
325
+ - tifffile==2024.4.24
326
+ - timm==0.6.11
327
+ - tomlkit==0.12.0
328
+ - toolz==0.12.1
329
+ - tqdm==4.65.2
330
+ - triton==2.3.0
331
+ - typer==0.12.3
332
+ - typing-extensions==4.12.2
333
+ - tzdata==2024.1
334
+ - ujson==5.10.0
335
+ - urllib3==1.26.19
336
+ - uvicorn==0.30.1
337
+ - uvloop==0.19.0
338
+ - wandb==0.17.0
339
+ - watchfiles==0.22.0
340
+ - websockets==11.0.3
341
+ - werkzeug==3.0.3
342
+ - yapf==0.40.2
343
+ - zarr==2.17.2
344
+ prefix: /vol/data/miniconda3/envs/histo3.10
CellPilot/images/app.png ADDED
CellPilot/images/model.png ADDED

Git LFS Details

  • SHA256: 0963201a5a51812baefebcbb8558e0e645bb9e2e43119fef631cfe17c015b8a6
  • Pointer size: 132 Bytes
  • Size of remote file: 1.28 MB
CellPilot/notebooks/automatic.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
CellPilot/notebooks/interactive.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
CellPilot/notebooks/wandb/debug-cli.ubuntu.log ADDED
File without changes
CellPilot/notebooks/wandb/debug-internal.log ADDED
The diff for this file is too large to render. See raw diff
 
CellPilot/notebooks/wandb/debug.log ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2024-06-13 12:16:20,040 INFO MainThread:63330 [wandb_setup.py:_flush():76] Current SDK version is 0.17.0
2
+ 2024-06-13 12:16:20,041 INFO MainThread:63330 [wandb_setup.py:_flush():76] Configure stats pid to 63330
3
+ 2024-06-13 12:16:20,041 INFO MainThread:63330 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/.config/wandb/settings
4
+ 2024-06-13 12:16:20,041 INFO MainThread:63330 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/thesis/SAMHI/notebooks/wandb/settings
5
+ 2024-06-13 12:16:20,041 INFO MainThread:63330 [wandb_setup.py:_flush():76] Loading settings from environment variables: {}
6
+ 2024-06-13 12:16:20,042 INFO MainThread:63330 [wandb_setup.py:_flush():76] Applying setup settings: {'_disable_service': False}
7
+ 2024-06-13 12:16:20,042 INFO MainThread:63330 [wandb_setup.py:_flush():76] Inferring run settings from compute environment: {'program': '<python with no main file>'}
8
+ 2024-06-13 12:16:20,042 INFO MainThread:63330 [wandb_setup.py:_flush():76] Applying login settings: {}
9
+ 2024-06-13 12:16:20,042 INFO MainThread:63330 [wandb_init.py:_log_setup():520] Logging user logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240613_121620-ytzflyds/logs/debug.log
10
+ 2024-06-13 12:16:20,043 INFO MainThread:63330 [wandb_init.py:_log_setup():521] Logging internal logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240613_121620-ytzflyds/logs/debug-internal.log
11
+ 2024-06-13 12:16:20,043 INFO MainThread:63330 [wandb_init.py:_jupyter_setup():466] configuring jupyter hooks <wandb.sdk.wandb_init._WandbInit object at 0x7f0e76940100>
12
+ 2024-06-13 12:16:20,044 INFO MainThread:63330 [wandb_init.py:init():560] calling init triggers
13
+ 2024-06-13 12:16:20,044 INFO MainThread:63330 [wandb_init.py:init():567] wandb.init called with sweep_config: {}
14
+ config: {}
15
+ 2024-06-13 12:16:20,044 INFO MainThread:63330 [wandb_init.py:init():610] starting backend
16
+ 2024-06-13 12:16:20,045 INFO MainThread:63330 [wandb_init.py:init():614] setting up manager
17
+ 2024-06-13 12:16:20,047 INFO MainThread:63330 [backend.py:_multiprocessing_setup():105] multiprocessing start_methods=fork,spawn,forkserver, using: spawn
18
+ 2024-06-13 12:16:20,049 INFO MainThread:63330 [wandb_init.py:init():622] backend started and connected
19
+ 2024-06-13 12:16:20,062 INFO MainThread:63330 [wandb_run.py:_label_probe_notebook():1328] probe notebook
20
+ 2024-06-13 12:16:20,063 INFO MainThread:63330 [wandb_run.py:_label_probe_notebook():1338] Unable to probe notebook: 'NoneType' object has no attribute 'get'
21
+ 2024-06-13 12:16:20,064 INFO MainThread:63330 [wandb_init.py:init():711] updated telemetry
22
+ 2024-06-13 12:16:20,073 INFO MainThread:63330 [wandb_init.py:init():744] communicating run to backend with 90.0 second timeout
23
+ 2024-06-13 12:16:20,512 INFO MainThread:63330 [wandb_run.py:_on_init():2396] communicating current version
24
+ 2024-06-13 12:16:20,604 INFO MainThread:63330 [wandb_run.py:_on_init():2405] got version response upgrade_message: "wandb version 0.17.1 is available! To upgrade, please run:\n $ pip install wandb --upgrade"
25
+
26
+ 2024-06-13 12:16:20,605 INFO MainThread:63330 [wandb_init.py:init():795] starting run threads in backend
27
+ 2024-06-13 12:16:23,677 INFO MainThread:63330 [wandb_run.py:_console_start():2374] atexit reg
28
+ 2024-06-13 12:16:23,677 INFO MainThread:63330 [wandb_run.py:_redirect():2229] redirect: wrap_raw
29
+ 2024-06-13 12:16:23,679 INFO MainThread:63330 [wandb_run.py:_redirect():2294] Wrapping output streams.
30
+ 2024-06-13 12:16:23,679 INFO MainThread:63330 [wandb_run.py:_redirect():2319] Redirects installed.
31
+ 2024-06-13 12:16:23,680 INFO MainThread:63330 [wandb_init.py:init():838] run started, returning control to user process
32
+ 2024-06-13 12:16:27,183 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
33
+ 2024-06-13 12:16:27,184 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
34
+ 2024-06-13 12:17:17,377 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
35
+ 2024-06-13 12:17:17,380 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
36
+ 2024-06-13 12:17:17,381 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
37
+ 2024-06-13 12:17:28,676 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
38
+ 2024-06-13 12:17:33,381 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
39
+ 2024-06-13 12:17:33,381 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
40
+ 2024-06-13 14:18:52,866 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
41
+ 2024-06-13 14:18:52,876 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
42
+ 2024-06-13 14:18:52,881 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
43
+ 2024-06-13 14:18:53,005 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
44
+ 2024-06-13 14:18:53,012 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
45
+ 2024-06-13 14:18:53,012 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
46
+ 2024-06-13 14:18:53,103 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
47
+ 2024-06-13 14:18:53,108 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
48
+ 2024-06-13 14:18:53,108 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
49
+ 2024-06-13 14:18:53,305 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
50
+ 2024-06-13 14:18:53,312 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
51
+ 2024-06-13 14:18:53,313 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
52
+ 2024-06-13 14:18:54,944 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
53
+ 2024-06-13 14:18:54,959 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
54
+ 2024-06-13 14:18:54,962 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
55
+ 2024-06-13 14:18:55,063 INFO MainThread:63330 [wandb_init.py:_resume_backend():436] resuming backend
56
+ 2024-06-13 14:18:55,068 INFO MainThread:63330 [jupyter.py:save_ipynb():373] not saving jupyter notebook
57
+ 2024-06-13 14:18:55,068 INFO MainThread:63330 [wandb_init.py:_pause_backend():431] pausing backend
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: histo3.10
2
+ channels:
3
+ - pytorch
4
+ - nvidia
5
+ - conda-forge
6
+ - defaults
7
+ dependencies:
8
+ - _libgcc_mutex=0.1=conda_forge
9
+ - _openmp_mutex=4.5=2_gnu
10
+ - anyio=4.3.0=pyhd8ed1ab_0
11
+ - argon2-cffi=23.1.0=pyhd8ed1ab_0
12
+ - argon2-cffi-bindings=21.2.0=py310h2372a71_4
13
+ - arrow=1.3.0=pyhd8ed1ab_0
14
+ - asttokens=2.4.1=pyhd8ed1ab_0
15
+ - async-lru=2.0.4=pyhd8ed1ab_0
16
+ - attrs=23.2.0=pyh71513ae_0
17
+ - babel=2.14.0=pyhd8ed1ab_0
18
+ - beautifulsoup4=4.12.3=pyha770c72_0
19
+ - blas=1.0=mkl
20
+ - bleach=6.1.0=pyhd8ed1ab_0
21
+ - brotli-python=1.0.9=py310hd8f1fbe_7
22
+ - bzip2=1.0.8=hd590300_5
23
+ - ca-certificates=2024.3.11=h06a4308_0
24
+ - cached-property=1.5.2=hd8ed1ab_1
25
+ - cached_property=1.5.2=pyha770c72_1
26
+ - cairo=1.18.0=h3faef2a_0
27
+ - certifi=2024.2.2=pyhd8ed1ab_0
28
+ - cffi=1.16.0=py310h2fee648_0
29
+ - charset-normalizer=3.3.2=pyhd8ed1ab_0
30
+ - colorama=0.4.6=pyhd8ed1ab_0
31
+ - comm=0.2.2=pyhd8ed1ab_0
32
+ - cuda-cudart=12.1.105=0
33
+ - cuda-cupti=12.1.105=0
34
+ - cuda-libraries=12.1.0=0
35
+ - cuda-nvrtc=12.1.105=0
36
+ - cuda-nvtx=12.1.105=0
37
+ - cuda-opencl=12.4.127=0
38
+ - cuda-runtime=12.1.0=0
39
+ - decorator=5.1.1=pyhd8ed1ab_0
40
+ - defusedxml=0.7.1=pyhd8ed1ab_0
41
+ - entrypoints=0.4=pyhd8ed1ab_0
42
+ - exceptiongroup=1.2.0=pyhd8ed1ab_2
43
+ - executing=2.0.1=pyhd8ed1ab_0
44
+ - expat=2.6.2=h6a678d5_0
45
+ - ffmpeg=4.3=hf484d3e_0
46
+ - filelock=3.13.1=py310h06a4308_0
47
+ - font-ttf-dejavu-sans-mono=2.37=hd3eb1b0_0
48
+ - font-ttf-inconsolata=2.001=hcb22688_0
49
+ - font-ttf-source-code-pro=2.030=hd3eb1b0_0
50
+ - font-ttf-ubuntu=0.83=h8b1ccd4_0
51
+ - fontconfig=2.14.2=h14ed4e7_0
52
+ - fonts-anaconda=1=h8fa9717_0
53
+ - fonts-conda-ecosystem=1=hd3eb1b0_0
54
+ - fqdn=1.5.1=pyhd8ed1ab_0
55
+ - freetype=2.12.1=h4a9f257_0
56
+ - gdk-pixbuf=2.42.11=hb9ae30d_0
57
+ - gmp=6.2.1=h295c915_3
58
+ - gmpy2=2.1.2=py310heeb90bb_0
59
+ - gnutls=3.6.15=he1e5248_0
60
+ - h11=0.14.0=pyhd8ed1ab_0
61
+ - h2=4.1.0=pyhd8ed1ab_0
62
+ - hpack=4.0.0=pyh9f0ad1d_0
63
+ - httpcore=1.0.5=pyhd8ed1ab_0
64
+ - httpx=0.27.0=pyhd8ed1ab_0
65
+ - hyperframe=6.0.1=pyhd8ed1ab_0
66
+ - icu=73.2=h59595ed_0
67
+ - idna=3.7=pyhd8ed1ab_0
68
+ - importlib_metadata=7.1.0=hd8ed1ab_0
69
+ - importlib_resources=6.4.0=pyhd8ed1ab_0
70
+ - intel-openmp=2023.1.0=hdb19cb5_46306
71
+ - ipykernel=6.29.3=pyhd33586a_0
72
+ - ipython=8.22.2=pyh707e725_0
73
+ - isoduration=20.11.0=pyhd8ed1ab_0
74
+ - jedi=0.19.1=pyhd8ed1ab_0
75
+ - jinja2=3.1.3=pyhd8ed1ab_0
76
+ - json5=0.9.25=pyhd8ed1ab_0
77
+ - jsonpointer=2.4=py310hff52083_3
78
+ - jsonschema=4.21.1=pyhd8ed1ab_0
79
+ - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
80
+ - jsonschema-with-format-nongpl=4.21.1=pyhd8ed1ab_0
81
+ - jupyter-lsp=2.2.5=pyhd8ed1ab_0
82
+ - jupyter_client=8.6.1=pyhd8ed1ab_0
83
+ - jupyter_core=5.7.2=py310hff52083_0
84
+ - jupyter_events=0.10.0=pyhd8ed1ab_0
85
+ - jupyter_server=2.14.0=pyhd8ed1ab_0
86
+ - jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
87
+ - jupyterlab=4.1.6=pyhd8ed1ab_0
88
+ - jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
89
+ - jupyterlab_server=2.27.1=pyhd8ed1ab_0
90
+ - lame=3.100=h7b6447c_0
91
+ - lcms2=2.16=hb7c19ff_0
92
+ - ld_impl_linux-64=2.40=h55db66e_0
93
+ - lerc=4.0.0=h27087fc_0
94
+ - libcublas=12.1.0.26=0
95
+ - libcufft=11.0.2.4=0
96
+ - libcufile=1.9.1.3=0
97
+ - libcurand=10.3.5.147=0
98
+ - libcusolver=11.4.4.55=0
99
+ - libcusparse=12.0.2.55=0
100
+ - libdeflate=1.20=hd590300_0
101
+ - libdicom=1.0.5=hd590300_1
102
+ - libffi=3.4.4=h6a678d5_0
103
+ - libgcc-ng=13.2.0=hc881cc4_6
104
+ - libglib=2.80.0=hf2295e7_6
105
+ - libgomp=13.2.0=hc881cc4_6
106
+ - libiconv=1.17=hd590300_2
107
+ - libidn2=2.3.4=h5eee18b_0
108
+ - libjpeg-turbo=3.0.0=hd590300_1
109
+ - libnpp=12.0.2.50=0
110
+ - libnsl=2.0.1=hd590300_0
111
+ - libnvjitlink=12.1.105=0
112
+ - libnvjpeg=12.1.1.14=0
113
+ - libpng=1.6.43=h2797004_0
114
+ - libsodium=1.0.18=h36c2ea0_1
115
+ - libsqlite=3.45.3=h2797004_0
116
+ - libstdcxx-ng=13.2.0=h95c4c6d_6
117
+ - libtasn1=4.19.0=h5eee18b_0
118
+ - libtiff=4.6.0=h1dd3fc0_3
119
+ - libunistring=0.9.10=h27cfd23_0
120
+ - libuuid=2.38.1=h0b41bf4_0
121
+ - libwebp-base=1.3.2=h5eee18b_0
122
+ - libxcb=1.15=h7f8727e_0
123
+ - libxcrypt=4.4.36=hd590300_1
124
+ - libxml2=2.12.6=h232c23b_2
125
+ - libzlib=1.2.13=hd590300_5
126
+ - lightning=2.2.5=pyhd8ed1ab_0
127
+ - lightning-utilities=0.11.2=pyhd8ed1ab_0
128
+ - llvm-openmp=14.0.6=h9e868ea_0
129
+ - lz4-c=1.9.4=h6a678d5_0
130
+ - markupsafe=2.1.5=py310h2372a71_0
131
+ - matplotlib-inline=0.1.7=pyhd8ed1ab_0
132
+ - mistune=3.0.2=pyhd8ed1ab_0
133
+ - mkl=2023.1.0=h213fc3f_46344
134
+ - mkl-service=2.4.0=py310h5eee18b_1
135
+ - mkl_fft=1.3.8=py310h5eee18b_0
136
+ - mkl_random=1.2.4=py310hdb19cb5_0
137
+ - mpc=1.1.0=h10f8cd9_1
138
+ - mpfr=4.0.2=hb69a4c5_1
139
+ - mpmath=1.3.0=py310h06a4308_0
140
+ - nbclient=0.10.0=pyhd8ed1ab_0
141
+ - nbconvert-core=7.16.3=pyhd8ed1ab_1
142
+ - nbformat=5.10.4=pyhd8ed1ab_0
143
+ - ncurses=6.4.20240210=h59595ed_0
144
+ - nest-asyncio=1.6.0=pyhd8ed1ab_0
145
+ - nettle=3.7.3=hbbd107a_1
146
+ - networkx=3.1=py310h06a4308_0
147
+ - notebook-shim=0.2.4=pyhd8ed1ab_0
148
+ - numpy=1.26.4=py310h5f9d8c6_0
149
+ - numpy-base=1.26.4=py310hb5e798b_0
150
+ - openh264=2.1.1=h4ff587b_0
151
+ - openjpeg=2.5.2=h488ebb8_0
152
+ - openslide=4.0.0=h58ba908_1
153
+ - openslide-python=1.3.1=py310h091d076_2
154
+ - openssl=3.3.0=h4ab18f5_3
155
+ - overrides=7.7.0=pyhd8ed1ab_0
156
+ - packaging=24.0=pyhd8ed1ab_0
157
+ - pandocfilters=1.5.0=pyhd8ed1ab_0
158
+ - parso=0.8.4=pyhd8ed1ab_0
159
+ - pcre2=10.43=hcad00b1_0
160
+ - pexpect=4.9.0=pyhd8ed1ab_0
161
+ - pickleshare=0.7.5=py_1003
162
+ - pillow=10.3.0=py310hf73ecf8_0
163
+ - pip=24.0=pyhd8ed1ab_0
164
+ - pixman=0.43.2=h59595ed_0
165
+ - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
166
+ - platformdirs=4.2.1=pyhd8ed1ab_0
167
+ - prometheus_client=0.20.0=pyhd8ed1ab_0
168
+ - prompt-toolkit=3.0.42=pyha770c72_0
169
+ - psutil=5.9.8=py310h2372a71_0
170
+ - ptyprocess=0.7.0=pyhd3deb0d_0
171
+ - pure_eval=0.2.2=pyhd8ed1ab_0
172
+ - pycparser=2.22=pyhd8ed1ab_0
173
+ - pygments=2.17.2=pyhd8ed1ab_0
174
+ - pysocks=1.7.1=pyha2e5f31_6
175
+ - python=3.10.14=hd12c33a_0_cpython
176
+ - python-dateutil=2.9.0=pyhd8ed1ab_0
177
+ - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
178
+ - python-json-logger=2.0.7=pyhd8ed1ab_0
179
+ - python_abi=3.10=2_cp310
180
+ - pytorch=2.3.0=py3.10_cuda12.1_cudnn8.9.2_0
181
+ - pytorch-cuda=12.1=ha16c6d3_5
182
+ - pytorch-lightning=2.2.2=pyhd8ed1ab_0
183
+ - pytorch-mutex=1.0=cuda
184
+ - pytz=2024.1=pyhd8ed1ab_0
185
+ - pyyaml=6.0.1=py310h2372a71_1
186
+ - readline=8.2=h8228510_1
187
+ - referencing=0.34.0=pyhd8ed1ab_0
188
+ - requests=2.31.0=pyhd8ed1ab_0
189
+ - rfc3339-validator=0.1.4=pyhd8ed1ab_0
190
+ - rfc3986-validator=0.1.1=pyh9f0ad1d_0
191
+ - rpds-py=0.18.0=py310hcb5633a_0
192
+ - send2trash=1.8.3=pyh0d859eb_0
193
+ - setuptools=69.5.1=pyhd8ed1ab_0
194
+ - six=1.16.0=pyh6c4a22f_0
195
+ - sniffio=1.3.1=pyhd8ed1ab_0
196
+ - soupsieve=2.5=pyhd8ed1ab_1
197
+ - sqlite=3.45.3=h2c6b66d_0
198
+ - stack_data=0.6.2=pyhd8ed1ab_0
199
+ - sympy=1.12=py310h06a4308_0
200
+ - tbb=2021.8.0=hdb19cb5_0
201
+ - terminado=0.18.1=pyh0d859eb_0
202
+ - tinycss2=1.2.1=pyhd8ed1ab_0
203
+ - tk=8.6.13=noxft_h4845f30_101
204
+ - tomli=2.0.1=pyhd8ed1ab_0
205
+ - torchaudio=2.3.0=py310_cu121
206
+ - torchmetrics=1.4.0.post0=pyhd8ed1ab_0
207
+ - torchtriton=2.3.0=py310
208
+ - torchvision=0.18.0=py310_cu121
209
+ - tornado=6.4=py310h2372a71_0
210
+ - tqdm=4.66.4=pyhd8ed1ab_0
211
+ - traitlets=5.14.3=pyhd8ed1ab_0
212
+ - types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
213
+ - typing-extensions=4.11.0=hd8ed1ab_0
214
+ - typing_extensions=4.11.0=pyha770c72_0
215
+ - typing_utils=0.1.0=pyhd8ed1ab_0
216
+ - uri-template=1.3.0=pyhd8ed1ab_0
217
+ - wcwidth=0.2.13=pyhd8ed1ab_0
218
+ - webcolors=1.13=pyhd8ed1ab_0
219
+ - webencodings=0.5.1=pyhd8ed1ab_2
220
+ - websocket-client=1.8.0=pyhd8ed1ab_0
221
+ - wheel=0.43.0=pyhd8ed1ab_1
222
+ - xorg-kbproto=1.0.7=h7f98852_1002
223
+ - xorg-libice=1.1.1=hd590300_0
224
+ - xorg-libsm=1.2.4=h7391055_0
225
+ - xorg-libx11=1.8.9=h8ee46fc_0
226
+ - xorg-libxext=1.3.4=h0b41bf4_2
227
+ - xorg-libxrender=0.9.11=hd590300_0
228
+ - xorg-renderproto=0.11.1=h7f98852_1002
229
+ - xorg-xextproto=7.3.0=h0b41bf4_1003
230
+ - xorg-xproto=7.0.31=h27cfd23_1007
231
+ - xz=5.4.6=h5eee18b_0
232
+ - yaml=0.2.5=h7f98852_2
233
+ - zeromq=4.3.5=h6a678d5_0
234
+ - zipp=3.17.0=pyhd8ed1ab_0
235
+ - zlib=1.2.13=hd590300_5
236
+ - zstd=1.5.5=hc292b87_0
237
+ - pip:
238
+ - aiofiles==23.2.1
239
+ - altair==5.3.0
240
+ - annotated-types==0.7.0
241
+ - asciitree==0.3.3
242
+ - asyncio-atexit==1.0.1
243
+ - backoff==2.2.1
244
+ - click==8.1.7
245
+ - cloudpickle==3.0.0
246
+ - debugpy==1.8.1
247
+ - deprecated==1.2.14
248
+ - dnspython==2.6.1
249
+ - docker-pycreds==0.4.0
250
+ - email-validator==2.1.1
251
+ - fastapi==0.111.0
252
+ - fastapi-cli==0.0.4
253
+ - fasteners==0.19
254
+ - ffmpy==0.3.2
255
+ - fsspec==2024.3.1
256
+ - gdown==5.1.0
257
+ - googleapis-common-protos==1.63.0
258
+ - gradio==4.36.1
259
+ - gradio-client==1.0.1
260
+ - gradio-image-prompter==0.1.0
261
+ - h5py==3.11.0
262
+ - httptools==0.6.1
263
+ - huggingface-hub==0.23.3
264
+ - imagecodecs==2024.1.1
265
+ - importlib-metadata==6.11.0
266
+ - jupyter-capture-output==0.0.11
267
+ - loky==3.0.0
268
+ - markdown-it-py==3.0.0
269
+ - mdurl==0.1.2
270
+ - monai==1.3.1
271
+ - numcodecs==0.12.1
272
+ - nvidia-nccl-cu12==2.20.5
273
+ - opencv-python==4.9.0.80
274
+ - opentelemetry-api==1.21.0
275
+ - opentelemetry-exporter-otlp-proto-common==1.21.0
276
+ - opentelemetry-exporter-otlp-proto-http==1.21.0
277
+ - opentelemetry-proto==1.21.0
278
+ - opentelemetry-sdk==1.21.0
279
+ - opentelemetry-semantic-conventions==0.42b0
280
+ - orjson==3.10.4
281
+ - pandas==2.2.2
282
+ - protobuf==4.25.3
283
+ - pycocotools==2.0.7
284
+ - pydantic==2.7.4
285
+ - pydantic-core==2.18.4
286
+ - pydub==0.25.1
287
+ - pyparsing==3.1.2
288
+ - python-multipart==0.0.9
289
+ - pyzmq==26.0.2
290
+ - rich==13.7.1
291
+ - ruff==0.4.8
292
+ - schedulefree==1.2.5
293
+ - segment-anything==1.0
294
+ - semantic-version==2.10.0
295
+ - sentry-sdk==2.2.1
296
+ - setproctitle==1.3.3
297
+ - shapely==2.0.4
298
+ - shellingham==1.5.4
299
+ - slideio==2.5.0
300
+ - starlette==0.37.2
301
+ - synapseclient==4.2.0
302
+ - tifffile==2024.4.24
303
+ - tomlkit==0.12.0
304
+ - toolz==0.12.1
305
+ - triton==2.3.0
306
+ - typer==0.12.3
307
+ - tzdata==2024.1
308
+ - ujson==5.10.0
309
+ - urllib3==2.2.1
310
+ - uvicorn==0.30.1
311
+ - uvloop==0.19.0
312
+ - wandb==0.17.0
313
+ - watchfiles==0.22.0
314
+ - websockets==11.0.3
315
+ - zarr==2.17.2
316
+ prefix: /vol/data/miniconda3/envs/histo3.10
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ wandb_version: 1
2
+
3
+ _wandb:
4
+ desc: null
5
+ value:
6
+ python_version: 3.10.14
7
+ cli_version: 0.17.0
8
+ framework: torch
9
+ is_jupyter_run: true
10
+ is_kaggle_kernel: true
11
+ start_time: 1718218198
12
+ t:
13
+ 1:
14
+ - 1
15
+ - 41
16
+ - 48
17
+ - 55
18
+ - 105
19
+ 2:
20
+ - 1
21
+ - 41
22
+ - 48
23
+ - 49
24
+ - 55
25
+ - 105
26
+ 3:
27
+ - 2
28
+ - 23
29
+ 4: 3.10.14
30
+ 5: 0.17.0
31
+ 8:
32
+ - 1
33
+ - 2
34
+ - 5
35
+ 13: linux-x86_64
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ wandb: Downloading large artifact model-xh4xphgx:v2, 389.52MB. 1 files...
2
+ wandb: 1 of 1 files downloaded.
3
+ Done. 0:0:0.5
4
+ Running on local URL: http://127.0.0.1:7860
5
+ Running on public URL: https://a26d899ec4f9522031.gradio.live
6
+ This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
7
+ [348, 185, 0, 0]
8
+ Traceback (most recent call last):
9
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/gradio/queueing.py", line 532, in process_events
10
+ response = await route_utils.call_process_api(
11
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
12
+ output = await app.get_blocks().process_api(
13
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/gradio/blocks.py", line 1928, in process_api
14
+ result = await self.call_function(
15
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/gradio/blocks.py", line 1514, in call_function
16
+ prediction = await anyio.to_thread.run_sync(
17
+ File "/home/ubuntu/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 49, in run_sync
18
+ return await get_async_backend().run_sync_in_worker_thread(
19
+ File "/home/ubuntu/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2103, in run_sync_in_worker_thread
20
+ return await future
21
+ File "/home/ubuntu/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 823, in run
22
+ result = context.run(func, *args)
23
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/gradio/utils.py", line 832, in wrapper
24
+ response = f(*args, **kwargs)
25
+ File "/tmp/ipykernel_58594/4007838057.py", line 13, in segment
26
+ mask = inference(img, [prompt[0], prompt[1]], "points")
27
+ File "/tmp/ipykernel_58594/518913709.py", line 6, in inference
28
+ mask, _, _ = predictor.predict(point_coords= [[pixel]], point_labels= [[1]], multimask_output=False)
29
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/segment_anything/predictor.py", line 142, in predict
30
+ point_coords = self.transform.apply_coords(point_coords, self.original_size)
31
+ File "/vol/data/miniconda3/envs/histo3.10/lib/python3.10/site-packages/segment_anything/utils/transforms.py", line 42, in apply_coords
32
+ coords = deepcopy(coords).astype(float)
33
+ AttributeError: 'list' object has no attribute 'astype'
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/requirements.txt ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Babel==2.13.1
2
+ Babel==2.14.0
3
+ Brotli==1.0.9
4
+ CacheControl==0.13.1
5
+ ConfigArgParse==1.7
6
+ Deprecated==1.2.14
7
+ GitPython==3.1.40
8
+ Jinja2==3.1.3
9
+ MarkupSafe==2.1.5
10
+ POT==0.8.2
11
+ Pillow==10.1.0
12
+ PuLP==2.7.0
13
+ PyNaCl==1.5.0
14
+ PySocks==1.7.1
15
+ PyYAML==6.0.1
16
+ PyYAML==6.0.1
17
+ Pygments==2.17.2
18
+ Pygments==2.17.2
19
+ QtPy==2.4.1
20
+ Send2Trash==1.8.2
21
+ Send2Trash==1.8.3
22
+ aiofiles==23.2.1
23
+ altair==5.3.0
24
+ annotated-types==0.7.0
25
+ anyio==4.1.0
26
+ anyio==4.3.0
27
+ appdirs==1.4.4
28
+ argcomplete==3.1.6
29
+ argon2-cffi-bindings==21.2.0
30
+ argon2-cffi-bindings==21.2.0
31
+ argon2-cffi==23.1.0
32
+ argon2-cffi==23.1.0
33
+ arrow==1.3.0
34
+ arrow==1.3.0
35
+ asciitree==0.3.3
36
+ asttokens==2.4.1
37
+ asttokens==2.4.1
38
+ async-lru==2.0.4
39
+ async-lru==2.0.4
40
+ asyncio-atexit==1.0.1
41
+ attrs==23.1.0
42
+ attrs==23.2.0
43
+ backoff==2.2.1
44
+ beautifulsoup4==4.12.2
45
+ beautifulsoup4==4.12.3
46
+ bleach==6.1.0
47
+ bleach==6.1.0
48
+ cached-property==1.5.2
49
+ certifi==2024.2.2
50
+ cffi==1.16.0
51
+ cffi==1.16.0
52
+ charset-normalizer==3.3.2
53
+ charset-normalizer==3.3.2
54
+ click==8.1.7
55
+ cloudpickle==3.0.0
56
+ colorama==0.4.6
57
+ coloredlogs==15.0.1
58
+ comm==0.2.0
59
+ comm==0.2.2
60
+ connection-pool==0.0.3
61
+ contourpy==1.2.0
62
+ cwl-upgrader==1.2.10
63
+ cwl-utils==0.31
64
+ cwltool==3.1.20231114134824
65
+ cycler==0.12.1
66
+ datrie==0.8.2
67
+ debugpy==1.6.7
68
+ debugpy==1.8.0
69
+ debugpy==1.8.1
70
+ decorator==5.1.1
71
+ decorator==5.1.1
72
+ defusedxml==0.7.1
73
+ defusedxml==0.7.1
74
+ diskcache==5.6.3
75
+ dnspython==2.6.1
76
+ docker-compose==1.29.2
77
+ docker-pycreds==0.4.0
78
+ docker==6.1.3
79
+ dockerpty==0.4.1
80
+ docopt==0.6.2
81
+ docutils==0.20.1
82
+ dpath==2.1.6
83
+ email_validator==2.1.1
84
+ entrypoints==0.4
85
+ exceptiongroup==1.2.0
86
+ exceptiongroup==1.2.0
87
+ executing==2.0.1
88
+ executing==2.0.1
89
+ fastapi-cli==0.0.4
90
+ fastapi==0.111.0
91
+ fasteners==0.19
92
+ fastjsonschema==2.19.0
93
+ fastjsonschema==2.19.1
94
+ ffmpy==0.3.2
95
+ filelock==3.13.1
96
+ filelock==3.13.1
97
+ fonttools==4.47.0
98
+ fqdn==1.5.1
99
+ fqdn==1.5.1
100
+ fsspec==2024.3.1
101
+ fsspec==2024.5.0
102
+ gdown==5.1.0
103
+ giotto-ph==0.2.2
104
+ girder-client==3.2.2
105
+ gitdb==4.0.11
106
+ gmpy2==2.1.2
107
+ googleapis-common-protos==1.63.0
108
+ gradio==4.36.1
109
+ gradio_client==1.0.1
110
+ gradio_image_prompter==0.1.0
111
+ gudhi==3.9.0
112
+ h11==0.14.0
113
+ h2==4.1.0
114
+ h5py==3.11.0
115
+ hpack==4.0.0
116
+ httpcore==1.0.5
117
+ httptools==0.6.1
118
+ httpx==0.27.0
119
+ huggingface-hub==0.23.3
120
+ humanfriendly==10.0
121
+ hyperframe==6.0.1
122
+ idna==3.7
123
+ imagecodecs==2024.1.1
124
+ imageio==2.34.0
125
+ importlib-metadata==6.11.0
126
+ importlib-resources==6.1.1
127
+ importlib_resources==6.4.0
128
+ ipykernel==6.27.1
129
+ ipykernel==6.29.3
130
+ ipython==8.18.1
131
+ ipython==8.22.2
132
+ ipywidgets==8.1.1
133
+ isodate==0.6.1
134
+ isoduration==20.11.0
135
+ isoduration==20.11.0
136
+ jedi==0.19.1
137
+ jedi==0.19.1
138
+ joblib==1.3.2
139
+ json5==0.9.14
140
+ json5==0.9.25
141
+ jsondiff==2.0.0
142
+ jsonpointer==2.4
143
+ jsonschema-specifications==2023.11.2
144
+ jsonschema-specifications==2023.12.1
145
+ jsonschema==4.20.0
146
+ jsonschema==4.21.1
147
+ jupyter-capture-output==0.0.11
148
+ jupyter-console==6.6.3
149
+ jupyter-events==0.10.0
150
+ jupyter-events==0.9.0
151
+ jupyter-lsp==2.2.1
152
+ jupyter-lsp==2.2.5
153
+ jupyter==1.0.0
154
+ jupyter_client==8.6.0
155
+ jupyter_client==8.6.1
156
+ jupyter_core==5.5.0
157
+ jupyter_core==5.7.2
158
+ jupyter_server==2.11.2
159
+ jupyter_server==2.14.0
160
+ jupyter_server_terminals==0.4.4
161
+ jupyter_server_terminals==0.5.3
162
+ jupyterlab-widgets==3.0.9
163
+ jupyterlab==4.0.9
164
+ jupyterlab==4.1.6
165
+ jupyterlab_pygments==0.3.0
166
+ jupyterlab_pygments==0.3.0
167
+ jupyterlab_server==2.25.2
168
+ jupyterlab_server==2.27.1
169
+ kaggle==1.5.16
170
+ kiwisolver==1.4.5
171
+ lazy_loader==0.3
172
+ lightning-utilities==0.11.2
173
+ lightning==2.2.5
174
+ loky==3.0.0
175
+ lxml==4.9.3
176
+ markdown-it-py==3.0.0
177
+ matplotlib-inline==0.1.6
178
+ matplotlib-inline==0.1.7
179
+ matplotlib==3.8.2
180
+ mdurl==0.1.2
181
+ mistune==2.0.5
182
+ mistune==3.0.2
183
+ mkl-fft==1.3.8
184
+ mkl-random==1.2.4
185
+ mkl-service==2.4.0
186
+ monai==1.3.1
187
+ mpmath==1.3.0
188
+ mpmath==1.3.0
189
+ msgpack==1.0.7
190
+ mypy-extensions==1.0.0
191
+ nbclient==0.10.0
192
+ nbclient==0.9.0
193
+ nbconvert==7.12.0
194
+ nbconvert==7.16.3
195
+ nbformat==5.10.4
196
+ nbformat==5.9.2
197
+ nest-asyncio==1.6.0
198
+ networkx==3.1
199
+ networkx==3.2.1
200
+ nextflow==23.10.0
201
+ notebook==7.0.6
202
+ notebook_shim==0.2.3
203
+ notebook_shim==0.2.4
204
+ numcodecs==0.12.1
205
+ numpy==1.26.4
206
+ numpy==1.26.4
207
+ nvidia-cublas-cu12==12.1.3.1
208
+ nvidia-cuda-cupti-cu12==12.1.105
209
+ nvidia-cuda-nvrtc-cu12==12.1.105
210
+ nvidia-cuda-runtime-cu12==12.1.105
211
+ nvidia-cudnn-cu12==8.9.2.26
212
+ nvidia-cufft-cu12==11.0.2.54
213
+ nvidia-curand-cu12==10.3.2.106
214
+ nvidia-cusolver-cu12==11.4.5.107
215
+ nvidia-cusparse-cu12==12.1.0.106
216
+ nvidia-nccl-cu12==2.20.5
217
+ nvidia-nvjitlink-cu12==12.3.101
218
+ nvidia-nvtx-cu12==12.1.105
219
+ opencv-python==4.9.0.80
220
+ openslide-python==1.3.1
221
+ opentelemetry-api==1.21.0
222
+ opentelemetry-exporter-otlp-proto-common==1.21.0
223
+ opentelemetry-exporter-otlp-proto-http==1.21.0
224
+ opentelemetry-proto==1.21.0
225
+ opentelemetry-sdk==1.21.0
226
+ opentelemetry-semantic-conventions==0.42b0
227
+ orjson==3.10.4
228
+ overrides==7.4.0
229
+ overrides==7.7.0
230
+ packaging==23.2
231
+ packaging==24.0
232
+ pandas==2.2.2
233
+ pandocfilters==1.5.0
234
+ pandocfilters==1.5.0
235
+ paramiko==3.3.1
236
+ parso==0.8.3
237
+ parso==0.8.4
238
+ pexpect==4.9.0
239
+ pickleshare==0.7.5
240
+ pillow==10.3.0
241
+ pip==24.0
242
+ pkgutil_resolve_name==1.3.10
243
+ plac==1.4.1
244
+ platformdirs==4.2.1
245
+ prometheus-client==0.19.0
246
+ prometheus_client==0.20.0
247
+ prompt-toolkit==3.0.41
248
+ prompt-toolkit==3.0.42
249
+ protobuf==4.25.3
250
+ prov==1.5.1
251
+ psutil==5.9.8
252
+ ptyprocess==0.7.0
253
+ pure-eval==0.2.2
254
+ pure-eval==0.2.2
255
+ pycocotools==2.0.7
256
+ pycparser==2.21
257
+ pycparser==2.22
258
+ pydantic==2.7.4
259
+ pydantic_core==2.18.4
260
+ pydot==1.4.2
261
+ pydub==0.25.1
262
+ pyparsing==3.1.2
263
+ python-dateutil==2.8.2
264
+ python-dateutil==2.9.0
265
+ python-dotenv==0.21.1
266
+ python-json-logger==2.0.7
267
+ python-json-logger==2.0.7
268
+ python-multipart==0.0.9
269
+ python-slugify==8.0.1
270
+ pytorch-lightning==2.2.2
271
+ pytz==2024.1
272
+ pyzmq==25.1.1
273
+ pyzmq==25.1.2
274
+ pyzmq==26.0.2
275
+ qtconsole==5.5.1
276
+ rdflib==7.0.0
277
+ referencing==0.31.1
278
+ referencing==0.34.0
279
+ requests-toolbelt==1.0.0
280
+ requests==2.31.0
281
+ requests==2.31.0
282
+ reretry==0.11.8
283
+ rfc3339-validator==0.1.4
284
+ rfc3339-validator==0.1.4
285
+ rfc3986-validator==0.1.1
286
+ rfc3986-validator==0.1.1
287
+ rich==13.7.1
288
+ rpds-py==0.13.2
289
+ rpds-py==0.18.0
290
+ ruamel.yaml.clib==0.2.8
291
+ ruamel.yaml==0.18.5
292
+ ruff==0.4.8
293
+ schedulefree==1.2.5
294
+ schema-salad==8.4.20231117150958
295
+ scikit-image==0.22.0
296
+ scikit-learn==1.3.2
297
+ scipy==1.11.4
298
+ segment_anything==1.0
299
+ semantic-version==2.10.0
300
+ sentry-sdk==2.2.1
301
+ setproctitle==1.3.3
302
+ setuptools==69.5.1
303
+ shapely==2.0.4
304
+ shellescape==3.8.1
305
+ shellingham==1.5.4
306
+ six==1.16.0
307
+ slideio==2.5.0
308
+ smart-open==6.4.0
309
+ smmap==5.0.1
310
+ snakemake==7.32.4
311
+ sniffio==1.3.0
312
+ sniffio==1.3.1
313
+ soupsieve==2.5
314
+ soupsieve==2.5
315
+ stack-data==0.6.2
316
+ stack-data==0.6.3
317
+ starlette==0.37.2
318
+ stopit==1.1.2
319
+ sympy==1.12
320
+ sympy==1.12
321
+ synapseclient==4.2.0
322
+ tabulate==0.9.0
323
+ terminado==0.18.0
324
+ terminado==0.18.1
325
+ text-unidecode==1.3
326
+ texttable==1.7.0
327
+ threadpoolctl==3.2.0
328
+ throttler==1.2.2
329
+ tifffile==2024.4.24
330
+ tinycss2==1.2.1
331
+ tinycss2==1.2.1
332
+ tomli==2.0.1
333
+ tomli==2.0.1
334
+ tomlkit==0.12.0
335
+ toolz==0.12.1
336
+ toposort==1.10
337
+ torch-topological==0.1.7
338
+ torch==2.3.0
339
+ torchaudio==2.3.0
340
+ torchmetrics==1.4.0.post0
341
+ torchvision==0.18.0
342
+ tornado==6.4
343
+ tornado==6.4
344
+ tqdm==4.66.4
345
+ traitlets==5.14.0
346
+ traitlets==5.14.3
347
+ triton==2.3.0
348
+ triton==2.3.0
349
+ typer==0.12.3
350
+ types-python-dateutil==2.8.19.14
351
+ types-python-dateutil==2.9.0.20240316
352
+ typing-utils==0.1.0
353
+ typing_extensions==4.11.0
354
+ typing_extensions==4.8.0
355
+ tzdata==2024.1
356
+ ujson==5.10.0
357
+ uri-template==1.3.0
358
+ uri-template==1.3.0
359
+ urllib3==2.2.1
360
+ uvicorn==0.30.1
361
+ uvloop==0.19.0
362
+ wandb==0.17.0
363
+ watchfiles==0.22.0
364
+ wcwidth==0.2.12
365
+ wcwidth==0.2.13
366
+ webcolors==1.13
367
+ webcolors==1.13
368
+ webencodings==0.5.1
369
+ webencodings==0.5.1
370
+ websocket-client==0.59.0
371
+ websocket-client==1.8.0
372
+ websockets==11.0.3
373
+ wheel==0.43.0
374
+ widgetsnbextension==4.0.9
375
+ wrapt==1.16.0
376
+ yte==1.5.1
377
+ zarr==2.17.2
378
+ zipp==3.17.0
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-metadata.json ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "os": "Linux-5.15.0-112-generic-x86_64-with-glibc2.35",
3
+ "python": "3.10.14",
4
+ "heartbeatAt": "2024-06-12T18:49:59.300444",
5
+ "startedAt": "2024-06-12T18:49:58.656916",
6
+ "docker": null,
7
+ "cuda": null,
8
+ "args": [],
9
+ "state": "running",
10
+ "program": "<python with no main file>",
11
+ "codePathLocal": null,
12
+ "git": {
13
+ "remote": "https://github.com/philippendres/SAMHI.git",
14
+ "commit": "b72f97d47305e8d3ae04d0fd1d8bbba51deced40"
15
+ },
16
+ "email": "ge93qif@mytum.de",
17
+ "root": "/home/ubuntu/thesis/SAMHI",
18
+ "host": "dilaboct-5193a",
19
+ "username": "ubuntu",
20
+ "executable": "/vol/data/miniconda3/envs/histo3.10/bin/python",
21
+ "cpu_count": 8,
22
+ "cpu_count_logical": 8,
23
+ "cpu_freq": {
24
+ "current": 2800.0,
25
+ "min": 0.0,
26
+ "max": 0.0
27
+ },
28
+ "cpu_freq_per_core": [
29
+ {
30
+ "current": 2800.0,
31
+ "min": 0.0,
32
+ "max": 0.0
33
+ },
34
+ {
35
+ "current": 2800.0,
36
+ "min": 0.0,
37
+ "max": 0.0
38
+ },
39
+ {
40
+ "current": 2800.0,
41
+ "min": 0.0,
42
+ "max": 0.0
43
+ },
44
+ {
45
+ "current": 2800.0,
46
+ "min": 0.0,
47
+ "max": 0.0
48
+ },
49
+ {
50
+ "current": 2800.0,
51
+ "min": 0.0,
52
+ "max": 0.0
53
+ },
54
+ {
55
+ "current": 2800.0,
56
+ "min": 0.0,
57
+ "max": 0.0
58
+ },
59
+ {
60
+ "current": 2800.0,
61
+ "min": 0.0,
62
+ "max": 0.0
63
+ },
64
+ {
65
+ "current": 2800.0,
66
+ "min": 0.0,
67
+ "max": 0.0
68
+ }
69
+ ],
70
+ "disk": {
71
+ "/": {
72
+ "total": 48.27519989013672,
73
+ "used": 41.396217346191406
74
+ }
75
+ },
76
+ "gpu": "NVIDIA A40",
77
+ "gpu_count": 1,
78
+ "gpu_devices": [
79
+ {
80
+ "name": "NVIDIA A40",
81
+ "memory_total": 48305799168
82
+ }
83
+ ],
84
+ "memory": {
85
+ "total": 62.792388916015625
86
+ }
87
+ }
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-summary.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"_wandb": {"runtime": 13}}
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug-internal.log ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2024-06-12 18:49:58,672 INFO StreamThr :60040 [internal.py:wandb_internal():85] W&B internal server running at pid: 60040, started at: 2024-06-12 18:49:58.671044
2
+ 2024-06-12 18:49:58,676 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status
3
+ 2024-06-12 18:49:58,687 INFO WriterThread:60040 [datastore.py:open_for_write():87] open: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/run-2vmzqu3d.wandb
4
+ 2024-06-12 18:49:58,688 DEBUG SenderThread:60040 [sender.py:send():378] send: header
5
+ 2024-06-12 18:49:58,698 DEBUG SenderThread:60040 [sender.py:send():378] send: run
6
+ 2024-06-12 18:49:59,143 INFO SenderThread:60040 [dir_watcher.py:__init__():211] watching files in: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files
7
+ 2024-06-12 18:49:59,144 INFO SenderThread:60040 [sender.py:_start_run_threads():1123] run started: 2vmzqu3d with start time 1718218198.671151
8
+ 2024-06-12 18:49:59,163 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: check_version
9
+ 2024-06-12 18:49:59,164 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: check_version
10
+ 2024-06-12 18:49:59,260 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: run_start
11
+ 2024-06-12 18:49:59,279 DEBUG HandlerThread:60040 [system_info.py:__init__():26] System info init
12
+ 2024-06-12 18:49:59,279 DEBUG HandlerThread:60040 [system_info.py:__init__():41] System info init done
13
+ 2024-06-12 18:49:59,280 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
14
+ 2024-06-12 18:49:59,280 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
15
+ 2024-06-12 18:49:59,280 INFO HandlerThread:60040 [system_monitor.py:probe():214] Collecting system info
16
+ 2024-06-12 18:49:59,281 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
17
+ 2024-06-12 18:49:59,285 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
18
+ 2024-06-12 18:49:59,287 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
19
+ 2024-06-12 18:49:59,290 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
20
+ 2024-06-12 18:49:59,292 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
21
+ 2024-06-12 18:49:59,300 DEBUG HandlerThread:60040 [system_info.py:probe():150] Probing system
22
+ 2024-06-12 18:49:59,304 DEBUG HandlerThread:60040 [system_info.py:_probe_git():135] Probing git
23
+ 2024-06-12 18:49:59,314 DEBUG HandlerThread:60040 [system_info.py:_probe_git():143] Probing git done
24
+ 2024-06-12 18:49:59,314 DEBUG HandlerThread:60040 [system_info.py:probe():198] Probing system done
25
+ 2024-06-12 18:49:59,314 DEBUG HandlerThread:60040 [system_monitor.py:probe():223] {'os': 'Linux-5.15.0-112-generic-x86_64-with-glibc2.35', 'python': '3.10.14', 'heartbeatAt': '2024-06-12T18:49:59.300444', 'startedAt': '2024-06-12T18:49:58.656916', 'docker': None, 'cuda': None, 'args': (), 'state': 'running', 'program': '<python with no main file>', 'codePathLocal': None, 'git': {'remote': 'https://github.com/philippendres/SAMHI.git', 'commit': 'b72f97d47305e8d3ae04d0fd1d8bbba51deced40'}, 'email': 'ge93qif@mytum.de', 'root': '/home/ubuntu/thesis/SAMHI', 'host': 'dilaboct-5193a', 'username': 'ubuntu', 'executable': '/vol/data/miniconda3/envs/histo3.10/bin/python', 'cpu_count': 8, 'cpu_count_logical': 8, 'cpu_freq': {'current': 2800.0, 'min': 0.0, 'max': 0.0}, 'cpu_freq_per_core': [{'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}, {'current': 2800.0, 'min': 0.0, 'max': 0.0}], 'disk': {'/': {'total': 48.27519989013672, 'used': 41.396217346191406}}, 'gpu': 'NVIDIA A40', 'gpu_count': 1, 'gpu_devices': [{'name': 'NVIDIA A40', 'memory_total': 48305799168}], 'memory': {'total': 62.792388916015625}}
26
+ 2024-06-12 18:49:59,314 INFO HandlerThread:60040 [system_monitor.py:probe():224] Finished collecting system info
27
+ 2024-06-12 18:49:59,314 INFO HandlerThread:60040 [system_monitor.py:probe():227] Publishing system info
28
+ 2024-06-12 18:49:59,314 DEBUG HandlerThread:60040 [system_info.py:_save_conda():207] Saving list of conda packages installed into the current environment
29
+ 2024-06-12 18:50:00,147 INFO Thread-12 :60040 [dir_watcher.py:_on_file_created():271] file/dir created: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml
30
+ 2024-06-12 18:50:01,989 DEBUG HandlerThread:60040 [system_info.py:_save_conda():222] Saving conda packages done
31
+ 2024-06-12 18:50:01,990 INFO HandlerThread:60040 [system_monitor.py:probe():229] Finished publishing system info
32
+ 2024-06-12 18:50:01,995 DEBUG SenderThread:60040 [sender.py:send():378] send: files
33
+ 2024-06-12 18:50:01,995 INFO SenderThread:60040 [sender.py:_save_file():1389] saving file wandb-metadata.json with policy now
34
+ 2024-06-12 18:50:02,144 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml
35
+ 2024-06-12 18:50:02,145 INFO Thread-12 :60040 [dir_watcher.py:_on_file_created():271] file/dir created: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-metadata.json
36
+ 2024-06-12 18:50:02,294 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: python_packages
37
+ 2024-06-12 18:50:02,295 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: python_packages
38
+ 2024-06-12 18:50:02,295 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
39
+ 2024-06-12 18:50:02,298 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
40
+ 2024-06-12 18:50:02,470 DEBUG SenderThread:60040 [sender.py:send():378] send: telemetry
41
+ 2024-06-12 18:50:02,585 INFO wandb-upload_0:60040 [upload_job.py:push():130] Uploaded file /tmp/tmp9moz5yy2wandb/3ssye1n1-wandb-metadata.json
42
+ 2024-06-12 18:50:03,025 DEBUG SenderThread:60040 [sender.py:send():378] send: use_artifact
43
+ 2024-06-12 18:50:03,145 INFO Thread-12 :60040 [dir_watcher.py:_on_file_created():271] file/dir created: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/requirements.txt
44
+ 2024-06-12 18:50:03,853 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
45
+ 2024-06-12 18:50:04,146 INFO Thread-12 :60040 [dir_watcher.py:_on_file_created():271] file/dir created: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
46
+ 2024-06-12 18:50:05,538 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
47
+ 2024-06-12 18:50:05,539 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
48
+ 2024-06-12 18:50:05,539 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
49
+ 2024-06-12 18:50:05,539 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
50
+ 2024-06-12 18:50:05,539 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
51
+ 2024-06-12 18:50:05,539 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
52
+ 2024-06-12 18:50:05,540 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
53
+ 2024-06-12 18:50:05,540 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
54
+ 2024-06-12 18:50:05,570 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
55
+ 2024-06-12 18:50:05,571 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
56
+ 2024-06-12 18:50:05,571 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
57
+ 2024-06-12 18:50:05,602 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
58
+ 2024-06-12 18:50:05,602 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
59
+ 2024-06-12 18:50:05,602 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
60
+ 2024-06-12 18:50:05,603 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
61
+ 2024-06-12 18:50:05,603 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
62
+ 2024-06-12 18:50:05,604 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
63
+ 2024-06-12 18:50:05,605 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
64
+ 2024-06-12 18:50:05,605 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
65
+ 2024-06-12 18:50:05,605 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
66
+ 2024-06-12 18:50:05,607 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
67
+ 2024-06-12 18:50:05,608 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
68
+ 2024-06-12 18:50:05,611 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
69
+ 2024-06-12 18:50:05,612 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
70
+ 2024-06-12 18:50:05,613 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
71
+ 2024-06-12 18:50:05,617 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
72
+ 2024-06-12 18:50:05,617 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
73
+ 2024-06-12 18:50:05,618 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
74
+ 2024-06-12 18:50:05,658 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
75
+ 2024-06-12 18:50:05,658 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
76
+ 2024-06-12 18:50:05,658 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
77
+ 2024-06-12 18:50:05,659 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
78
+ 2024-06-12 18:50:06,147 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
79
+ 2024-06-12 18:50:09,660 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
80
+ 2024-06-12 18:50:14,662 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
81
+ 2024-06-12 18:50:17,295 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
82
+ 2024-06-12 18:50:17,296 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
83
+ 2024-06-12 18:50:20,572 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
84
+ 2024-06-12 18:50:25,573 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
85
+ 2024-06-12 18:50:27,344 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
86
+ 2024-06-12 18:50:27,345 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
87
+ 2024-06-12 18:50:27,345 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
88
+ 2024-06-12 18:50:27,345 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
89
+ 2024-06-12 18:50:27,346 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
90
+ 2024-06-12 18:50:27,347 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
91
+ 2024-06-12 18:50:27,348 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
92
+ 2024-06-12 18:50:27,353 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
93
+ 2024-06-12 18:50:27,355 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
94
+ 2024-06-12 18:50:27,835 DEBUG SenderThread:60040 [sender.py:send():378] send: telemetry
95
+ 2024-06-12 18:50:30,825 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
96
+ 2024-06-12 18:50:31,162 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml
97
+ 2024-06-12 18:50:32,296 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
98
+ 2024-06-12 18:50:32,297 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
99
+ 2024-06-12 18:50:33,163 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
100
+ 2024-06-12 18:50:33,881 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
101
+ 2024-06-12 18:50:33,881 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
102
+ 2024-06-12 18:50:33,881 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
103
+ 2024-06-12 18:50:33,881 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
104
+ 2024-06-12 18:50:33,882 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
105
+ 2024-06-12 18:50:33,883 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
106
+ 2024-06-12 18:50:33,884 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
107
+ 2024-06-12 18:50:33,884 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
108
+ 2024-06-12 18:50:33,925 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
109
+ 2024-06-12 18:50:33,926 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
110
+ 2024-06-12 18:50:33,926 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
111
+ 2024-06-12 18:50:33,927 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
112
+ 2024-06-12 18:50:35,164 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
113
+ 2024-06-12 18:50:36,928 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
114
+ 2024-06-12 18:50:41,929 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
115
+ 2024-06-12 18:50:46,930 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
116
+ 2024-06-12 18:50:47,296 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
117
+ 2024-06-12 18:50:47,297 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
118
+ 2024-06-12 18:50:52,485 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
119
+ 2024-06-12 18:50:57,486 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
120
+ 2024-06-12 18:51:02,296 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
121
+ 2024-06-12 18:51:02,297 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
122
+ 2024-06-12 18:51:02,519 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
123
+ 2024-06-12 18:51:07,520 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
124
+ 2024-06-12 18:51:12,521 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
125
+ 2024-06-12 18:51:17,297 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
126
+ 2024-06-12 18:51:17,298 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
127
+ 2024-06-12 18:51:17,691 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
128
+ 2024-06-12 18:51:22,692 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
129
+ 2024-06-12 18:51:27,693 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
130
+ 2024-06-12 18:51:32,297 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
131
+ 2024-06-12 18:51:32,299 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
132
+ 2024-06-12 18:51:33,453 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
133
+ 2024-06-12 18:51:38,455 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
134
+ 2024-06-12 18:51:43,457 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
135
+ 2024-06-12 18:51:47,298 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
136
+ 2024-06-12 18:51:47,299 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
137
+ 2024-06-12 18:51:48,524 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
138
+ 2024-06-12 18:51:53,526 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
139
+ 2024-06-12 18:51:58,528 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
140
+ 2024-06-12 18:52:02,298 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
141
+ 2024-06-12 18:52:02,298 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
142
+ 2024-06-12 18:52:04,494 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
143
+ 2024-06-12 18:52:09,495 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
144
+ 2024-06-12 18:52:14,497 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
145
+ 2024-06-12 18:52:17,298 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
146
+ 2024-06-12 18:52:17,299 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
147
+ 2024-06-12 18:52:19,544 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
148
+ 2024-06-12 18:52:24,546 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
149
+ 2024-06-12 18:52:29,547 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
150
+ 2024-06-12 18:52:32,298 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
151
+ 2024-06-12 18:52:32,300 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
152
+ 2024-06-12 18:52:35,527 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
153
+ 2024-06-12 18:52:40,624 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
154
+ 2024-06-12 18:52:41,232 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
155
+ 2024-06-12 18:52:42,232 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
156
+ 2024-06-12 18:52:45,625 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
157
+ 2024-06-12 18:52:47,299 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
158
+ 2024-06-12 18:52:47,300 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
159
+ 2024-06-12 18:52:51,465 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
160
+ 2024-06-12 18:52:56,467 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
161
+ 2024-06-12 18:53:01,468 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
162
+ 2024-06-12 18:53:02,299 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
163
+ 2024-06-12 18:53:02,301 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
164
+ 2024-06-12 18:53:06,532 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
165
+ 2024-06-12 18:53:11,533 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
166
+ 2024-06-12 18:53:16,534 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
167
+ 2024-06-12 18:53:17,300 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
168
+ 2024-06-12 18:53:17,301 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
169
+ 2024-06-12 18:53:21,539 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
170
+ 2024-06-12 18:53:26,540 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
171
+ 2024-06-12 18:53:31,542 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
172
+ 2024-06-12 18:53:32,300 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: stop_status
173
+ 2024-06-12 18:53:32,301 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: stop_status
174
+ 2024-06-12 18:53:35,081 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
175
+ 2024-06-12 18:53:35,081 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
176
+ 2024-06-12 18:53:35,081 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
177
+ 2024-06-12 18:53:35,081 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
178
+ 2024-06-12 18:53:35,083 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
179
+ 2024-06-12 18:53:35,084 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
180
+ 2024-06-12 18:53:35,086 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
181
+ 2024-06-12 18:53:35,088 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
182
+ 2024-06-12 18:53:35,090 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
183
+ 2024-06-12 18:53:35,091 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
184
+ 2024-06-12 18:53:35,093 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
185
+ 2024-06-12 18:53:35,093 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
186
+ 2024-06-12 18:53:35,094 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
187
+ 2024-06-12 18:53:35,094 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
188
+ 2024-06-12 18:53:35,095 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
189
+ 2024-06-12 18:53:35,095 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
190
+ 2024-06-12 18:53:35,095 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
191
+ 2024-06-12 18:53:35,137 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
192
+ 2024-06-12 18:53:35,138 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
193
+ 2024-06-12 18:53:35,138 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
194
+ 2024-06-12 18:53:35,139 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
195
+ 2024-06-12 18:53:36,135 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
196
+ 2024-06-12 18:53:36,135 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
197
+ 2024-06-12 18:53:36,135 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
198
+ 2024-06-12 18:53:36,136 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
199
+ 2024-06-12 18:53:36,137 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
200
+ 2024-06-12 18:53:36,139 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
201
+ 2024-06-12 18:53:36,140 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
202
+ 2024-06-12 18:53:36,146 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
203
+ 2024-06-12 18:53:36,147 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
204
+ 2024-06-12 18:53:36,149 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
205
+ 2024-06-12 18:53:36,149 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
206
+ 2024-06-12 18:53:36,148 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
207
+ 2024-06-12 18:53:36,150 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
208
+ 2024-06-12 18:53:36,153 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
209
+ 2024-06-12 18:53:36,154 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
210
+ 2024-06-12 18:53:36,155 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
211
+ 2024-06-12 18:53:36,156 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
212
+ 2024-06-12 18:53:36,195 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
213
+ 2024-06-12 18:53:36,195 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
214
+ 2024-06-12 18:53:36,196 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
215
+ 2024-06-12 18:53:36,196 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
216
+ 2024-06-12 18:53:37,197 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
217
+ 2024-06-12 18:53:38,899 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
218
+ 2024-06-12 18:53:38,899 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
219
+ 2024-06-12 18:53:38,899 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
220
+ 2024-06-12 18:53:38,900 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
221
+ 2024-06-12 18:53:38,902 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
222
+ 2024-06-12 18:53:38,903 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
223
+ 2024-06-12 18:53:38,904 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
224
+ 2024-06-12 18:53:38,906 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
225
+ 2024-06-12 18:53:38,906 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
226
+ 2024-06-12 18:53:38,906 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
227
+ 2024-06-12 18:53:38,908 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
228
+ 2024-06-12 18:53:38,910 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
229
+ 2024-06-12 18:53:38,910 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
230
+ 2024-06-12 18:53:38,911 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
231
+ 2024-06-12 18:53:38,911 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
232
+ 2024-06-12 18:53:38,911 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
233
+ 2024-06-12 18:53:38,954 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
234
+ 2024-06-12 18:53:38,955 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
235
+ 2024-06-12 18:53:38,956 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
236
+ 2024-06-12 18:53:39,571 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
237
+ 2024-06-12 18:53:39,571 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
238
+ 2024-06-12 18:53:39,571 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
239
+ 2024-06-12 18:53:39,572 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
240
+ 2024-06-12 18:53:39,573 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
241
+ 2024-06-12 18:53:39,574 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
242
+ 2024-06-12 18:53:39,575 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
243
+ 2024-06-12 18:53:39,576 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
244
+ 2024-06-12 18:53:39,578 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
245
+ 2024-06-12 18:53:39,578 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
246
+ 2024-06-12 18:53:39,580 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
247
+ 2024-06-12 18:53:39,583 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
248
+ 2024-06-12 18:53:39,583 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
249
+ 2024-06-12 18:53:39,585 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
250
+ 2024-06-12 18:53:39,585 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
251
+ 2024-06-12 18:53:39,586 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
252
+ 2024-06-12 18:53:39,588 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
253
+ 2024-06-12 18:53:39,631 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
254
+ 2024-06-12 18:53:39,631 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
255
+ 2024-06-12 18:53:39,631 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
256
+ 2024-06-12 18:53:39,632 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
257
+ 2024-06-12 18:53:39,743 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
258
+ 2024-06-12 18:53:39,743 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
259
+ 2024-06-12 18:53:39,743 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
260
+ 2024-06-12 18:53:39,744 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
261
+ 2024-06-12 18:53:39,744 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
262
+ 2024-06-12 18:53:39,746 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
263
+ 2024-06-12 18:53:39,747 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
264
+ 2024-06-12 18:53:39,748 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
265
+ 2024-06-12 18:53:39,750 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
266
+ 2024-06-12 18:53:39,751 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
267
+ 2024-06-12 18:53:39,756 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
268
+ 2024-06-12 18:53:39,756 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
269
+ 2024-06-12 18:53:39,756 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
270
+ 2024-06-12 18:53:39,759 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
271
+ 2024-06-12 18:53:39,759 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
272
+ 2024-06-12 18:53:39,759 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
273
+ 2024-06-12 18:53:39,760 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
274
+ 2024-06-12 18:53:39,802 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
275
+ 2024-06-12 18:53:39,802 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
276
+ 2024-06-12 18:53:39,803 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
277
+ 2024-06-12 18:53:39,803 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
278
+ 2024-06-12 18:53:40,108 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
279
+ 2024-06-12 18:53:40,108 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
280
+ 2024-06-12 18:53:40,109 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
281
+ 2024-06-12 18:53:40,109 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
282
+ 2024-06-12 18:53:40,110 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
283
+ 2024-06-12 18:53:40,111 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
284
+ 2024-06-12 18:53:40,112 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
285
+ 2024-06-12 18:53:40,115 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
286
+ 2024-06-12 18:53:40,116 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
287
+ 2024-06-12 18:53:40,118 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
288
+ 2024-06-12 18:53:40,118 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
289
+ 2024-06-12 18:53:40,118 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
290
+ 2024-06-12 18:53:40,119 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
291
+ 2024-06-12 18:53:40,119 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
292
+ 2024-06-12 18:53:40,119 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
293
+ 2024-06-12 18:53:40,120 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
294
+ 2024-06-12 18:53:40,120 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
295
+ 2024-06-12 18:53:40,164 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
296
+ 2024-06-12 18:53:40,165 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
297
+ 2024-06-12 18:53:40,165 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
298
+ 2024-06-12 18:53:40,166 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
299
+ 2024-06-12 18:53:41,413 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
300
+ 2024-06-12 18:53:41,413 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
301
+ 2024-06-12 18:53:41,413 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
302
+ 2024-06-12 18:53:41,414 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
303
+ 2024-06-12 18:53:41,416 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
304
+ 2024-06-12 18:53:41,417 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
305
+ 2024-06-12 18:53:41,419 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
306
+ 2024-06-12 18:53:41,420 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
307
+ 2024-06-12 18:53:41,422 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
308
+ 2024-06-12 18:53:41,424 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
309
+ 2024-06-12 18:53:41,425 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
310
+ 2024-06-12 18:53:41,425 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
311
+ 2024-06-12 18:53:41,426 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
312
+ 2024-06-12 18:53:41,426 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
313
+ 2024-06-12 18:53:41,427 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
314
+ 2024-06-12 18:53:41,427 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
315
+ 2024-06-12 18:53:41,427 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
316
+ 2024-06-12 18:53:41,471 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
317
+ 2024-06-12 18:53:41,471 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
318
+ 2024-06-12 18:53:41,472 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
319
+ 2024-06-12 18:53:41,472 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
320
+ 2024-06-12 18:53:41,597 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
321
+ 2024-06-12 18:53:41,598 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
322
+ 2024-06-12 18:53:41,598 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
323
+ 2024-06-12 18:53:41,598 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
324
+ 2024-06-12 18:53:41,599 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
325
+ 2024-06-12 18:53:41,601 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
326
+ 2024-06-12 18:53:41,603 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
327
+ 2024-06-12 18:53:41,605 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
328
+ 2024-06-12 18:53:41,607 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: pause
329
+ 2024-06-12 18:53:41,608 INFO HandlerThread:60040 [handler.py:handle_request_pause():724] stopping system metrics thread
330
+ 2024-06-12 18:53:41,608 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
331
+ 2024-06-12 18:53:41,610 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
332
+ 2024-06-12 18:53:41,610 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
333
+ 2024-06-12 18:53:41,611 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
334
+ 2024-06-12 18:53:41,611 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
335
+ 2024-06-12 18:53:41,612 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
336
+ 2024-06-12 18:53:41,613 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
337
+ 2024-06-12 18:53:41,662 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
338
+ 2024-06-12 18:53:41,662 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
339
+ 2024-06-12 18:53:41,663 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
340
+ 2024-06-12 18:53:41,663 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
341
+ 2024-06-12 18:53:42,665 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
342
+ 2024-06-12 18:53:43,999 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: resume
343
+ 2024-06-12 18:53:44,000 INFO HandlerThread:60040 [handler.py:handle_request_resume():715] starting system metrics thread
344
+ 2024-06-12 18:53:44,000 INFO HandlerThread:60040 [system_monitor.py:start():194] Starting system monitor
345
+ 2024-06-12 18:53:44,000 INFO SystemMonitor:60040 [system_monitor.py:_start():158] Starting system asset monitoring threads
346
+ 2024-06-12 18:53:44,002 INFO SystemMonitor:60040 [interfaces.py:start():188] Started cpu monitoring
347
+ 2024-06-12 18:53:44,003 INFO SystemMonitor:60040 [interfaces.py:start():188] Started disk monitoring
348
+ 2024-06-12 18:53:44,004 INFO SystemMonitor:60040 [interfaces.py:start():188] Started gpu monitoring
349
+ 2024-06-12 18:53:44,006 INFO SystemMonitor:60040 [interfaces.py:start():188] Started memory monitoring
350
+ 2024-06-12 18:53:44,007 INFO SystemMonitor:60040 [interfaces.py:start():188] Started network monitoring
351
+ 2024-06-12 18:53:44,045 DEBUG SenderThread:60040 [sender.py:send():378] send: telemetry
352
+ 2024-06-12 18:53:44,048 DEBUG SenderThread:60040 [sender.py:send():378] send: exit
353
+ 2024-06-12 18:53:44,048 INFO SenderThread:60040 [sender.py:send_exit():585] handling exit code: 0
354
+ 2024-06-12 18:53:44,049 INFO SenderThread:60040 [sender.py:send_exit():587] handling runtime: 13
355
+ 2024-06-12 18:53:44,049 INFO SenderThread:60040 [sender.py:_save_file():1389] saving file wandb-summary.json with policy end
356
+ 2024-06-12 18:53:44,050 INFO SenderThread:60040 [sender.py:send_exit():593] send defer
357
+ 2024-06-12 18:53:44,050 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
358
+ 2024-06-12 18:53:44,051 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 0
359
+ 2024-06-12 18:53:44,051 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
360
+ 2024-06-12 18:53:44,051 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 0
361
+ 2024-06-12 18:53:44,052 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 1
362
+ 2024-06-12 18:53:44,052 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
363
+ 2024-06-12 18:53:44,052 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 1
364
+ 2024-06-12 18:53:44,053 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
365
+ 2024-06-12 18:53:44,053 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 1
366
+ 2024-06-12 18:53:44,053 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 2
367
+ 2024-06-12 18:53:44,053 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
368
+ 2024-06-12 18:53:44,053 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 2
369
+ 2024-06-12 18:53:44,053 INFO HandlerThread:60040 [system_monitor.py:finish():203] Stopping system monitor
370
+ 2024-06-12 18:53:44,054 DEBUG SystemMonitor:60040 [system_monitor.py:_start():172] Starting system metrics aggregation loop
371
+ 2024-06-12 18:53:44,055 DEBUG SystemMonitor:60040 [system_monitor.py:_start():179] Finished system metrics aggregation loop
372
+ 2024-06-12 18:53:44,055 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined cpu monitor
373
+ 2024-06-12 18:53:44,056 DEBUG SystemMonitor:60040 [system_monitor.py:_start():183] Publishing last batch of metrics
374
+ 2024-06-12 18:53:44,056 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined disk monitor
375
+ 2024-06-12 18:53:44,101 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined gpu monitor
376
+ 2024-06-12 18:53:44,101 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined memory monitor
377
+ 2024-06-12 18:53:44,102 INFO HandlerThread:60040 [interfaces.py:finish():200] Joined network monitor
378
+ 2024-06-12 18:53:44,102 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
379
+ 2024-06-12 18:53:44,103 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 2
380
+ 2024-06-12 18:53:44,103 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 3
381
+ 2024-06-12 18:53:44,103 DEBUG SenderThread:60040 [sender.py:send():378] send: stats
382
+ 2024-06-12 18:53:44,104 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
383
+ 2024-06-12 18:53:44,104 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 3
384
+ 2024-06-12 18:53:44,105 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
385
+ 2024-06-12 18:53:44,105 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 3
386
+ 2024-06-12 18:53:44,105 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 4
387
+ 2024-06-12 18:53:44,105 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
388
+ 2024-06-12 18:53:44,106 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 4
389
+ 2024-06-12 18:53:44,106 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
390
+ 2024-06-12 18:53:44,106 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 4
391
+ 2024-06-12 18:53:44,106 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 5
392
+ 2024-06-12 18:53:44,107 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
393
+ 2024-06-12 18:53:44,107 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 5
394
+ 2024-06-12 18:53:44,107 DEBUG SenderThread:60040 [sender.py:send():378] send: summary
395
+ 2024-06-12 18:53:44,108 INFO SenderThread:60040 [sender.py:_save_file():1389] saving file wandb-summary.json with policy end
396
+ 2024-06-12 18:53:44,109 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
397
+ 2024-06-12 18:53:44,109 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 5
398
+ 2024-06-12 18:53:44,109 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 6
399
+ 2024-06-12 18:53:44,109 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
400
+ 2024-06-12 18:53:44,109 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 6
401
+ 2024-06-12 18:53:44,110 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
402
+ 2024-06-12 18:53:44,110 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 6
403
+ 2024-06-12 18:53:44,115 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: status_report
404
+ 2024-06-12 18:53:44,265 INFO Thread-12 :60040 [dir_watcher.py:_on_file_created():271] file/dir created: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-summary.json
405
+ 2024-06-12 18:53:44,280 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 7
406
+ 2024-06-12 18:53:44,280 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
407
+ 2024-06-12 18:53:44,281 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 7
408
+ 2024-06-12 18:53:44,281 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
409
+ 2024-06-12 18:53:44,281 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 7
410
+ 2024-06-12 18:53:45,048 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: poll_exit
411
+ 2024-06-12 18:53:45,266 INFO Thread-12 :60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml
412
+ 2024-06-12 18:53:47,100 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 8
413
+ 2024-06-12 18:53:47,100 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: poll_exit
414
+ 2024-06-12 18:53:47,101 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
415
+ 2024-06-12 18:53:47,101 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 8
416
+ 2024-06-12 18:53:47,102 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
417
+ 2024-06-12 18:53:47,103 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 8
418
+ 2024-06-12 18:53:47,103 INFO SenderThread:60040 [job_builder.py:build():432] Attempting to build job artifact
419
+ 2024-06-12 18:53:47,103 INFO SenderThread:60040 [job_builder.py:_get_source_type():565] is repo sourced job
420
+ 2024-06-12 18:53:47,103 INFO SenderThread:60040 [job_builder.py:_get_program_relpath():583] run is notebook based run
421
+ 2024-06-12 18:53:47,104 WARNING SenderThread:60040 [job_builder.py:_log_if_verbose():267] Source type is set to 'repo' but some required information is missing from the environment. A job will not be created from this run. See https://docs.wandb.ai/guides/launch/create-job
422
+ 2024-06-12 18:53:47,104 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 9
423
+ 2024-06-12 18:53:47,104 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
424
+ 2024-06-12 18:53:47,104 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 9
425
+ 2024-06-12 18:53:47,105 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
426
+ 2024-06-12 18:53:47,105 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 9
427
+ 2024-06-12 18:53:47,105 INFO SenderThread:60040 [dir_watcher.py:finish():358] shutting down directory watcher
428
+ 2024-06-12 18:53:47,268 INFO SenderThread:60040 [dir_watcher.py:_on_file_modified():288] file/dir modified: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
429
+ 2024-06-12 18:53:47,268 INFO SenderThread:60040 [dir_watcher.py:finish():388] scan: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files
430
+ 2024-06-12 18:53:47,269 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-metadata.json wandb-metadata.json
431
+ 2024-06-12 18:53:47,269 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml conda-environment.yaml
432
+ 2024-06-12 18:53:47,269 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/requirements.txt requirements.txt
433
+ 2024-06-12 18:53:47,269 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log output.log
434
+ 2024-06-12 18:53:47,269 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml config.yaml
435
+ 2024-06-12 18:53:47,270 INFO SenderThread:60040 [dir_watcher.py:finish():402] scan save: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-summary.json wandb-summary.json
436
+ 2024-06-12 18:53:47,270 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 10
437
+ 2024-06-12 18:53:47,270 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
438
+ 2024-06-12 18:53:47,271 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 10
439
+ 2024-06-12 18:53:47,276 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
440
+ 2024-06-12 18:53:47,276 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 10
441
+ 2024-06-12 18:53:47,277 INFO SenderThread:60040 [file_pusher.py:finish():169] shutting down file pusher
442
+ 2024-06-12 18:53:47,675 INFO wandb-upload_0:60040 [upload_job.py:push():130] Uploaded file /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/conda-environment.yaml
443
+ 2024-06-12 18:53:47,774 INFO wandb-upload_2:60040 [upload_job.py:push():130] Uploaded file /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/output.log
444
+ 2024-06-12 18:53:47,797 INFO wandb-upload_1:60040 [upload_job.py:push():130] Uploaded file /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/requirements.txt
445
+ 2024-06-12 18:53:47,801 INFO wandb-upload_4:60040 [upload_job.py:push():130] Uploaded file /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/wandb-summary.json
446
+ 2024-06-12 18:53:47,812 INFO wandb-upload_3:60040 [upload_job.py:push():130] Uploaded file /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/files/config.yaml
447
+ 2024-06-12 18:53:48,013 INFO Thread-11 (_thread_body):60040 [sender.py:transition_state():613] send defer: 11
448
+ 2024-06-12 18:53:48,014 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
449
+ 2024-06-12 18:53:48,014 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 11
450
+ 2024-06-12 18:53:48,015 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
451
+ 2024-06-12 18:53:48,015 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 11
452
+ 2024-06-12 18:53:48,015 INFO SenderThread:60040 [file_pusher.py:join():175] waiting for file pusher
453
+ 2024-06-12 18:53:48,016 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 12
454
+ 2024-06-12 18:53:48,016 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
455
+ 2024-06-12 18:53:48,016 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 12
456
+ 2024-06-12 18:53:48,017 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
457
+ 2024-06-12 18:53:48,017 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 12
458
+ 2024-06-12 18:53:48,017 INFO SenderThread:60040 [file_stream.py:finish():601] file stream finish called
459
+ 2024-06-12 18:53:48,050 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: poll_exit
460
+ 2024-06-12 18:53:48,169 INFO SenderThread:60040 [file_stream.py:finish():605] file stream finish is done
461
+ 2024-06-12 18:53:48,169 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 13
462
+ 2024-06-12 18:53:48,170 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: poll_exit
463
+ 2024-06-12 18:53:48,170 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
464
+ 2024-06-12 18:53:48,171 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 13
465
+ 2024-06-12 18:53:48,171 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
466
+ 2024-06-12 18:53:48,171 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 13
467
+ 2024-06-12 18:53:48,172 INFO SenderThread:60040 [sender.py:transition_state():613] send defer: 14
468
+ 2024-06-12 18:53:48,172 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: defer
469
+ 2024-06-12 18:53:48,172 INFO HandlerThread:60040 [handler.py:handle_request_defer():184] handle defer: 14
470
+ 2024-06-12 18:53:48,173 DEBUG SenderThread:60040 [sender.py:send():378] send: final
471
+ 2024-06-12 18:53:48,173 DEBUG SenderThread:60040 [sender.py:send():378] send: footer
472
+ 2024-06-12 18:53:48,173 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: defer
473
+ 2024-06-12 18:53:48,173 INFO SenderThread:60040 [sender.py:send_request_defer():609] handle sender defer: 14
474
+ 2024-06-12 18:53:48,175 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: poll_exit
475
+ 2024-06-12 18:53:48,176 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: poll_exit
476
+ 2024-06-12 18:53:48,179 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: internal_messages
477
+ 2024-06-12 18:53:48,180 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: server_info
478
+ 2024-06-12 18:53:48,181 DEBUG SenderThread:60040 [sender.py:send_request():405] send_request: server_info
479
+ 2024-06-12 18:53:48,223 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: get_summary
480
+ 2024-06-12 18:53:48,224 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: sampled_history
481
+ 2024-06-12 18:53:48,344 DEBUG HandlerThread:60040 [handler.py:handle_request():158] handle_request: shutdown
482
+ 2024-06-12 18:53:48,345 INFO HandlerThread:60040 [handler.py:finish():882] shutting down handler
483
+ 2024-06-12 18:53:49,181 INFO WriterThread:60040 [datastore.py:close():296] close: /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/run-2vmzqu3d.wandb
484
+ 2024-06-12 18:53:49,343 INFO SenderThread:60040 [sender.py:finish():1545] shutting down sender
485
+ 2024-06-12 18:53:49,344 INFO SenderThread:60040 [file_pusher.py:finish():169] shutting down file pusher
486
+ 2024-06-12 18:53:49,344 INFO SenderThread:60040 [file_pusher.py:join():175] waiting for file pusher
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug.log ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2024-06-12 18:49:58,661 INFO MainThread:58594 [wandb_setup.py:_flush():76] Current SDK version is 0.17.0
2
+ 2024-06-12 18:49:58,662 INFO MainThread:58594 [wandb_setup.py:_flush():76] Configure stats pid to 58594
3
+ 2024-06-12 18:49:58,662 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/.config/wandb/settings
4
+ 2024-06-12 18:49:58,662 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/thesis/SAMHI/notebooks/wandb/settings
5
+ 2024-06-12 18:49:58,663 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from environment variables: {}
6
+ 2024-06-12 18:49:58,663 INFO MainThread:58594 [wandb_setup.py:_flush():76] Applying setup settings: {'_disable_service': False}
7
+ 2024-06-12 18:49:58,663 INFO MainThread:58594 [wandb_setup.py:_flush():76] Inferring run settings from compute environment: {'program': '<python with no main file>'}
8
+ 2024-06-12 18:49:58,663 INFO MainThread:58594 [wandb_setup.py:_flush():76] Applying login settings: {}
9
+ 2024-06-12 18:49:58,664 INFO MainThread:58594 [wandb_init.py:_log_setup():520] Logging user logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug.log
10
+ 2024-06-12 18:49:58,664 INFO MainThread:58594 [wandb_init.py:_log_setup():521] Logging internal logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_184958-2vmzqu3d/logs/debug-internal.log
11
+ 2024-06-12 18:49:58,664 INFO MainThread:58594 [wandb_init.py:_jupyter_setup():466] configuring jupyter hooks <wandb.sdk.wandb_init._WandbInit object at 0x7fcce84ff070>
12
+ 2024-06-12 18:49:58,665 INFO MainThread:58594 [wandb_init.py:init():560] calling init triggers
13
+ 2024-06-12 18:49:58,665 INFO MainThread:58594 [wandb_init.py:init():567] wandb.init called with sweep_config: {}
14
+ config: {}
15
+ 2024-06-12 18:49:58,666 INFO MainThread:58594 [wandb_init.py:init():610] starting backend
16
+ 2024-06-12 18:49:58,666 INFO MainThread:58594 [wandb_init.py:init():614] setting up manager
17
+ 2024-06-12 18:49:58,668 INFO MainThread:58594 [backend.py:_multiprocessing_setup():105] multiprocessing start_methods=fork,spawn,forkserver, using: spawn
18
+ 2024-06-12 18:49:58,670 INFO MainThread:58594 [wandb_init.py:init():622] backend started and connected
19
+ 2024-06-12 18:49:58,685 INFO MainThread:58594 [wandb_run.py:_label_probe_notebook():1328] probe notebook
20
+ 2024-06-12 18:49:58,686 INFO MainThread:58594 [wandb_run.py:_label_probe_notebook():1338] Unable to probe notebook: 'NoneType' object has no attribute 'get'
21
+ 2024-06-12 18:49:58,686 INFO MainThread:58594 [wandb_init.py:init():711] updated telemetry
22
+ 2024-06-12 18:49:58,697 INFO MainThread:58594 [wandb_init.py:init():744] communicating run to backend with 90.0 second timeout
23
+ 2024-06-12 18:49:59,163 INFO MainThread:58594 [wandb_run.py:_on_init():2396] communicating current version
24
+ 2024-06-12 18:49:59,251 INFO MainThread:58594 [wandb_run.py:_on_init():2405] got version response upgrade_message: "wandb version 0.17.1 is available! To upgrade, please run:\n $ pip install wandb --upgrade"
25
+
26
+ 2024-06-12 18:49:59,252 INFO MainThread:58594 [wandb_init.py:init():795] starting run threads in backend
27
+ 2024-06-12 18:50:02,295 INFO MainThread:58594 [wandb_run.py:_console_start():2374] atexit reg
28
+ 2024-06-12 18:50:02,296 INFO MainThread:58594 [wandb_run.py:_redirect():2229] redirect: wrap_raw
29
+ 2024-06-12 18:50:02,296 INFO MainThread:58594 [wandb_run.py:_redirect():2294] Wrapping output streams.
30
+ 2024-06-12 18:50:02,296 INFO MainThread:58594 [wandb_run.py:_redirect():2319] Redirects installed.
31
+ 2024-06-12 18:50:02,297 INFO MainThread:58594 [wandb_init.py:init():838] run started, returning control to user process
32
+ 2024-06-12 18:50:05,538 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
33
+ 2024-06-12 18:50:05,538 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
34
+ 2024-06-12 18:50:05,602 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
35
+ 2024-06-12 18:50:05,603 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
36
+ 2024-06-12 18:50:05,603 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
37
+ 2024-06-12 18:50:27,343 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
38
+ 2024-06-12 18:50:33,879 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
39
+ 2024-06-12 18:50:33,880 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
40
+ 2024-06-12 18:53:35,079 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
41
+ 2024-06-12 18:53:35,088 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
42
+ 2024-06-12 18:53:35,088 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
43
+ 2024-06-12 18:53:36,133 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
44
+ 2024-06-12 18:53:36,144 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
45
+ 2024-06-12 18:53:36,145 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
46
+ 2024-06-12 18:53:38,897 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
47
+ 2024-06-12 18:53:38,904 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
48
+ 2024-06-12 18:53:38,905 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
49
+ 2024-06-12 18:53:39,570 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
50
+ 2024-06-12 18:53:39,577 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
51
+ 2024-06-12 18:53:39,577 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
52
+ 2024-06-12 18:53:39,742 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
53
+ 2024-06-12 18:53:39,749 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
54
+ 2024-06-12 18:53:39,750 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
55
+ 2024-06-12 18:53:40,107 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
56
+ 2024-06-12 18:53:40,116 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
57
+ 2024-06-12 18:53:40,117 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
58
+ 2024-06-12 18:53:41,411 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
59
+ 2024-06-12 18:53:41,421 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
60
+ 2024-06-12 18:53:41,421 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
61
+ 2024-06-12 18:53:41,596 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
62
+ 2024-06-12 18:53:41,604 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
63
+ 2024-06-12 18:53:41,605 INFO MainThread:58594 [wandb_init.py:_pause_backend():431] pausing backend
64
+ 2024-06-12 18:53:43,998 INFO MainThread:58594 [wandb_init.py:_resume_backend():436] resuming backend
65
+ 2024-06-12 18:53:44,033 INFO MainThread:58594 [wandb_setup.py:_flush():76] Current SDK version is 0.17.0
66
+ 2024-06-12 18:53:44,033 INFO MainThread:58594 [wandb_setup.py:_flush():76] Configure stats pid to 58594
67
+ 2024-06-12 18:53:44,034 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/.config/wandb/settings
68
+ 2024-06-12 18:53:44,035 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from /home/ubuntu/thesis/SAMHI/notebooks/wandb/settings
69
+ 2024-06-12 18:53:44,035 INFO MainThread:58594 [wandb_setup.py:_flush():76] Loading settings from environment variables: {}
70
+ 2024-06-12 18:53:44,036 INFO MainThread:58594 [wandb_setup.py:_flush():76] Applying setup settings: {'_disable_service': False}
71
+ 2024-06-12 18:53:44,036 INFO MainThread:58594 [wandb_setup.py:_flush():76] Inferring run settings from compute environment: {'program': '<python with no main file>'}
72
+ 2024-06-12 18:53:44,037 INFO MainThread:58594 [wandb_setup.py:_flush():76] Applying login settings: {}
73
+ 2024-06-12 18:53:44,038 INFO MainThread:58594 [wandb_init.py:_log_setup():520] Logging user logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_185344-3wpkmoo8/logs/debug.log
74
+ 2024-06-12 18:53:44,038 INFO MainThread:58594 [wandb_init.py:_log_setup():521] Logging internal logs to /home/ubuntu/thesis/SAMHI/notebooks/wandb/run-20240612_185344-3wpkmoo8/logs/debug-internal.log
75
+ 2024-06-12 18:53:44,039 INFO MainThread:58594 [wandb_init.py:init():560] calling init triggers
76
+ 2024-06-12 18:53:44,040 INFO MainThread:58594 [wandb_init.py:init():567] wandb.init called with sweep_config: {}
77
+ config: {}
78
+ 2024-06-12 18:53:44,040 INFO MainThread:58594 [wandb_init.py:init():585] re-initializing run, found existing run on stack: 2vmzqu3d
79
+ 2024-06-12 18:53:44,044 INFO MainThread:58594 [wandb_run.py:_finish():2103] finishing run philippresearch/SAMHI/2vmzqu3d
80
+ 2024-06-12 18:53:44,045 INFO MainThread:58594 [jupyter.py:save_history():445] not saving jupyter history
81
+ 2024-06-12 18:53:44,045 INFO MainThread:58594 [jupyter.py:save_ipynb():373] not saving jupyter notebook
82
+ 2024-06-12 18:53:44,046 INFO MainThread:58594 [wandb_init.py:_jupyter_teardown():448] cleaning up jupyter logic
83
+ 2024-06-12 18:53:44,046 INFO MainThread:58594 [wandb_run.py:_atexit_cleanup():2343] got exitcode: 0
84
+ 2024-06-12 18:53:44,046 INFO MainThread:58594 [wandb_run.py:_restore():2326] restore
85
+ 2024-06-12 18:53:44,047 INFO MainThread:58594 [wandb_run.py:_restore():2332] restore done
86
+ 2024-06-12 18:53:49,347 INFO MainThread:58594 [wandb_run.py:_footer_history_summary_info():3994] rendering history
87
+ 2024-06-12 18:53:49,347 INFO MainThread:58594 [wandb_run.py:_footer_history_summary_info():4026] rendering summary
88
+ 2024-06-12 18:53:49,358 INFO MainThread:58594 [wandb_run.py:_footer_sync_info():3953] logging synced files
CellPilot/notebooks/wandb/run-20240612_184958-2vmzqu3d/run-2vmzqu3d.wandb ADDED
Binary file (16.8 kB). View file