Code Monkey home page Code Monkey logo

dfn-tensorflow's Introduction

DFN-tensorflow

This repo is the tensorflow implementation of Discriminative Feature Network (DFN)

The original paper for DFN can be found at https://arxiv.org/abs/1804.09337.

model_figure

Condensed Abstract

Most existing methods of semantic segmentation still suffer from two aspects of challenges: intra-class inconsistency and inter-class indistinction. To tackle these two problems, we propose a Discriminative Feature Network (DFN), which contains two sub-networks: Smooth Network and Border Network. Specifically, to handle the intra-class inconsistency problem, we specially design a Smooth Network with Channel Attention Block and global average pooling to select the more discriminative features. Furthermore, we propose a Border Network to make the bilateral features of boundary distinguishable with deep semantic boundary supervision.

Getting Started Guide

Install Required Packages

This repo of code is written using Tensorflow. Please install all required packages before using this code.

pip install -r requirements.txt

Dataset Collection

The project can only solve problems of binary segmentation at present. So you can only collect a dataset with labels of binary segmentation and split into 3 directories labeled 'train', 'val' and 'test', each of which has 2 subfolders named 'main' and 'segmentation', while 'main' should store original images and 'segemntation' should store segmentation images. The name of a image must be same as that of its corresponding segmentation image.

Data Augmentation

python data_augment.py --dir data/train

Training

python main.py --batch_size 1

Testing

python main.py --batch_size 1 --is_training False

The results would be saved in the folder test-outputs.

Evaluation

python evaluation.py --gt_dir data/test/segmentation --pred_dir test-outputs --result_txt results.txt

The IOU results would be written in the results.txt.

Questions or Comments

Please direct any questions or comments to me; I am happy to help in any way I can. You can email me directly at [email protected].

dfn-tensorflow's People

Contributors

yuhuima avatar wuaodi 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.