Brain-Segmentation
Brain-Segmentation copied to clipboard
code not running on google colab.
I had copied entire project and pasted it on google colab. It is throwing errors. because it is using deepbrain package which uses tensorflow v1 as backend. and colab is using tensorflow version 2 since a while. the error is :
LOADING DATA...
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:10: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).
* deprecated from version: 3.0
* Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
# Remove the CWD from sys.path while we load stuff.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-28-4ee8cd402a2d> in <module>()
80 y = []
81 for T1_,FLAIR_,IR_,seg_ in zip(T1path, FLAIRpath, IRpath, segpath):
---> 82 T1 = histeq(to_uint8(get_data_with_skull_scraping(T1_)))
83 IR = IR_to_uint8(get_data(IR_))
84 FLAIR = to_uint8(get_data(FLAIR_))
2 frames
/usr/local/lib/python3.6/dist-packages/deepbrain/extractor.py in load_pb(self)
16
17 def load_pb(self):
---> 18 print(tf.__version__)
19 graph = tf.Graph()
20 print(tf.Session(graph=graph))
AttributeError: module 'tensorflow' has no attribute 'Session'
kindly help