Skip to content

Conversation

@eigenvivek
Copy link
Owner

@eigenvivek eigenvivek commented Oct 21, 2025

No description provided.

* Pass a mask to render function

* Upgrade to latest DiffDRR for trilinear structure rendering

* Implement DiceLoss

* Hacky implementation of Dice

* Squashed commit of the following:

commit e4857bab04d68b02d36b74a4397f332a1ed94570
Author: eigenvivek <vivekg@mit.edu>
Date:   Thu Sep 4 21:55:33 2025 -0400

    Update augmentations

* Add maskpath to train command

* Fix typo

* Start creating different workflows for single- and multi-subject

* Finish implementing efficient single-subject rendering

* Fix typos in the docstring

* Add TotalSegmentator requirement

* Add keep threshold based on the mask
* Fix loading a single subject

* Shorten number of warmup iterations

* Fix optimizer calls with gradient accumulation
* Let the trainer accept a state_dict

* Update restart command for new Trainer class

* Bug fixes
* Simplify loading a simple subject

* Add a weight to the Dice loss term

* Remove debug print
* Optimize dataset size precomputing

* Allow trainer to be initialized from checkpoint

* Run precommit hooks

* Optionally return resampled GT X-ray

* Remove unecessary print statements

* Make reinitializing the optimizer optional

* Make preloading of all CTs togglable

* Remove unnecessary imports

* Refactor checkpoint logic

* Format with ruff

* Add file for false positives in typo checker

* Update function names

* Add help text for maskpath

* Change default norm layer to batchnorm

* Update default weight for Dice loss
* Switch from submitit to pure SLURM

* Revert to groupnorm

* Update to latest version of DiffDRR

* Update scripts

* Ignore wandb when sorting

* Update pre-commit config
* Add more augmentations

* Reduce default dice loss weight

* Fix initial time

* Refactor registration class

* Hide misc folder

* Remove eps when evaluating dGeo

* Add ANTs-style convergence setup

* Update the CLI

* Add voxel_shift argument

* Restructure registration command with a base command

* Add voxelshift argument to inheritance

* Simplify passing of voxel_shift
* Move commands into subfolder

* Add Command extension with support for parameter catagories

* Categorize the register command

* Handle defaults

* Add categories to commands

* Fit all help strings on a single line
* Fix kwargs for saving results

* Disable Gaussian smoothing in gNCC

* Upgrade to the latest version of DiffDRR

* Update patient-specific registration script to CLI
* Remove monai dependency

* Simplify requirements
* Add scale factor for backwards compatability

* Update environment

* Detach loss before stepping to silence warning

* Simplify custom DiceMetric implementation

* Improve documentation throughout script

* Update restart command to use wandb API
* Add warps to the Trainer class

* Add warp to the train command

* Update docstrings
* Shift sampled angles to [-180, 180]

* Change default orientation to AP

* Update docstrings

* Fix warp path for checkpoints
* Add PEFT to requirements

* Catch any error during the training loop

* Add optional LoRA finetuning
* If directory passed, get last model

* Save the final model after all iterations
eigenvivek added a commit that referenced this pull request Oct 21, 2025
* Add PEFT to requirements

* Catch any error during the training loop

* Add optional LoRA finetuning
@eigenvivek eigenvivek force-pushed the dev branch 2 times, most recently from c69a5aa to b27130f Compare October 21, 2025 16:48
* Upgrade to latest wandb version

* Fix affine matrix inverse

* Remove ultraplot for now
* Simplify ruff linter

* Switch from pre-commit to prek
* Fix the pbar for restarted runs

* Switch to torchio.SubjectsLoader

* Enforce sampling with replacement

* Update CLI

* Fix ruff errors
* Only log plot if there are images

* Normalize pred_imgs before computing ncc
* Add mNCC weight to loss function

* Reweight Dice loss term

* Update README.md
* Handle missing mask

* Add patch_size argument

* Move initialization functions to utility file

* Simplify patch sampling

* Handle no mask better

* Simplify patterns for volumes/masks
* Simplify augmentations

* Implement RandomCenterCrop with Kornia base aug class
* Compute mNCC on unaugmented images

* Remove an extra CPU->GPU transfer
* Remove lora finetuning options

* Sync environment
* Add a relative pose loss

* Downweight the relative pose loss

* Switch to internal dev DiffDRR branch

* Switch to github version of DiffDRR

* Rename variables

* Add weight for multiview consistency loss
* Update pacakges

* Sync hyperparameters

* Update README.md
* Add -h/-v shortcuts to groups

* Refactor animation command

* Remove deprecated finetune command

* Update docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants