I am new to CNN and trying to train the images and then test them and then classify the type of image. I am using python and PYQT designer for GUI. My task is to perform classification on three types of Brain Tumor MRI images. All the images are assigned labels.
My GUI is stated as follows:
Load Data (complete dataset) for training by a button named as “Load”.
Automatically split the dataset into Testing and Training by a button named as “split”.
Train the dataset by a button named as “Training”.
Test the image by a button “Testing”.
The result displays the image with its label.
Any help in this regard will be appreciated. Thank you.
You could either use torch.utils.data.random_split and provide the lengths you would like to use for the random splitting or alternatively, if you want to use a stratified split, you could use sklearn's train_test_split as seen here.