File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/aind_exaspim_image_compression/machine_learning Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ dependencies = [
2525 ' interrogate' ,
2626 ' ome-zarr' ,
2727 ' pandas' ,
28- ' s3fs' ,
28+ ' s3fs==2025.7.0 ' ,
2929 ' scikit-image' ,
3030 ' scikit-learn' ,
3131 ' scipy' ,
@@ -34,7 +34,7 @@ dependencies = [
3434 ' torch' ,
3535 ' torchvision' ,
3636 ' tqdm' ,
37- ' xarray_multiscale' ,
37+ ' xarray_multiscale==1.2.0 ' ,
3838 ' zarr' ,
3939 " aind-exaspim-dataset-utils @ git+https://github.com/AllenNeuralDynamics/aind-exaspim-dataset-utils.git@main"
4040]
Original file line number Diff line number Diff line change @@ -145,6 +145,28 @@ def load_swcs(self, swc_pointer):
145145
146146 # --- Sample Image Patches ---
147147 def __getitem__ (self , dummy_input ):
148+ """
149+ Return a pair of noisy and BM4D-denoised image patches, normalized
150+ according to percentile-based scaling.
151+
152+ Parameters
153+ ----------
154+ dummy_input : Any
155+ Dummy argument required by PyTorch's `Dataset` interface for indexing.
156+ Not used in the patch sampling procedure.
157+
158+ Returns
159+ -------
160+ tuple
161+ A tuple containing:
162+ - noise : np.ndarray
163+ Noisy image patch, normalized and clipped.
164+ denoised : np.ndarray
165+ Denoised image patch, normalized and clipped using the same
166+ scale as the noisy patch.
167+ (mn, mx) : Tuple[float]
168+ Lower and upper percentiles used for normalization.
169+ """
148170 # Get image patches
149171 brain_id = self .sample_brain ()
150172 voxel = self .sample_voxel (brain_id )
You can’t perform that action at this time.
0 commit comments