Skip to content

neurohn/image-segmentation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A python implementation of the algorithm described in the paper Efficient Graph-Based Image Segmentation.

Pre-requisites

  • Python Imaging Library
  • numpy
  • scipy
  • random

Correct Usage

Correct usage: $ python main.py sigma neighborhood K min_comp_size input_file output_file

Implementation Details

  • test.sh : shell script provided as an example of sample usage of library
  • main.py : core implementation
  • graph.py : utilities for building graphs and segmenting forests (Forest here is new class defination for a hierarchical graph)
  • smooth_filter.py: utilities for some image filtering operations

Important Simplification from Original Paper

The internal variation of superpixels is not measured exactly as the maximum edge weight of the minimum spanning tree. Instead, it is approximated as the weight of edge merged last within it. This also happens to be the largest edge weight absorbed by the superpixel.

About

A graph-based image segmentation algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.2%
  • Shell 2.8%