-
Notifications
You must be signed in to change notification settings - Fork 144
Maintenance update for FastSurfer (coming from FastSurferCC integration) #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… several files - use thread_executor instead of internal own executor object in segstats and brainvolstats - use DO_NOT_SAVE_FILE instead of empty string for defaults in segstats.py - update formatting - fix sphinx warnings (argparse extension) - Remove extra Default statement from device argument - Add Fornix Measure for brainvolstats.py - Add path_or_none arg_type in arg_types.py
…nt component of FastSurfer (also being used by FastSurferCC)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR performs maintenance updates for FastSurfer as part of the FastSurferCC integration effort, focusing on code organization, type annotations, and improved executor handling.
Key changes:
- Moved LTA utilities from
recon_surfandCerebNetto centralizedFastSurferCNN/utils/lta.pymodule - Standardized thread/process executor usage via
thread_executor()function insegstats.pyandbrainvolstats.py - Enhanced type annotations with
nibabelImage,ShapeType, andAffineMatrix4x4types throughout the codebase
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| recon_surf/lta.py | Removed - functionality moved to FastSurferCNN/utils |
| recon_surf/align_seg.py | Updated import to use new lta module location |
| doc/api/recon_surf.rst | Removed lta module from documentation |
| doc/api/FastSurferCNN.utils.rst | Added lta module to utils documentation |
| Tutorial/README.md | Fixed trailing backtick in comment |
| HypVINN/data_loader/dataset.py | Added .cpu() call before .numpy() for tensor conversion |
| FastSurferCNN/utils/run_tools.py | Fixed escaped apostrophe in docstring |
| FastSurferCNN/utils/parser_defaults.py | Removed "Default: auto" text duplication in help string |
| FastSurferCNN/utils/parallel.py | Added shutdown_executors to all exports |
| FastSurferCNN/utils/metrics.py | Fixed escaped apostrophe in docstring |
| FastSurferCNN/utils/lta.py | New module with write_lta and read_lta functions plus LTADict type |
| FastSurferCNN/utils/common.py | Improved line wrapping in error messages |
| FastSurferCNN/utils/brainvolstats.py | Updated to use thread_executor and new type annotations |
| FastSurferCNN/utils/arg_types.py | Added path_or_none function for argument parsing |
| FastSurferCNN/utils/init.py | Added comprehensive type definitions including nibabelImage and ShapeType |
| FastSurferCNN/segstats.py | Replaced ThreadPoolExecutor with thread_executor() and improved formatting |
| FastSurferCNN/run_prediction.py | Updated type annotations to use nibabelImage |
| FastSurferCNN/reduce_to_aseg.py | Updated type annotations with ShapeType and new nibabel types |
| FastSurferCNN/quick_qc.py | Updated to use nibabelImage type |
| FastSurferCNN/models/interpolation_layer.py | Improved code formatting and reduced line lengths |
| FastSurferCNN/data_loader/data_utils.py | Updated return type documentation and nibabelImage usage |
| FastSurferCNN/data_loader/conform.py | Added Union import and updated type annotations |
| CerebNet/utils/lr_scheduler.py | Converted docstrings from Args/Returns to Parameters/Returns format |
| CerebNet/inference.py | Updated to use nibabelImage type and improved docstrings |
| CerebNet/datasets/utils.py | Removed LTADict and read_lta (moved to FastSurferCNN), added type hints |
| CerebNet/datasets/load_data.py | Enhanced docstrings with proper parameter documentation |
| CerebNet/data_loader/loader.py | Added type hints and improved docstring format |
| CerebNet/data_loader/dataset.py | Updated to use nibabelImage type |
| CerebNet/data_loader/augmentation.py | Improved docstring formatting with Notes and References sections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
9bed68f to
19ba00d
Compare
This PR includes some of the changes that are part of FastSurferCC development, but in FastSurfer directories and also in content not directly part of FastSurferCC. Those changes are