• Stars
    star
    301
  • Rank 138,451 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DilatedNet in Keras for image segmentation

Keras implementation of DilatedNet for semantic segmentation

A native Keras implementation of semantic segmentation according to Multi-Scale Context Aggregation by Dilated Convolutions (2016). Optionally uses the pretrained weights by the authors'.

The code has been tested on Tensorflow 1.3, Keras 1.2, and Python 3.6.

Using the pretrained model

Download and extract the pretrained model:

curl -L https://github.com/nicolov/segmentation_keras/releases/download/model/nicolov_segmentation_model.tar.gz | tar xvf -

Install dependencies and run:

pip install -r requirements.txt
# For GPU support
pip install tensorflow-gpu==1.3.0

python predict.py --weights_path conversion/converted/dilation8_pascal_voc.npy

The output image will be under images/cat_seg.png.

Converting the original Caffe model

Follow the instructions in the conversion folder to convert the weights to the TensorFlow format that can be used by Keras.

Training

Download the Augmented Pascal VOC dataset here:

curl -L http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz | tar -xvf -

This will create a benchmark_RELEASE directory in the root of the repo. Use the convert_masks.py script to convert the provided masks in .mat format to RGB pngs:

python convert_masks.py \
    --in-dir benchmark_RELEASE/dataset/cls \
    --out-dir benchmark_RELEASE/dataset/pngs

Start training:

python train.py --batch-size 2

Model checkpoints are saved under trained/, and can be used with the predict.py script for testing.

The training code is currently limited to the frontend module, and thus only outputs 16x16 segmentation maps. The augmentation pipeline does mirroring but not cropping or rotation.


Fisher Yu and Vladlen Koltun, Multi-Scale Context Aggregation by Dilated Convolutions, 2016

More Repositories

1

simple_slam_loop_closure

Simple loop closure for Visual SLAM
C++
142
star
2

gradient_boosting_tensorflow_xgboost

Benchmarking Gradient Boosting in TensorFlow and XGBoost
Python
137
star
3

ros-bazel

Build ROS code with Bazel
Starlark
69
star
4

vslam_evaluation

Evaluation of open-source visual SLAM packages
Python
56
star
5

robotics_for_developers

Code for my tutorial on Robotics for developers (SLAM project)
C++
43
star
6

occupancy_mapping_benchmarks

Benchmarks for occupancy mapping libraries in Robotics
C++
19
star
7

naive_bayes_tensorflow

Naive Bayes classifiers in TensorFlow
Python
18
star
8

cs61as-racket-homework

Berkeley CS61AS course homework in Racket
Racket
14
star
9

bazel-buildroot-toolchain

C++ toolchain for Bazel with modern C++ and static binaries
Python
9
star
10

bazel-benchmarks

C++ Benchmarks for the Bazel build system
Python
8
star
11

awesome-bazel

A curated list of resources for the Bazel build system
4
star
12

aria2_api

aria2 RPC client in Go
Go
3
star
13

ros_bazel

Python
3
star
14

robotics_benchmarks

Benchmark setup for some robotics algorithms
C++
3
star
15

bazel-cpp-starter

Starter project for using C++ in Bazel with good defaults.
Python
2
star
16

gazebo-headless-docker

Record videos of gazebo robot simulations
Dockerfile
2
star
17

aruco2_ros

ROS packages for ArUco fiducial markers, v2.x
C++
1
star
18

slides-template

Template for my presentations
Makefile
1
star
19

llvm-build-docker

Python
1
star
20

boost_bazel

Bazel rules for building boost
Python
1
star
21

tensorflow_cuda_benchmarks

TensorFlow CNN performance on clang vs nvcc
Shell
1
star
22

asai-dog-classifier

Python
1
star
23

slides-2019-06-15-ita-cpp-con

Makefile
1
star