Giter VIP home page Giter VIP logo

scribble_rgbd's Introduction

Code release for the TPAMI 2023 paper "Robust Perception and Precise Segmentation for Scribble-Supervised RGB-D Saliency Detection" by Long Li, Junwei Han, Nian Liu*, Salman Khan, Hisham Cholakkal, Rao Muhammad Anwer, and Fahad Shahbaz Khan.

avatar

Code Construction Explanation

This paper involves three main models: our FPN-based (Ours_FPN) and HRNet-based (Ours_HRNet) models trained on our NNDR dataset, as well as our FPN-based model (Ours_FPN_Xu) trained on Xu's dataset. These three models share a common framework but have different hyperparameters. Thus, we prepared three separate projects for each model in this repository to facilitate the use of our code.

Abstract

This paper proposes a scribble-based weakly supervised RGB-D salient object detection (SOD) method to relieve the annotation burden from pixel-wise annotations. In view of the ensuing performance drop, we summarize two natural deficiencies of the scribbles and try to alleviate them, which are the weak richness of the pixel training samples (WRPS) and the poor structural integrity of the salient objects (PSIO). WRPS hinders robust saliency perception learning, which can be alleviated via model design for robust feature learning and pseudo-label generation for training sample enrichment. Specifically, we first design a dynamic searching process module as a meta operation to conduct multi-scale and multi-modal feature fusion for the robust RGB-D SOD model construction. Then, a dual-branch consistency learning mechanism is proposed to generate enough pixel training samples for robust saliency perception learning. PSIO makes direct structural learning infeasible since scribbles can not provide integral structural supervision. Thus, we propose an edge-region structure-refinement loss to recover the structural information and make precise segmentation. We deploy all components and conduct ablation studies on two baselines to validate their effectiveness and generalizability. Experimental results on eight datasets show that our method outperforms other scribble-based SOD models and achieves comparable performance with fully supervised state-of-the-art methods.

Environment Configuration

  • Linux with Python ≥ 3.6
  • PyTorch ≥ 1.7 and torchvision that matches the PyTorch installation. Install them together at pytorch.org to make sure of this. Note, please check PyTorch version matches that is required by Detectron2.
  • Detectron2: follow Detectron2 installation instructions.
  • OpenCV is optional but needed by demo and visualization
  • pip install -r requirements.txt

Data Preparation

Download the dataset from Train/Train_Xu/Test and unzip them to '.data'. Then the structure of the './data' folder will show as following:

-- dataset
   |-- test
   |   |-- | Test
   |   |-- |-- | DUTLF-Depth
   |   |-- |-- |-- | depth
   |   |-- |-- |-- | GT
   |   |-- |-- |-- | RGB
   |   |-- |-- | LFSD
   |   |-- |-- |-- | depth
   |   |-- |-- |-- | GT
   |   |-- |-- |-- | RGB
   ...

   |-- | DUTLF-Depth.txt
   |-- | LFSD.txt
   ...

   |-- train
   |   |-- | Train/Train_Xu
   |   |-- |-- | depth
   |   |-- |-- | gt
   |   |-- |-- | mask
   |   |-- |-- | RGB
   |   |-- | train_list.txt/train_list_xu.txt

Training model

  1. Run python train.py of the corresponding model directory.
  2. The trained models with satisfactory performance will be saved in ./checkpoint

Testing model

  1. Download our trained model from checkpoint and put it into ./checkpoint folder.
  2. Run python test.py.
  3. The prediction images will be saved in ./predictions.

Evaluation

We use a Matlab code for evaluation. It's provided in './evaluation'. To run this code, you should edit the ./evaluation/toolbox/getSODatasetInfo.m file to set the test data directory. Then, you should edit the ./evaluation/evaluate.m file to set the prediction data directory in the variable salMapRootDir. Finally, you can conduct the evaluation by run cd ./evaluation; matlab -nodesktop -nosplash -r "evaluate('model_name');quit", where $model_name is the model name of your prediction maps.

Result

You can download the saliency maps of our models (Ours_FPN, Ours_HRNet, Ours_FPN_Xu) and other models (DENet-N, WSSA, SCWS) that were trained on our dataset from saliency maps.

alt_text alt_text

scribble_rgbd's People

Contributors

dragonlee258079 avatar

Stargazers

岑朝君 avatar Doris avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

haitian2du

scribble_rgbd's Issues

Hello

Hello, will you release your code of this paper

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.