spreka / biomagdsb

This repository contains the codes to run the nuclei segmentation pipeline of the BIOMAG group inspired by Kaggle's Data Science Bowl 2018 competition
52 stars 15 forks source link

Error for single channel grayscale images #3

Closed PetterRanefall closed 5 years ago

PetterRanefall commented 5 years ago

If I run start_prediction_full.bat on a single channel grayscale image I get an error: File "C:\Code\Python3\biomagdsb\UNet\utils.py", line 264, in getitem image = io.imread(image_path)[:, :, :3] IndexError: too many indices for Array

and later: Error using imread>get_full_filename (line 481) File "C:\Code\Python3\biomagdsb\kaggle_workflow\outputs\ensemble\output\BE_300_01_rescaled.png" does not exist.

Error in imread (line 344) filename = get_full_filename(fid, errmsg, filename);

Error in postProcCodeFINAL (line 104) probMap = (imread([probFolder filesep imageList(i).name(1:end-5) '.png']));

Error in postProcCodeRunnerFINAL (line 94) postProcCodeFINAL(inMainFolder,outMainFolder,...

(It works if I convert the image to RGB before starting)

spreka commented 5 years ago

@PetterRanefall Please take a look at start_image_preprocessing.bat, it converts your images to 8-bit RGB.

PetterRanefall commented 5 years ago

OK, thanks!

spreka commented 5 years ago

@PetterRanefall I am closing this now as the suggested script solves the error. Please feel free to reopen it if the issue still occurs.