FoodSeg_mask2former

FoodSeg103: Fine-Tuning Mask2Former for Semantic Segmentation πŸ”πŸ•

Project Overview

This project focuses on fine-tuning the Mask2Former model for semantic segmentation specifically on the FoodSeg103 dataset. The goal was to enhance the model’s performance in identifying and segmenting various food items from images. The project also includes deploying the fine-tuned model and creating a user-friendly GUI with Gradio for interactive inference.

πŸŽ₯ Demo

See the Gradio interface in action with the GIF below. 🍴✨

πŸš€ Getting Started

Installation

  1. Clone the Repository:
    git clone https://github.com/NimaVahdat/FoodSeg_mask2former.git
    cd FoodSeg_mask2former
    
  2. Install Dependencies:
    pip install -r requirements.txt
    

Configuration

Configure the training parameters in the config.yaml file:

Training

To start the training process, execute:

python  -m scripts.run_training

This command will initialize training based on the parameters specified in config.yaml and save the trained model checkpoints to the specified save_path.

Model Deployment with Gradio

Deploy the model using Gradio to create an interactive web interface that allows users to upload images and view segmentation results in real time.

  1. Run the Gradio App:
    python -m gradio_app.app
    
  2. Access the Interface: Open your browser and go to the URL provided in the terminal to start interacting with the model.

Model and Dataset

Mask2Former Model

FoodSeg103 Dataset

Results

πŸ“š LICENSE

πŸ“ž Contact

For questions, feedback, or contributions, please open an issue or reach out to me.