Code Monkey home page Code Monkey logo

segmentation-evaluation-after-border-thinning's Introduction

Segmentation Evaluation after border thinning

The following Jupyter Notebook allows you to evaluate the performance of your segmentation method after thinning the borders of the image segments to 1-pixel width.

Retrospective evaluation of the original ISBI-2012 segmentation challenge scoring system revealed that it was not sufficiently robust to variations in the widths of neurite borders. After evaluating all of these metrics and associated variants, it was found that specially normalized versions of the Rand error and Variation of Information best matched our qualitative judgements of segmentation quality:

  • Foreground-restricted Rand Scoring after border thinning
  • Foreground-restricted Information Theoretic Scoring after border thinning

Further details about the metrics can be found in the challenge publication.

Prerequisties

This code has been implemented in Jupyter. You need to install pyimagej which is a python wrapper for ImageJ.

To install pyimagej:

$ pip install pyimagej

To install scikit-image:

$ pip install scikit-image

You will also need to install Fiji. If you have already installed Fiji, then we are good!

Run

  1. This repository includes a folder Fiji.app which is imported to access the segmentation metric libraries of ImageJ. If you are interested in importing your installed version of Fiji, change the path in Line 2 of the code to the desired Fiji.app folder path on your local machine.
  2. The Groundtruth and Results (for example segmentation outputs of your network, method, etc.) in this repository are in .png format. If the formats of your data are different, change the formats in Line 3 accordingly.
  3. Change the paths of the macros in Line 4 to the current working directory where this notebook runs in.

segmentation-evaluation-after-border-thinning's People

Contributors

akhadangi avatar

Watchers

 avatar

segmentation-evaluation-after-border-thinning's Issues

Can not init Fiji.app

Thanks for your public code for evaluate vrand and vinfo metrics! But I have some trouble to use this code.

The environment I use is Ubuntu 20.04, python 3.8.8. And pyimagej and scikit-image are installed with pip. I still got the following errors:

Traceback (most recent call last):
File "vrand_info.py", line 19, in
ij = imagej.init('Fiji.app')
File "/home/srh/anaconda3/lib/python3.8/site-packages/imagej/init.py", line 165, in init
sj.start_jvm()
File "/home/srh/anaconda3/lib/python3.8/site-packages/scyjava/init.py", line 45, in start_jvm
_, workspace = jgo.resolve_dependencies(
File "/home/srh/anaconda3/lib/python3.8/site-packages/jgo/jgo.py", line 657, in resolve_dependencies
mvn = executable_path_or_raise("mvn")
File "/home/srh/anaconda3/lib/python3.8/site-packages/jgo/jgo.py", line 191, in executable_path_or_raise
raise ExecutableNotFound(tool, os.getenv("PATH"))
jgo.jgo.ExecutableNotFound: mvn not found on path /home/srh/anaconda3/bin:/home/srh/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/srh/anaconda3/bin

If you have any suggestions please reply in this issue. Thanks!

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.