Skip to content

borjarc/ML_RoadSegmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML_RoadSegmentation

For the EPFL course Machine Learning CS-433 a research project on semantic segmentation of aerial images. The goal is to be able to separate two classes, Background and Road for satellite images.

The structure of the image dataset and their groundtruth can be seen in the following image:

Alt text

Prerequisites

To be able to run the full project and train the different models the following packages need to be installed in the environement :

  • Pytorch - 1.10 or above
  • numpy - 1.21.5
  • imgaug - 0.4.0
  • scikit-image - 0.19.0
  • scikit-learn - 1.0.1
  • Pandas - 1.3.5

Structure of the Repository

.  
├── data                    # Dataset for training/ testing the model  
├── report                  # Report of the project  
├── src                     # Source files
│    └── helpers            # Helpers for the implementation of the code  
│    └── models             # Savestate of the best models  
└── README.md  

Dataset

To run the model or to train it, the data has to be structured in a specific way with respect to the root directory where the 'Run.py' file is situated.

.  
├── ...  
├── data  
│   ├── training  
│           └── groundtruth         # Groundtruth of the training images (400x400)  
│           └── images              # Training images (400x400 RGB)  
│   └── test                        # Test images (608x608 RGB)  
└── ...  

Run the code

In order to run the best model that was implemented the following command has to be sent in a terminal: i

python run.py

This has to be done in the 'src' folder with the data organised as mentioned above.

Results

With the optimal model, one of the Unet versions the following results are obtained:

Validation F1-score Validation accuracy Test F1-score Test Accuracy
Unet-Beta ----- 0.963 0.903 0.947

The prediction on an image is :

Alt text

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •