Giter Site home page Giter Site logo

ezermoysis1 / mean-teacher-ssl Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 47.04 MB

Semi supervised learning for semantic image segmentation

Home Page: https://drive.google.com/file/d/1zX3HGt0AiCVF5MfM4lKS9Ag_boOhq-_c/view

Python 100.00%
deep-neural-networks image-segmentation mean-teacher semi-supervised-learning

mean-teacher-ssl's Introduction

Mean Teacher: Semi-Supervised Learning

Project Description

UCL Module Project: Applied Deep Learning (COMP0197)

Date: April 2023

Examining the performance of the semi-supervised learning algorithm, Mean Teacher, for image semantic segmentation task on the Oxford Pet III dataset, through two experiments.

  • Experiment 1: A model was trained on 25% labeled and 75% unlabelled data using Mean Teacher, with an aim to study (i) how its performance improves with more (epochs) training and (ii) how its performance compares to supervised only training models.

Project Logo

  • Experiment 2: Two additional models were trained on 5%/95% and 10%/90% labeled/unlabelled splits, using Mean Teacher, with the objective to understand how reducing the number of labeled data in Mean Teacher models, affects their performance. Comparative performance of all the models trained is shown below: Project Logo

Setup

Setting up a virtual environment

First, clone the repository:

git clone https://github.com/ezermoysis1/mean-teacher-ssl

Change your directory to where you cloned the files:

cd mean-teacher-ssl

Create a virtual environment with Python 3.6 or above:

virtualenv venv --python=python3.7 (or python3.7 -m venv venv or conda create -n multiqa python=3.7)

Activate the virtual environment. You will need to activate the venv environment in each terminal in which you want to use the project.

source venv/bin/activate (or source venv/bin/activate.csh or conda activate multiqa)

Install the required dependencies:

pip install -r requirements.txt

Use the code

Data

The dataset used in this paper is The Oxford Pet III dataset. It contains a collection of 7,365 images of cats and dogs and their labels. There are image-level labels, specifying what animal (i.e. dog or cat) and breed is shown, and pixel-level labels, providing a semantic segmentation, referred to as "ground truth mask", of the input images. Click here to download the data.

Train

To train a model with with L = 25% labelled and (1-L) = 75% unlabelled data (referred to as 'M-25' in the report) use the following script. This also trains two benchmark supervised models only, with L% labelled data (referred to as 'M25L' or 'M-25L' in the report, and 100% data respectively ('MU' or M-100').

python main_pt.py 0.25

To train models with different labelled/unlabelled data splits, change the float after the .py. For example to train a L=35% and the two benchmark models, use the following

python main_pt.py 0.35

Evaluation

To evaluate all of the trained models run the following:

python main_pt.py evaluate

Authors

Documentation

Please read the full report of the project here

mean-teacher-ssl's People

Contributors

ezermoysis1 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.