caMicroscope icon indicating copy to clipboard operation
caMicroscope copied to clipboard

Something confusing about the predict function of caMicrosope

Open 3048205169 opened this issue 4 years ago • 9 comments

Describe the bug This maybe my mistake but actually there is problem. There is always a caveat that the value of input patch size that I typed in is incorrect.

I used to learn machine learning but I was not so familiar with the image processing. Thus, I thought maybe I have missed something very important.

To Reproduce Just type in information into the box.

Expected behavior I have no idea what will be right in the screen but I know Mine is wrong.

Desktop (please complete the following information):

  • OS: Ubuntu as the server, Windows as the client
  • Browser chrome

Maybe someone could tell me what is the underlying mechanism of this function? (e.g. the model? the input? the output? the right way to use that model?)

3048205169 avatar Jun 22 '20 02:06 3048205169

uploading model model input

3048205169 avatar Jun 22 '20 02:06 3048205169

caMicroscope uses tensorflow.js models for classification and segmentation . Some example models can be found here .

The input patch size is the size of patches on which the model was trained . For example , for this model the input patch size should be 512 , the classes should be benign, normal, insitu and invasive and the format should be RGB .

The normal workflow for uploading a model is something like :

  • fill in the details as mentioned above.
  • Upload the tfjs model: The first upload is for the model.json file and the next one is for all the binaries. For the example above all files are present here .
  • Once uploaded this is a guide that can help for using the Predict function .

Please let us know if there is any difficulty. Thank You.

leoarc avatar Jun 22 '20 03:06 leoarc

Oh, I have missed the file that I have to upload!

3048205169 avatar Jun 22 '20 03:06 3048205169

caMicroscope uses tensorflow.js models for classification and segmentation . Some example models can be found here . The input patch size is the size of patches on which the model was trained . For example , for this model the input patch size should be 512 , the classes should be benign, normal, insitu and invasive and the format should be RGB . The normal workflow for uploading a model is something like :

fill in the details as mentioned above. Upload the tfjs model: The first upload is for the model.json file and the next one is for all the binaries. For the example above all files are present here . Once uploaded this is a guide that can help for using the Predict function .

Please let us know if there is any difficulty. Thank You.

models

3048205169 avatar Jun 22 '20 03:06 3048205169

Thanks @leoarc for helping to handle this! @3048205169 has this answered your questions?

birm avatar Jun 24 '20 02:06 birm

Thanks @leoarc for helping to handle this! @3048205169 has this answered your questions?

Yes! Althought I am not sure about the inner mechanism of the model, but I guess the calling of the classification is in the model.js.

I am not good at js, maybe I have to learn it.

3048205169 avatar Jun 24 '20 02:06 3048205169

I'm afraid I don't quite understand. Are you asking about the model structure, or are you asking about the prediction application? (Or both?)

birm avatar Jun 24 '20 02:06 birm

There are runPredict function in the model.js file which will call the model uploaded but I am not very good at .js file.

3048205169 avatar Jun 24 '20 03:06 3048205169

I've added #413 to hopefully eventually help readability.

However, for now, I think you're looking for this line and the tf.tidy block it's in. Or maybe you're interested in model storage, which is done in browser.

birm avatar Jun 24 '20 03:06 birm

Closing as a stale issue. Feel free to reopen if you think this should be active still.

birm avatar Aug 10 '23 21:08 birm