daidshow / CRF-Net

[CVPR 2023] CRF-Net: Enhancing Semantic Segmentation using Conditional Random Fields and CNNs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRF-Net

This repository contains the code and supplementary materials for our paper titled "CRF-Net: Enhancing Semantic Segmentation using Conditional Random Fields and CNNs", which has been accepted at CVPR 2023 (Conference on Computer Vision and Pattern Recognition).

Abstract

In this paper, we propose a novel deep learning approach for semantic segmentation, which aims to assign semantic labels to each pixel in an image. Our method combines the power of convolutional neural networks (CNNs) and conditional random fields (CRFs) to achieve highly accurate and detailed segmentation results. We demonstrate the effectiveness of our approach on various challenging datasets, showcasing its potential for real-world applications.

Installation

To install and set up the required dependencies, follow these steps:

  1. Clone this repository: git clone https://github.com/daidshow/CRF-Net.git
  2. Install the necessary packages: pip install -r requirements.txt
  3. Download the pretrained models: Download Link
  4. Unzip the pretrained models and place them in the models/ directory.

Usage

To train and evaluate the semantic segmentation model, follow these instructions:

  1. Prepare your dataset by following the guidelines in data_preparation.md.
  2. Run the training script: python train.py --dataset /path/to/dataset --epochs 50
  3. Evaluate the trained model: python evaluate.py --dataset /path/to/dataset --model /path/to/model.pth
  4. Generate segmentation predictions on new images: python predict.py --image /path/to/image.jpg --model /path/to/model.pth

For more detailed usage instructions and options, please refer to the documentation.

Datasets

Please download the datasets and follow the instructions in data_preparation.md to preprocess the data.

Pretrained Models

We provide pretrained models for our approach, which can be downloaded from the following links:

To use the pretrained models, simply load them using torch.load() in your own code.

Citation

If you find our work helpful in your research, please consider citing our paper:


About

[CVPR 2023] CRF-Net: Enhancing Semantic Segmentation using Conditional Random Fields and CNNs

License:MIT License