Image Segmentation using Tensorflow and Keras (follow up with an end-to-end example)

This post is a follow up on [this previous RStudio Community Post, regarding 2D Brain Tumor Segmentation(Image Segmentation using Tensorflow and Keras).

The previous user reported the following error message while following this protocol (blogs rstudio com/ai/posts/2019-08-23-unet/):

Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: in user code:

/Users/mayasamuels-fair/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/tensorflow/python/keras/engine/ predict_function  *
    return step_function(self, **iterator**)

The reported error may be related to some of these issues:

  • Use of "as_iterator()", "iter_next()", etc., instead of "reticulate::as_iterator()" , "reticulate::iter_next()", etc., or,
  • A mix of different python versions (installed and/or loaded/referenced) in the user Rmd e-notebook script.

You can see this complete example worked out using pytorch and separately via tensorflow at the DSPA EBook (dspa predictive space), Chapter 22 (Deep Learning).

Also, notice that none of the prior RStudio blog solutions, e.g., brain image segmentation with torch (blogs rstudio com/ai/posts/2020-11-30-torch-brain-segmentation/), really handle the "data augmentation" correctly (e.g., image rotation, scaling, etc. is not included), whereas the function "create_dataset()" in the DSPA solution illustrates intensity (color) and spatial (affine) transformations as image augmentation phases.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.