Giter Site home page Giter Site logo

segmar's Introduction

Segment, Magnify and Reiterate Detecting Camouflaged Objects the Hard Way (CVPR2022)

image

Usage

The training and testing experiments are conducted using PyTorch with a single Tesla V100 GPU of 36 GB Memory.

1. Prerequisites

Note that SegMaR is only tested on Ubuntu OS with the following environments.

  • Creating a virtual environment in terminal: conda create -n SegMaR python=3.6.

  • Installing necessary packages: pip install -r requirements.txt.

  • Installing NVIDIA-Apex (Under CUDA-10.0 and Cudnn-7.4).

  • Installing MobulaOP for Sampler operation.

    # Clone the project
    git clone https://github.com/wkcn/MobulaOP
    
    # Enter the directory
    cd MobulaOP
    
    # Install MobulaOP
    pip install -v -e .
    
    

2. Downloading Training and Testing Datasets

The discriminative mask will be released soon. Or run ./OurSampler/DiscriminativeMask.py to generate your discriminative mask.

  • Downloading training dataset (COD10K-train) and move it into ./OurModule/datasets/train/.

  • Downloading testing dataset (COD10K-test + CAMO-test + CHAMELEON) and move it into ./OurModule/datasets/test/.

3. Training Configuration

  • After you download all the training datasets, just run ./OurModule/train.py to generate the model (you can replace discriminative mask with binary groundtruth if necessary).

  • For iterative training: generator.load_state_dict(torch.load('./OurModule/models/xxx.pth')).

4. Testing Configuration

  • After you download all the pre-trained model and testing datasets, just run ./OurModule/test.py to generate the prediction map. Your save directory is ./OurModule/results.py.

5. Sampler Operation

  • Make sure that you have installed MobulaOP in your virtual environment.

  • For sampler operation, just run ./OurSampler/Sampler_Distort.py.

  • For restoration operation, just run ./OurSampler/Sampler_Restort.py.

  • For the directory of original prediction or restoration prediction, please see our codes details.

6. Evaluation

  • One-key evaluation is written in MATLAB code, please follow this the instructions in main.m and just run it to generate the evaluation results.

segmar's People

Contributors

yaosl98 avatar

Stargazers

 avatar Yu Liu avatar

Watchers

Howard H. Tang avatar  avatar

Forkers

liuyudut

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.