Skip to content

verages/Keras_RCN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Part 2. Quick Start

  1. Pull this repository.
git clone https://github.com/verages/Keras_RCN.git
  1. You need to install some dependency package.
cd FCN-keras
pip installl -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

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

Part 4. Paper and other implement

About

base on tensorflow2.3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages