# how to label MRI images for classification task?

**URL:** <https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203>\
**Category:** Beginner Questions\
**Tags:** itk, simpleitk, python\
**Created:** [September 14, 2023, 10:06am UTC](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203 "2023-09-14T10:06:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uljibuh](https://discourse.itk.org/user_avatar/discourse.itk.org/uljibuh/32/3057_2.png) [@Uljibuh](https://discourse.itk.org/u/Uljibuh)\
**Post date:** [September 14, 2023, 10:06am UTC](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203/1 "2023-09-14T10:06:00Z")

</div>

Hi all,

I am working on a prostate cancer classification task using  
both ADC and DWI images for each patient in nii format.  
the task is to tell whether the patient has the cancer or not, ie, positive or negative.  
and I know the disease status of each patients, so i need to label the images  
I am wondering what kind of label do i need to train the model?  
do i need mask image for the task?  
how do i label the two images(ADC and DWI) in python?  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [September 14, 2023, 1:59pm UTC](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203/2 "2023-09-14T13:59:04Z")

</div>

Hello @Uljibuh,

Your images are already labeled, the positive/negative status for each image is known, so you do not need to do anything to the images (other than combining the ADC and DWI into a single input).

Before you start implementing anything you need to understand the basic terminology of machine learning and computer vision/image analysis. Master the basics before starting to address a problem. Any introductory book or course on machine learning will get you there - many are freely available online.

---

<div class="post-metadata">

**Author:** ![Uljibuh](https://discourse.itk.org/user_avatar/discourse.itk.org/uljibuh/32/3057_2.png) [@Uljibuh](https://discourse.itk.org/u/Uljibuh)\
**Post date:** [September 14, 2023, 2:10pm UTC](https://discourse.itk.org/t/how-to-label-mri-images-for-classification-task/6203/3 "2023-09-14T14:10:57Z")

</div>

HI,  
thank you for your response, i know the disease status of th patients, bacause i got the two seperate folder, one is positive another one is negative, but the actual images are not labeled, I have checked the matadata, and clinical report, etc. in order to train a model for classification, ! need to assign the label for each image, 0 or 1 in this case.
