Merged
Conversation
Introduces a data_importers/ directory to hold format-conversion scripts that produce the per-slice TIFF directories expected by Noise2Inverse360. First converter (3dtiff_converter.py) splits a single volumetric TIFF [Z, H, W] into numbered 2D slice files (00000.tiff, ...) so reconstructions already saved as 3D stacks can be used for training without modifying the core data pipeline
Removes the hardcoded paths and adds positional arguments so the script works when the user lacks write permission to the source directory. Output defaults to input_dir when not specified
Member
Author
|
@AustinYunker please keep this open until is fully tested. I will confirm |
Fixes port conflict (EADDRINUSE) when running two training jobs in parallel on the same node. Defaults to 29500 so existing workflows are unaffected. Documented in usage.rst and README.
Add patience: N to the train section of the config YAML (default 0 = disabled). Training stops automatically if val loss does not improve for N consecutive epochs after warmup completes. The counter is saved in resume.pth so --resume preserves the early stopping state across restarts. Docs and README updated
Add patience: N to the train section of the config YAML (default 0 = disabled). Training stops automatically if val loss does not improve for N consecutive epochs after warmup completes. Docs and README updated
Add optional z_stride config parameter (train.z_stride, default 1) to TomoDatasetTrain. When set to N, every Nth slice is loaded from the odd/even sub-reconstructions, reducing RAM usage and epoch time by ~N× while preserving full anatomical coverage. Useful for large CT datasets where adjacent slices are highly correlated.
When z_stride > 1, fewer batches are processed per epoch, so the warmup threshold is divided by z_stride to keep the number of warmup model updates proportional to the effective dataset size.
Add a dedicated section explaining z_stride — what it does, when to use it, recommended value for large CT datasets, and the automatic warmup scaling behavior.
…odel Load model weights from a registry directory or .pth file without restoring training state, allowing fast adaptation to new datasets. Document the new flag in the usage guide
denoise slice and denoise volume now accept --model-dir to load model checkpoints from a registry entry or any directory, enabling direct inference with registered models without copying files. Defaults to <directory_to_reconstructions>/TrainOutput/ when omitted, preserving existing behavior.
Integrates the full 3D U-Net from Laugros et al. (bioRxiv 2025) into the
denoise CLI as an explicit --mode flag. The 2.5D path is unchanged; 3D is
opt-in via --mode 3d on prepare, train, and volume commands.
New files:
- denoise/model3d.py Full 3D U-Net with skip connections (from SSD_3D)
- denoise/data3d.py 3D TIFF dataset classes: random cubic patch training
with 24-rotation geometric augmentation; sliding-window
3D inference with Hann overlap-add stitching
Modified files:
- denoise/__main__.py --mode 2.5d/3d flag on all relevant commands
- denoise/train.py Branches on mode: 3D uses unet3d + TomoDataset3DTrain
- denoise/volume.py Branches on mode: 3D uses unet3d + TomoDataset3DInfer
- denoise/slice.py Raises a clear error in 3D mode (use volume instead)
- README.md Mode comparison table, 3D examples throughout
- docs/source/about.rst Full explanation of both modalities and trade-offs
- docs/source/usage.rst --mode documented everywhere; 3D config section
- docs/source/api.rst model3d and data3d added to API toctree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to handle 3D tiff stack reconstructions