Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add a new segmentation module #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

WIP: add a new segmentation module #1

wants to merge 5 commits into from

Conversation

poilvert
Copy link
Contributor

@npinto,

First draft for a new segmentation module. So far I needed the pad2d function from
sthor so I added it to the module, even though in the future we will remove that extra
code and depend on sthor.

I also made a proxy to the Adjusted Rand Index metric from sklearn that seems fast
enough. That metric though, is only usable on segmented images (on needs multiple
labels for each connected component).

I added a quick build script to build a small Cython module that I use in the warping error
code.

Finally here are the steps to make it (hopefully) work :

  1. build the Cython extension module by executing build_unique.sh
  2. run the demo code warping_error_demo.py

Cheese,

N.

diff = np.ma.array(np.abs(pred - out), mask=-simple)

# -- finding the largest deviation from the difference map
max_idx = np.unravel_index(diff.argmax(), diff.shape)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I learned something here, I missed unravel_index from numpy >= 1.6.0 !

@npinto
Copy link
Owner

npinto commented May 18, 2012

Looks awesome! I think we are missing the following

Anything else?

image_size = np.float(image_true.size)

# -- we transform the annotation image into an integer image
image_true = np.where(image_true > 0, 1, 0).astype(DTYPE_I)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image_true = (image_true > 0).astype(...)

@poilvert
Copy link
Contributor Author

@npinto

see if that fits you. I have some examples also in examples

@npinto
Copy link
Owner

npinto commented Jun 26, 2012

Up ?

# -- parameters

DIRNAME = './verenaImages'
CONNECTOMICS_DIRNAME = '/home/poilvert/Dropbox/0__Shared_with_Poilvert/' + \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded path again here...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

demo for ha (please discard)

python code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants