Giter VIP home page Giter VIP logo

amat's Introduction

amat

AMAT: Medial Axis Transform for Natural Images
Stavros Tsogkas, Sven Dickinson
In International Conference on Computer Vision (ICCV), 2017.

License

This code is released under the MIT License (refer to the LICENSE file for details).

Contents

  1. Requirements: software
  2. Requirements: hardware
  3. Directory structure
  4. Setup
  5. Using the code
  6. Citation

Requirements: software

  • Linux OS (we used Ubuntu 16.04).
  • A recent version of MATLAB. All our experiments were performed using MATLAB R2016a.
  • spb-mil for medial point detection code.
  • matlab-utils for various MATLAB utility functions.
  • inpaint_nans for 2D image inpainting.
  • L0Smoothing code for edge-preserving image smoothing.

Requirements: hardware

Our (MATLAB-only) code runs at ~30-40sec for a 256x256 image on a modern desktop CPU. We are working on speeding it up.

Directory structure

Generally:

  • All data should go under data/.
  • All external code should go under external/.
  • amat results, models etc should go under output/.
  • Project-specific results and plots are saved in the respective directories of that project. E.g.:
    • spb-mil trained models and medial point detection results are saved in external/spb-mil/output/models/.
    • medial points detection plots are saved in external/spb-mil/output/plots/.

Feel free to change the paths in setPaths.m and use symbolic links to change directory hierarchy to your preference.

Setup

  1. Clone the amat repository: git clone [email protected]:tsogkas/amat.git

The code comes with a startup.m file that automatically sets up the directory structure and downloads the required packages and data. Running startup or starting MATLAB inside the amat folder should be enough. However, If you want to execute the individual steps included in startup.m yourself, do the following:

  1. Create folders output/, external/, data/, output/models/.
  2. Clone my spb-mil repo: git clone [email protected]:tsogkas/spb-mil.git
  3. Clone my matlab-utils repo: git clone [email protected]:tsogkas/matlab-utils.git
  4. Download the L0Smoothing code and extract it in external/.
  5. Download the inpaint_nans code and extract it in external/.
  6. Download the BSDS500 dataset and benchmark code and extract it in data/.

NOTE: in some cases MATLAB websave function might cause MATLAB to crash. If you face any such problems, please download and extract the BSDS dataset manually.

Using the code

  • Download the BMAX500 annotations.

BMAX500 is a MATLAB struct that contains annotations for the training, and validation subsets. Annotations for the test subset will be released in the future.

  • Training the spb-MIL:

You can train the spb-MIL medial point detector on BSDS500, with the default options, with the following command:

trainMIL('trainSet',BMAX500.train);
  • Medial point detection experiments:

You can evaluate the performance of the AMAT in medial point detection using the command:

model = testSPB('amat','testSet',BMAX500.val);

Performance statistics are contained in the model.BMAX500.val.stats struct.

  • Image reconstruction experiments:

You can evaluate the performance of the AMAT and baseline methods, using the command:

models = testReconstruction({'spbModelPath','gtseg','gtskel','amat'},'testSet',BMAX500.val);

Performance statistics are contained in the models{i}.BSDS500.val.stats struct.

Citation

If you find our code or annotations useful for your research, please cite our paper AMAT: Medial Axis Transform for Natural Images:

@article{tsogkas2017amat,
	Author = {Tsogkas, Stavros and Dickinson, Sven},
	Title = {AMAT: Medial Axis Transform for Natural Images},
	Journal = {ICCV},
	Year = {2017}
}

amat's People

Contributors

ripper346 avatar tsogkas avatar

Watchers

 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.