How to organize miccai 2008 coronary artery tracking challenge dataset?

lavender99: <p>i am working on miccai 2008 coronary artery tracking challenge dataset and I want to load it into pytorch then preprocessing it, but it is so complicated,<br>
it is diveded as flowing :<br>
training / dataset00 (from 00 to 08 ) / Dicom - seg (1 to 17 )<br>
testing is the same<br>
how to know the gorunthruth and validation for this data</p>

ptrblck: <p>How are the ground truth labels stored?<br>
Do you have and file storing all labels or is the label encoded in the file names?</p>
<p>Most likely the best approach would be to create a custom <code>Dataset</code>, and load as well as preprocess your data in the <code>__getitem__</code> method.<br>
Have a look at the <a href="https://pytorch.org/tutorials/beginner/data_loading_tutorial.html" rel="nofollow noopener">Data loading tutorial</a> and let me know if you need some help implementing it.</p>

lavender99: <p>the grountruth is stored as numbers in text doc</p>

ptrblck: <p>So you have one text document containing all ground truth labels?<br>
I assume they are sorted somehow, i.e. the first number corresponds to the “first” input data?</p>

lavender99: <p><img src="https://discuss.pytorch.org/uploads/default/original/2X/5/511b8eaa7698e53f829c54953369271ca97ec106.png" alt="12" data-base62-sha1="bzvIpygi7msJJtO5Z4awB8Nmz3w" width="581" height="445"></p>
<p>they are shown in the pic and there is ( 1 to 3 ) text doc in each ( seg_ ) file</p>

ptrblck: <p>Each of these text files in the <code>seg_XX</code> folders contains some target information for this segment, is that correct?<br>
The <code>seg_XX</code> folders contain additionally some DICOM data or just the target?<br>
Do you have any constraints regarding the <code>datasetXX</code> folders? E.g. would you like to handle them in a special way to avoid data leakage or can you just use all datasets to train your model?</p>

lavender99: <p>the seg_xx folders contain just the target  ( another refrence CTA ) .<br>
all the datasets will be used  to train the model</p>

ptrblck: <p>I can’t find much information on this particular dataset, so I would need some more input from you.<br>
The <code>seg_XX</code> targets seem to have some kind of order. Are they just split to different slices in your DICOM data or do they have any temporal relationship?<br>
What would be the basic workflow?<br>
We would load the data stored in the <code>DICOM</code> folder, and load <strong>all</strong> <code>seg_XX</code> targets to create somehow a “global” target for this data?</p>

lavender99: <p>acually  i do not understand this dataset at all , but i was thinking of using reference.CAT  file<br>
in dataset_xx folder as grountruth for DICOM files in each dataset_xx folder</p>
<p>this is what is written in their website<br>
" For each dataset, each directory  <em>segXX</em>  contains a file  <em>reference_CTA.txt</em>  that contains the CTA stenoses detection and quantification reference standard. The files contain the world position of the x-, y-, and z-coordinate of each path point of the segment centerline"</p>

ptrblck: <p>So you have a <code>reference_CTA.txt</code> in the <code>datasetXX</code> folder and additionally in each <code>seg_XX</code> folder?<br>
We could load all of them or just the one in the top folder to create the ground truth.<br>
Unfortunately, I don’t know, how this data should be handled.</p>

lavender99: <p>yes there is <code>reference_CTA.txt</code>  in the  <code>datasetXX</code>  folder and additionally in each  <code>seg_XX</code> folder.<br>
if we just load just the one in the top of the folder , should i combine them all in on file to make one ground truth?</p>

ptrblck: <p>This might work, but as I said I’m completely unfamiliar with this dataset.<br>
Let me know, if you get stuck implementing some approach.</p>

lavender99: <p>thank you <a class="mention" href="/u/ptrblck">@ptrblck</a> , i am trying to implement your code</p>
<pre><code class="lang-auto">class MyDataset(Dataset):
   def __init__(self, image_paths, target_paths, train=True):
        self.image_paths = 'content/drive/My Drive/data/training/images'
        self.target_paths = 'content/drive/My Drive/data/training/1st_manual'

    def transform(self, image, mask):
        # Resize
        resize = transforms.Resize(size=(520, 520))
        image = resize(image)
        mask = resize(mask)

        # Random crop
        i, j, h, w = transforms.RandomCrop.get_params(
            image, output_size=(512, 512))
        image = TF.crop(image, i, j, h, w)
        mask = TF.crop(mask, i, j, h, w)

        # Random horizontal flipping
        if random.random() &gt; 0.5:
            image = TF.hflip(image)
            mask = TF.hflip(mask)

        # Random vertical flipping
        if random.random() &gt; 0.5:
            image = TF.vflip(image)
            mask = TF.vflip(mask)

        # Transform to tensor
        image = TF.to_tensor(image)
        mask = TF.to_tensor(mask)
        return image, mask

    def __getitem__(self, index):
        image = Image.open(self.image_paths[index])
        mask = Image.open(self.target_paths[index])
        x, y = self.transform(image, mask)
        return x, y

    def __len__(self):
        return len(self.image_paths)
</code></pre>
<p>but i am having this errro</p>
<pre><code class="lang-auto">def transform(self, image, mask):
                                    ^
IndentationError: unindent does not match any outer indentation level
</code></pre>
<p>also i want to display some of the images (DICOM format)  to see how the prep works , how i can do that ?</p>

ptrblck: <p>It looks like <code>__init__</code> and the other functions do not have the same indentation. Could you try to add a whitespace to <code>__init__</code> or remove one from the others?</p>
<p>If you can successfully load the DICOM images using <code>PIL</code> you could also display it using <code>image.show()</code>.<br>
However, if that’s not working, you could try other packages like <a href="https://pydicom.github.io/pydicom/stable/getting_started.html" rel="nofollow noopener">pydicom</a>.</p>

optimist1036: <p>Hi,i need this dataset recently,but i can’t find any download links related to this dataset.Could you tell me,pls?</p>

wang_erxiao: <p>Have you downloaded the data set?</p>

tianmaliuxing: <p>I need the CTA08 dataset, but it can not download anymore. Can you share it with me? Thank you!</p>

Piotr_Tomasinski: <p>Hi there, I am working on a quite interesting medical project in which one element of many is to perform centerline extraction. Do you still have the CAT08 dataset? It is sort of a benchmark set in many articles in this topic area. It would be more than useful to have this set to compare the results with the publications related to the MICCAI 2008 Coronary Artery Tracking Challenge challenge. The authors don’t respond, probably due to many such requests about this old project.<br>
Please email me if possible <a href="mailto:p.tomasinski@gmail.com">p.tomasinski@gmail.com</a></p>

lishang1019: <p>I need the CTA08 dataset, but it can not download anymore. Can you share it with me? Thank you!my email is <a href="mailto:lishang0103@126.com">lishang0103@126.com</a></p>

zhenlong_ma: <p>I need the CTA08 dataset, but it can not download anymore. Can you share it with me? Thank you!my email is <a href="mailto:my2002724@163.com">my2002724@163.com</a></p>