image-segmentation-keras
image-segmentation-keras copied to clipboard
Colab examples not working
Colab has upgraded to tensorflow 2.5 and now your examples are broken.
For the python example (https://colab.research.google.com/drive/1q_eCYEzKxixpCKH1YDsLnsvgxl92ORcv?usp=sharing), I can run it after changing the first cell from
!pip install git+https://github.com/divamgupta/image-segmentation-keras
to
!pip uninstall tensorflow tensorboard tensorboard-data-server tensorflow-datasets tensorflow-estimator tensorflow-gcs-config tensorflow-hub tensorflow-metadata tensorflow-probability keras keras-nightly Keras-Preprocessing keras-vis -y
!pip install tensorflow==2.4
!pip install git+https://github.com/divamgupta/image-segmentation-keras
This remove all old keras and tensorflow packages and install tensorflow 2.4 back
Hi Nonjosh, just wanted to say your post basically saved my thesis since I else had to run it on my CPU for 4 days straight! thanks!
I'm still having this issue.
When I make the suggestions that @nonjosh recommended, the following code block fails:
from keras_segmentation.models.unet import vgg_unet
model = vgg_unet(n_classes=50 , input_height=320, input_width=640 )
with
---> 36 from tensorflow.python.eager.context import get_config
ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context' (/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/context.py)
Building upon @nonjosh answer, and then also @dippatel1994's answer from #323. I managed to get it all working again in Colab by changing the lines to
! pip uninstall tensorflow tensorboard tensorboard-data-server tensorflow-datasets tensorflow-estimator tensorflow-gcs-config tensorflow-hub tensorflow-metadata tensorflow-probability keras keras-nightly Keras-Preprocessing keras-vis -y
! pip install tensorflow==2.4.1
! pip install keras==2.4.3
! pip install git+https://github.com/divamgupta/image-segmentation-keras