Deep-MI / head-motion-from-MRI

Code for the paper "Estimating Head Motion from MRI", which predicts motion scores directly from MRI images.
Apache License 2.0
2 stars 2 forks source link

How should I organize training data? #1

Closed Pull-Qutter closed 1 year ago

Pull-Qutter commented 1 year ago

Hello

I am planning to apply your method to our own data. May I ask how your training set is organized (more specifically, how are moving images and reference images organized? How are labels stored? What content is stored in. csv in the code?)

Best!

ClePol commented 1 year ago

Hello,

in the first lines of the "train.py" script some paths are resolved to find a two files:

  1. A text/csv file containing only paths to MRI images with each path being in a new line. This is the input data to the network. Each image is expected to be in a unique folder. (e.g. /my/path/e25122/T1.nii.gz)
  2. A csv file matching the image folders to numbers (which represent the motion levels in our case - e.g. e25122, 1.53)

From these files the code will automatically generate a .hdf5 dataset file which is used to load images for training afterwards.

With that you will have the training data and ground truth labels. Note that we do not have moving or reference images. Rather our method works by using ground truth motion levels, measured during the image acquisition, to train the network.

Hope this helps. Feel free to ask if you have any more questions.

Best Clemens

ClePol commented 1 year ago

Closed due to inactivity. For future reference I have added some comments on re-training in the README

Feel free to re-open if you have further questions.