dhlab-epfl / dhSegment

Generic framework for historical document processing
https://dhlab-epfl.github.com/dhSegment
GNU General Public License v3.0
373 stars 116 forks source link

OOTB syntax error with demo.py #51

Open duncdrum opened 5 years ago

duncdrum commented 5 years ago

Following the installation instructions in the docs the final step: python demo.py

results in

File "demo.py", line 20
    def page_make_binary_mask(probs: np.ndarray, threshold: float=-1) -> np.ndarray:
                                   ^
SyntaxError: invalid syntax

Similarly python3 demo.py

Traceback (most recent call last):
  File "demo.py", line 6, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'
duncdrum commented 5 years ago

after some more testing: the opencv-python dependency does not get installed properly when running the pip install git+https… command of the installation instructions. conda install also doesn't do the trick, another pip install opencv-python inside the running conda session gets me further, but still leads to opencv related crashes.

Tested on alpine, debian, macOS.