Giter Site home page Giter Site logo

deeplabv3-raytune's Introduction

Semantic Segmentation with DeepLabV3 & Hyperparameter Tuning With Ray Tune

This repository contains a Jupyter notebook for semantic segmentation using the DeepLabV3 model with a ResNet-50 backbone. The notebook demonstrates the process of loading data, training the model, and making predictions. Additionally, Ray Tune is utilized for hyperparameter tuning to optimize the model's performance.

Prerequisites

  • Python 3.6 or later
  • PyTorch
  • torchvision
  • numpy
  • matplotlib
  • Pillow
  • ray[tune]

Setup

  1. Clone the repository:
git clone https://github.com/thivyanth/deeplabv3-raytune.git
cd deeplabv3-raytune
  1. Install the required packages:
pip install torch torchvision numpy matplotlib pillow ray[tune]

Data

  • Place your training images in the train-data/image directory.
  • Place your training labels in the train-data/label directory.
  • Place your unlabeled images in the unlabeled-data directory.
  • Place your test images in the test-data/image directory.

Training

The training process includes:

  1. Defining a custom dataset class (ImageDataset) for loading images and labels.
  2. Initializing and customizing a pre-trained DeepLabV3 model.
  3. Training the model using the defined dataset and saving the trained model.

To train the model, run the notebook cells related to training.

Hyperparameter Tuning with Ray Tune

Ray Tune is used to optimize hyperparameters for better model performance. The following steps are included for hyperparameter tuning:

  1. Define the Search Space: Specify the range of hyperparameters to explore.
  2. Configure the Scheduler and Search Algorithm: Use Ray Tune's built-in schedulers and search algorithms for efficient hyperparameter tuning.
  3. Run the Tuning: Execute the tuning process and log the results.

Evaluation

  1. Load the trained model weights.
  2. Create a test dataset and DataLoader.
  3. Perform inference and save predictions as .npy files.
  4. Zip the predictions for easy download.

Results

The training loss is plotted to visualize the training progress. The model predictions are saved and zipped for further analysis.

Acknowledgements

deeplabv3-raytune's People

Contributors

thivyanth avatar

Watchers

 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.