google-research / deeplab2

DeepLab2 is a TensorFlow library for deep labeling, aiming to provide a unified and state-of-the-art TensorFlow codebase for dense pixel labeling tasks.
Apache License 2.0
1.01k stars 159 forks source link

Code compatibility with python < 3.9 #155

Open brendonlutnick opened 1 year ago

brendonlutnick commented 1 year ago

It seems that the files "deeplab2/model/layers/moat_blocks.py" and "deeplab2/model/pixel_encoder/moat.py" are using list[int] and List[int] interchangeably in function definitions. From what I can gather - this works in python 3.9 but not in previous versions. I was able to make the code run in python 3.8 by editing the files to use List[int], and Dict[int] and importing List and Dict from typing.