Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'semantic_segmentation' from 'pixellib.semantic' #163

Open
KeryMg opened this issue Nov 17, 2022 · 7 comments

Comments

@KeryMg
Copy link

KeryMg commented Nov 17, 2022

No description provided.

@gpsub
Copy link

gpsub commented Dec 1, 2022

Hi, can you please provide more description. I will try and solve your issue.

@iura77
Copy link

iura77 commented Jan 2, 2023

Hi, can you please provide more description. I will try and solve your issue.

I can provide.

the code:

import pixellib
from pixellib.semantic import semantic_segmentation 

the error:

C:\Anaconda3\lib\site-packages\pixellib\semantic\deeplab.py in <module>
     13 from tensorflow.python.keras.layers import Add
     14 from tensorflow.python.keras.layers import Dropout
---> 15 from tensorflow.python.keras.layers import BatchNormalization
     16 from tensorflow.python.keras.layers import Conv2D
     17 from tensorflow.python.keras.layers import DepthwiseConv2D

ImportError: cannot import name 'BatchNormalization' from 'tensorflow.python.keras.layers' (C:\Anaconda3\lib\site-packages\tensorflow\python\keras\layers\__init__.py)

@quillaur
Copy link

Same issue.

@jeyojey
Copy link

jeyojey commented Feb 14, 2023

Go to Pixellib folder -> semantic -> deeplab.py and replace this line from tensorflow.python.keras.layers import BatchNormalization with this one from keras.layers.normalization.batch_normalization import BatchNormalization

@GraceMinai
Copy link

How can I access this Pixellib folder? I am having the same issue as described above but am afraid I do not know where and how to access the said folder

@GraceMinai
Copy link

I got it. Never mind

@SunlightWings
Copy link

How did you access the Pixellib folder? @GraceMinai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants