Giter Site home page Giter Site logo

Comments (14)

MatthewBM avatar MatthewBM commented on July 30, 2024

Hi @camcondylis,

You're image stack is 8-bit grayscale, correct? There should be much more than 4 unique elements in the slices of the image stack.

And your label stack should be slices with values 0 or 255, no in-between. Is there any slices in your training data where there is no labels? This might be where the error is.

Best,
Matthew

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

Hi @MatthewBM, thanks for the quick response. My image stack is 16-bit grayscale. it is actually a compilation of multiple stacks appended end to end, each of which have been taken through a tissue, so at points in the stack there are slices where there is almost no signal. I removed slices that actually have no signal because I thought this is what was causing checkpoint_nobinary to throw the error. It seems that as long as there are more than 3 unique elements in each slice of the stack, things should be ok. I have run the program before on training sets that have blank frames in the label stack. You think this is the issue?

from cdeep3m.

MatthewBM avatar MatthewBM commented on July 30, 2024

@camcondylis Your image stack should be 8-bit values but the checkpoint_nobinary is likely finding more than 2 unique values in your label stack. There should only be values 0 and 255 in your label stack.

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

@MatthewBM makes sense. Thanks for your help!

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

can the program not handle 16-bit?

from cdeep3m.

MatthewBM avatar MatthewBM commented on July 30, 2024

No, it's formatted for 8-bit data. The conversion should be simple, if you're in imagej/fiji it's just type>8-bit

from cdeep3m.

haberlmatt avatar haberlmatt commented on July 30, 2024

@MatthewBM, last time i checked it for 16bit it was still working, though i mainly used 8bit lately. But I don't believe that's the problem here, since at this point it's just checking if more than 3 unique grey values are in the images
@camcondylis Are you sure you didn't mistakenly invert the command and feed it with the path to the binaries first?

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

@haberlmatt for PreprocessTrainingData.m, I supplied image directory, label directory, augmented_training directory, respectively. I have run into issues before where I got a similar error when the image stack had a few blank frames at the beginning. deleting them fixed the issue. However, I can't find the source of the error now since all frames have at least 4 unique elements. I just removed all frames that contain very low signal to see if this helps.

from cdeep3m.

haberlmatt avatar haberlmatt commented on July 30, 2024

@camcondylis thats strange, the program is not evaluating individual images, but the entire stack and counting the number of grey values across the entire stack, so it shouldn't matter
The check function that's issuing an error is actually just there to check for making sure you didn't mistakenly use a binary stack.
are you importing the images as individual .png files?

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

@haberlmatt I am keeping them as individual .tifs rather than .pngs.

from cdeep3m.

haberlmatt avatar haberlmatt commented on July 30, 2024

@camcondylis Since you mentioned they are from several datasets. Are the .tif files stacked by any chance? If you provide a foldername (and not the full path to a stack) the program wouldn't realize that the individual files in the folder are stacks and probably read just the first image of each stack

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

@haberlmatt they are not stacked. they are stored as individual .tifs in the folder destination. One difference from previous times that it worked is that the image names are not numbered from 1 to end, they are of the form stack1.000 : stack1.###, stack2.000 : stack2.###. Where ### represents the last slice of each stack. Essentially, the "images" folder contains slices from multiple stacks, which are named based on the stack they came from. Do you think this is an issue?

from cdeep3m.

haberlmatt avatar haberlmatt commented on July 30, 2024

Hi @camcondylis , sorry I missed your answer earlier.
I don't think that would cause any issue. It is reading in alphabetical order, so far I never encountered anything different there. Also the point where you get the error the reading is completed.
If you don't mind you can send us a link to some of the data that is causing the issue to [email protected] and I'll see if I can figure it out from there

from cdeep3m.

camcondylis avatar camcondylis commented on July 30, 2024

@haberlmatt just sent an email with a .zip file of the data. Thanks for your help.

from cdeep3m.

Related Issues (20)

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.