Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

2d segmentation with inputs of .png files #13

Closed
mariamhrr opened this issue Dec 7, 2017 · 2 comments
Closed

2d segmentation with inputs of .png files #13

mariamhrr opened this issue Dec 7, 2017 · 2 comments

Comments

@mariamhrr
Copy link

Hello, do you have a conf.ini file example for 2d image segmentation ? Can I feed a network with png images and png labels ?

@wyli
Copy link
Member

wyli commented Dec 8, 2017

Hi @mariamhrr , at the moment we don't have any concrete example of 2d image segmentation and png format is not supported. Contributions are welcomed!

@wyli wyli closed this as completed Dec 8, 2017
@wyli wyli changed the title 2d segmentation 2d segmentation with inputs of .png files Dec 14, 2017
@imaluengo
Copy link
Contributor

imaluengo commented Mar 7, 2018

@mariamhrr @wyli Since the merge of image-loader NiftyNet now fully supports 2D images without having to convert them to NiftyFormat. There is no need to fake 3-dimensional spatial_window_size either (although it is perfectly ok if you do).

NiftyNet currently supports loading images from OpenCV, Scikit-Image and PIL/Pillow, assuming that you have the corresponding libraries installed. You can specify a loader in the config file, or it will automatically try to find one that can handle yout images.

Pretty much every 2D image format is supported (as long as it can be loaded by one of those libraries): .jpg, .png, .bpm, .tif ...

For more information check image_loader.py.

Example configuration file:

[images]
path_to_search = ~/data/test_image_segmentation/
filename_contains = bmp
spatial_window_size = (224, 224)
interp_order = 1
loader = opencv

[masks]
path_to_search = ~/data/test_image_segmentation/
filename_contains = _mask
spatial_window_size = (224, 224)
interp_order = 0
loader = skimage

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

No branches or pull requests

3 participants