Skip to content

wangximiao/AGDN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AGDN

Official selected implementation for:

**Anatomy-Guided Dual-Domain State Space Network **

AGDN is an anatomy-guided deep learning framework for preoperative prediction of deep myometrial invasion (DMI) in endometrial cancer from multi-view, multi-sequence pelvic MRI. The framework models radiological reasoning at three levels: direction-aware slice and inter-slice representation learning, cross-view feature refinement, and bidirectional cross-sequence guidance between T1CE and T2WI.

This repository currently contains selected core implementation files for the main model components described in the manuscript and supplementary appendix. Patient data, trained checkpoints, local institutional paths, and private data-governance assets are not included.

Framework

AGDN consists of three core modules:

Module Description Main files
DDRL Direction-aware dual-domain representation learning. It uses a dual-stream Mamba/state-space architecture to model intra-slice directional patterns and inter-slice anatomical continuity from lesion-centered ROI slices. DDRL/DS_mamba_V3.py, DDRL/train.py, DDRL/extract_features_V3.py
CVA Cross-view attention. It uses sagittal features as the anchor query and axial/coronal features as complementary keys and values for multi-view MRI feature refinement. CVA/models/co_view_att.py, CVA/train.py
BCSG Bidirectional cross-sequence guidance. It performs reciprocal feature refinement between T1CE and T2WI feature tokens before downstream prediction. BCSG/models/sequence_fusion/sequence_network_row.py, BCSG/models/sequence_fusion/sequence_engine.py, BCSG/main.py

Repository Structure

AGDN/
|-- DDRL/
|   |-- DS_mamba_V3.py
|   |-- extract_features_V3.py
|   `-- train.py
|-- CVA/
|   |-- models/
|   |   `-- co_view_att.py
|   `-- train.py
|-- BCSG/
|   |-- models/
|   |   `-- sequence_fusion/
|   |       |-- sequence_engine.py
|   |       `-- sequence_network_row.py
|   `-- main.py
`-- README.md

Environment

The experiments in the manuscript were conducted with:

  • Python 3.10.19
  • PyTorch 2.1.1 with CUDA 11.8
  • CUDA-enabled GPU hardware, such as NVIDIA RTX A6000

Main Python dependencies used by the released scripts include:

torch
torchvision
torchmetrics
timm
einops
fvcore
numpy
pandas
scipy
scikit-learn
tqdm
tensorboard
wandb

The DDRL implementation uses selective-scan/Mamba-style CUDA operators when available. Please install the corresponding state-space model kernels required by your local environment before training DDRL.

Data Preparation

The private multicenter MRI dataset cannot be released because of patient privacy regulations and institutional data governance policies. To run the code on your own data, prepare de-identified lesion-centered ROI inputs and feature files following the manuscript protocol:

  1. Export and de-identify DICOM MRI data.
  2. Generate lesion-centered ROIs for sagittal, axial, and coronal views.
  3. Resize ROI slices to 256 x 256 pixels.
  4. Apply image-level Z-score normalization.
  5. Train DDRL models for the required MRI views/sequences.
  6. Extract 1440-dimensional patient-level features.
  7. Use CVA for cross-view feature refinement.
  8. Use BCSG for T1CE/T2WI cross-sequence fusion.

Usage

Before running, update all local paths, dataset names, and hyperparameters in the imported configuration/data-loading files.

DDRL

cd DDRL
python train.py
python extract_features_V3.py

CVA

cd CVA
python train.py

BCSG

cd BCSG
python main.py

Notes on This Release

This is a selected core-code release. Some local project utilities referenced by the scripts are not included in the requested file list and should be adapted or added for a fully runnable package:

  • DDRL references utils.data_loading, utils.path_hyperparameter, and utils.utils.
  • CVA references data.dataset and config.
  • BCSG references datasets.clincial_dataset, utils.*, models.sequence_fusion.util, and models.sequence_fusion.CBAM.

The released files are intended to document and reproduce the core model design. Users should replace private paths and data readers with their own dataset interface before training.

Citation

If you use this code in your research, please cite:

Anatomy-Guided Dual-Domain State Space Network for Multi-View Multi-Sequence MRI-Based Prediction of Deep Myometrial Invasion: A Multicenter Study.

Citation metadata will be updated after publication.

Usage Terms

This code is provided for non-commercial research use only.

About

The source code for the proposed model

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages