This project aims to develop a system for detecting and segmenting brain tumors from MRI images. The system uses a ResNet model to classify MRI images as having a tumor or not, and a U-Net model to segment the tumor if it is detected. The frontend is implemented using React.
data
in the root directory of the project.data
folder.Run the data_preprocessing.py
script to preprocess the data.
Run the unet_model.py
script to build the U-Net model, then generate masks using the masks.py
script.
Run the train_resnet.py
script to train the ResNet model. This script trains the ResNet model on the preprocessed data and saves the trained model in the models/resnet
folder.
Run the train_unet.py
script to train the U-Net model. This script trains the U-Net model on the preprocessed data and saves the trained model in the models/unet
folder.
Run the inference.py
script to start the inference server. This script starts a Flask server that uses the trained ResNet and U-Net models to classify and segment brain tumors in MRI images.
To start the React frontend:
react_app
directory.npm start
.Ensure that all necessary dependencies are installed, and follow the steps in each section to complete the project setup.