Skip to content

zshyang/brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-Training Graph Attention Convolution for Brain Structural Imaging Biomarker Analysis and Its Application to Alzheimer's Disease Pathology Identification

Pre-Training Graph Attention Convolution for Brain Structural Imaging Biomarker Analysis and Its Application to Alzheimer's Disease Pathology Identification

Zhangsihao Yang, Yi Su, Mohammad Farazi, Wenhui Zhu, Yanxi Chen, Eric M Reiman, Richard J Caselli, Kewei Chen, Yalin Wang, Natasha Lepore

Paper

Environment

We use docker and docker-compose for the reproducibility of our work.

Build the docker images and create a docker container.

cd docker
docker-compose build brain
docker-compose up -d brain

Data Processing

Download the folder from here. Unzip the data folder under workspace. You would see .m in the folder named MMS. There are totally 841 mesh files.

Download here and unzip. You should see the folder with name data.

1. Process the m files into obj file

There are 2 options:

(a) Download the proccessed files.

Download the folder from here. Unzip the data folder under workspace. You would get a folder named obj.

(b) Process the files locally.

Enter the docker image and process the files. $ means the command running on local machine. # means the command running in the docker container.

$ docker exec -it brain bash
# cd /workspace/data_processing
# python generate_obj.py
---- run the following line if you want to debug in VSCode ----
# python -m debugpy --listen 0.0.0.0:5566 --wait-for-client generate_obj.py

There is a problem with the mesh. the mesh is not watertight. Thus we need the next step.

Overall Zoom in

2. Make the files watertight

You could download the files from here or run the follow commmand.

# python manifold.py

3. Simplify the watertight meshes

You could download the files from here or run the follow commmand.

# python simplify.py

4. Process obj files into npy file as graph

You could download the files from here or run the follow commmand. Notice that simplified meshes and npy files are in the same folder.

# python generate_npy.py

5. Sample point clouds from obj files

You could download the files from here or run the follow commmand.

# python sample_point.py

Training the network

Pre-train

# ./workspace/train/exps/train.sh

The ckpt will be generated in folder runtime

For test with SVM and fine-tuning, you could need pre-trained ckpt file. We have provided one here and you could put the file in the folder runtime.

Test with SVM

Modify the path of the ckpt in file single_gpu_test.py to change the loaded model.

# ./workspace/train/exps/test.sh

Fine-tuning

Fine-tune the network for compare group 1.

# ../workspace/finetuning/train_0.sh

Fine-tune for group 2 and 3. Change the device name in the script if needed.

# ./workspace/finetuning/train_1_GPU_0.sh
# ./workspace/finetuning/train_1_GPU_1.sh
# ./workspace/finetuning/train_2_GPU_2.sh
# ./workspace/finetuning/train_2_GPU_3.sh

Issues

simplifiy and manifold software

Refre to this repo. You might need to replace file manifold and simplify in folder workspace/data_processing/manifold with your own compiled files.

change the group of generate data files\

make the generated folder belong to your group

$ sudo chown -R {id_user}:{id_user} obj

Figure 4 in paper

To generate the figure 4 in paper, run the following command and load the meshes in MeshLab.

# cd workspace/data_processing
# python simplify_example.py

Citation

Please consider cite the following paper.

@inproceedings{yang2021deep,
  title={Deep Learning on SDF for Classifying Brain Biomarkers},
  author={Yang, Zhangsihao and Wu, Jianfeng and Thompson, Paul M and Wang, Yalin},
  booktitle={2021 43rd Annual International Conference of the IEEE Engineering in Medicine \& Biology Society (EMBC)},
  pages={1051--1054},
  year={2021},
  organization={IEEE}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published