GithubHelp home page GithubHelp logo

fcn-keras's Introduction

Keras - FCN

Part 1. Introduction

Fully Convolutional Networks is the first model to apply Convolutional Neural Network to semantic segmentation. It used common backbone like VGG, ResNet as encoder, and the decoders are upsampled layer by layer to original image size.

Models for this repository

Model name Dataset MIoU Pixel accuracy
FCN_8_Resnet50 VOC train dataset 0.4578 0.8993
VOC validation dataset 0.751 0.9528

Part 2. Quick Start

  1. Pull this repository.
git clone https://github.com/Runist/FCN-keras.git
  1. You need to install some dependency package.
cd FCN-keras
pip install -r requirements.txt
  1. Download the VOC dataset(VOC SegmetationClassAug if you need) .
  2. Getting FCN weights.
wget https://github.com/Runist/FCN-keras/releases/download/v0.2/fcn_weights.h5
  1. Run predict.py, you'll see the result of Fully Convolutional Networks.
python predict.py

Input image:

2007_000822.jpg

Output image(resize to 320 x 320):

fcn.jpg

Part 3. Train your own dataset

  1. You should rewrite your data pipeline, Dateset where in dataset.py is the base class, such as VOCdataset.py.
class VOCDataset(Dataset):
    def __init__(self, annotation_path, batch_size=4, target_size=(320, 320), num_classes=21, aug=False):
        super().__init__(target_size, num_classes)
        self.batch_size = batch_size
        self.target_size = target_size
        self.num_classes = num_classes
        self.annotation_path = annotation_path
        self.aug = aug
        self.read_voc_annotation()
        self.set_image_info()
  1. Start training.
python train.py
  1. Running evaluate.py to get mean iou and pixel accuracy.
python evaluate.py
--------------------------------------------------------------------------------
Total MIOU: 0.4578
Object MIOU: 0.4357
pixel acc: 0.8993
IOU:  [0.89910368 0.57704284 0.42540458 0.37512895 0.20381801 0.35467035
 0.77999658 0.63954053 0.6688376  0.22855226 0.36980252 0.25836402
 0.59642955 0.48159056 0.42752974 0.67481864 0.13373938 0.33782181
 0.30385944 0.47929764 0.39788109]

Part 4. Paper and other implement

fcn-keras's People

Contributors

runist avatar

Watchers

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