Skip to content

Commit cc653b0

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents b2b95fe + 1ce498b commit cc653b0

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

CellTracker/stardistwrapper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def load_2d_slices_at_time(images_path: str | dict, t: int, do_normalize: bool =
5050
slice_paths_at_t = sorted(glob(images_path % t))
5151
if len(slice_paths_at_t) == 0:
5252
raise FileNotFoundError(f"No image at time {t} was found")
53-
x = np.array([np.array(Image.open(img)) for img in slice_paths_at_t])
53+
x = imread(slice_paths_at_t)
5454
elif isinstance(images_path, dict):
5555
file_extension = os.path.splitext(images_path["h5_file"])[1]
5656
assert file_extension in [".h5", ".hdf5"], "Currently only TIFF sequences or HDF5 dataset are supported"
5757

5858
import h5py
5959
with h5py.File(images_path["h5_file"], 'r') as f:
60-
x = f[images_path["dset"]][t - 1, images_path["channel"], :, :, :]
60+
x = f["default"][t - 1, images_path["channel"], :, :, :]
6161
else:
6262
raise ValueError("image_paths should be a str for TIFF sequences or dict for HDF5 dataset")
6363

Examples/use_stardist/track_stardist_single_mode-h5.ipynb

+14-15
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@
100100
"name": "stderr",
101101
"output_type": "stream",
102102
"text": [
103-
"2023-09-26 14:40:01.505383: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
104-
"2023-09-26 14:40:01.510975: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
105-
"2023-09-26 14:40:01.511674: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
106-
"2023-09-26 14:40:01.512420: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n",
103+
"2024-01-09 13:52:38.479539: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
104+
"2024-01-09 13:52:38.482970: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
105+
"2024-01-09 13:52:38.483351: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
106+
"2024-01-09 13:52:38.483869: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA\n",
107107
"To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
108-
"2023-09-26 14:40:01.512820: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
109-
"2023-09-26 14:40:01.513241: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
110-
"2023-09-26 14:40:01.513648: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
111-
"2023-09-26 14:40:01.748405: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
112-
"2023-09-26 14:40:01.748815: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
113-
"2023-09-26 14:40:01.749180: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
114-
"2023-09-26 14:40:01.749544: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 10035 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3080 Ti, pci bus id: 0000:01:00.0, compute capability: 8.6\n"
108+
"2024-01-09 13:52:38.484683: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
109+
"2024-01-09 13:52:38.485084: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
110+
"2024-01-09 13:52:38.485460: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
111+
"2024-01-09 13:52:38.740138: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
112+
"2024-01-09 13:52:38.740558: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
113+
"2024-01-09 13:52:38.740921: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
114+
"2024-01-09 13:52:38.741269: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 10035 MB memory: -> device: 0, name: NVIDIA GeForce RTX 3080 Ti, pci bus id: 0000:01:00.0, compute capability: 8.6\n"
115115
]
116116
}
117117
],
@@ -151,8 +151,8 @@
151151
"name": "stderr",
152152
"output_type": "stream",
153153
"text": [
154-
"2023-09-26 14:40:02.335379: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)\n",
155-
"2023-09-26 14:40:02.928110: I tensorflow/stream_executor/cuda/cuda_dnn.cc:369] Loaded cuDNN version 8101\n"
154+
"2024-01-09 13:52:39.321889: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)\n",
155+
"2024-01-09 13:52:39.873823: I tensorflow/stream_executor/cuda/cuda_dnn.cc:369] Loaded cuDNN version 8101\n"
156156
]
157157
},
158158
{
@@ -170,8 +170,7 @@
170170
],
171171
"source": [
172172
"path_results = \"./mikami_test/\"\n",
173-
"path_raw_images = {\"h5_file\":\"./mikami_test/virtual_array.h5\",\n",
174-
" \"dset\": \"raw_images\",\n",
173+
"path_raw_images = {\"h5_file\":\"/home/wen/BIG_DATA_1/Mikami_free_moving_worm/20231218/raw_gzip.h5\",\n",
175174
" \"channel\": 0}\n",
176175
"\n",
177176
"# Load raw image at vol 1\n",

0 commit comments

Comments
 (0)