PixelLib
PixelLib copied to clipboard
For newer version of Tensorflow, you should change code.
In deeplab.py :
replace raw code with follows:
from tensorflow.keras.models import Model
from tensorflow.keras import layers
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import Lambda
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Concatenate
from tensorflow.keras.layers import Add
from tensorflow.keras.layers import Dropout
# from keras.layers.normalization.batch_normalization import BatchNormalization
from tensorflow.keras.layers import BatchNormalization
# from tensorflow.python.keras.layers import BatchNormalization
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import DepthwiseConv2D
from tensorflow.keras.layers import ZeroPadding2D
from tensorflow.keras.layers import GlobalAveragePooling2D
from tensorflow.python.keras.utils.layer_utils import get_source_inputs
from tensorflow.keras import backend as K
It worked for me on :
(seg) PS D:\0code\IR_dataset\align> pip list
Package Version
------------------------- ------------------
absl-py 2.1.0
antlr4-python3-runtime 4.9.3
astunparse 1.6.3
attrs 23.2.0
black 24.2.0
certifi 2024.2.2
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 3.0.0
colorama 0.4.6
contourpy 1.2.0
cycler 0.12.1
Cython 3.0.8
dataclasses 0.6
dm-tree 0.1.8
fire 0.5.0
flatbuffers 23.5.26
fonttools 4.49.0
future 1.0.0
fvcore 0.1.5.post20221221
gast 0.5.4
google-pasta 0.2.0
grpcio 1.62.0
h5py 3.10.0
hydra-core 1.3.2
idna 3.6
imageio 2.34.0
imantics 0.1.12
imgaug 0.4.0
iopath 0.1.10
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
keras 3.0.5
kiwisolver 1.4.5
labelme2coco 0.2.4
lazy_loader 0.3
libclang 16.0.6
lxml 5.1.0
Markdown 3.5.2
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.8.3
mdurl 0.1.2
ml-dtypes 0.3.2
mypy-extensions 1.0.0
namex 0.0.7
networkx 3.2.1
numpy 1.26.4
omegaconf 2.3.0
opencv-python 4.7.0.72
opt-einsum 3.3.0
packaging 23.2
pathspec 0.12.1
pillow 10.2.0
pip 23.3.1
pixellib 0.7.1
platformdirs 4.2.0
portalocker 2.8.2
protobuf 4.25.3
pybboxes 0.1.6
pydot 2.0.0
Pygments 2.17.2
pyparsing 3.1.1
PyQt5 5.15.10
PyQt5-Qt5 5.15.2
PyQt5-sip 12.13.0
python-dateutil 2.8.2
pywin32 306
PyYAML 6.0.1
referencing 0.33.0
requests 2.31.0
rich 13.7.0
rpds-py 0.18.0
sahi 0.11.15
scikit-image 0.22.0
scipy 1.12.0
setuptools 68.2.2
shapely 2.0.3
six 1.16.0
tabulate 0.9.0
tensorboard 2.16.2
tensorboard-data-server 0.7.2
tensorflow 2.16.0rc0
tensorflow-intel 2.16.0rc0
termcolor 2.4.0
terminaltables 3.1.10
tifffile 2024.2.12
tqdm 4.66.2
typing_extensions 4.9.0
urllib3 2.2.1
Werkzeug 3.0.1
wheel 0.41.2
wrapt 1.16.0
xmljson 0.2.1
yacs 0.1.8