pkuCactus / BDCN

The code for the CVPR2019 paper Bi-Directional Cascade Network for Perceptual Edge Detection
MIT License
341 stars 71 forks source link

Python 2.7? #27

Closed YacobBY closed 4 years ago

YacobBY commented 4 years ago

Why is a 2019 repository based on Python 2.7 which is almost deprecated? Is there some special functionality which is not present in newer Python versions?

pkuCactus commented 4 years ago

No, it is very convenient to transfer to Python3.x and Pytorch >= 0.4. The reason for using python2.7 is that the work is training on the server of school and the config is that.

YacobBY commented 4 years ago

But the code is full of Python 2.7 exclusive syntax such as the print statements not having brackets. For example: print all_t instead of print (all_t)

Python 2.7 often has multiple methods of writing, some which are compatible with Python 3, but the syntax of this repo seems to have specifically chosen for the non-intercompatible methods

wanfuzhubao commented 4 years ago

hi, have you solved this problem? do you use python2 environment directly or switch to Pyhton3?

YacobBY commented 4 years ago

@wanfuzhubao This project is full of deprecated garbage and they're pretty much refusing to even acknowledge it. I would recommend the fork by Huberthomas https://github.com/huberthomas/bdcn which is ported to Python 3.

IIRC the Forward_All class had a pretty usable demo. I personally had a fork of his project but I since tried the MaskRCNN included in Detectron2 and decided to just completely switch from edge-detection since it was less reliable than just a custom object detector.