sk1712 / gcn_metric_learning

Metric Learning with Graph Convolutional Neural Networks
MIT License
203 stars 71 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/vol/dhcp-hcp-data/ABIDE/ABIDE_pcp/cpac/filt_noglobal/50003/50003_ho_correlation.mat' #6

Closed ptq204 closed 3 years ago

ptq204 commented 4 years ago

Hi, I have downloaded the dataset from https://nilearn.github.io/modules/generated/nilearn.datasets.fetch_abide_pcp.html

However, the dataset did not have the "subject_IDs.txt" file so I had to create one based on "Phenotypic_V1_0b_preprocessed1.csv" file. The code can run until it required to have the .mat file, i.e "50003_ho_correlation.mat" corresponds to subjectID 50003.

@sk1712 How can I have a .mat file. Can it be generated from the dataset which contains all .nii files? Thanks!

sk1712 commented 4 years ago

This corresponds to the correlation matrix based on the Harvard-Oxford parcellation for this particular subject. https://nilearn.github.io/modules/generated/nilearn.datasets.fetch_abide_pcp.html allows you to obtain certain parcellations for all subjects (as part of the derivatives). Then, I used functionality from https://nilearn.github.io/connectivity/functional_connectomes.html to build the matrices.

ptq204 commented 4 years ago

Thanks for your replies, I have run your code successfully. However, I wonder that if I apply your code in another problem like detecting similarity between two samples, at the classification step, can I just need to input two graphs generated from two samples? Moreover, do two graphs have the same structure of edges (the way nodes connect to each other)? As far as I know, two graphs have the same number of nodes (vertices).

ptq204 commented 3 years ago

For those who struggle with this problem, you should prefer the code at https://github.com/parisots/population-gcn to generate the dataset, and then bring it to the gcn-metric-learning code to run the model. The file fetch_data.py contains commands to download data and store the data in an appreciating directory structure. Note that you will need to modify some paths of the dataset directory to be suitable for your code.

ljwdsy commented 7 months ago

Hello,I am sorry to bother you here. I'm having trouble with the implementation, I can't find the files 'subject_IDs.txt' and 'full_IDs.txt' mentioned in the code 'abide_utils.py'.I wish you will be able to give me help and guidance. I would be very grateful indeed for any help you could give me.