mingliangzhang2018 / PGDP

The first end-to-end deep learning model for explicit plane geometry diagram parsing.
37 stars 6 forks source link

ImportError: cannot import name '_C' from 'geo_parse' #5

Closed SoniaQi closed 4 months ago

SoniaQi commented 4 months ago

I was running the line "from geo_parse.config import cfg," and it traced back to "from geo_parse import _C" and reported an error. The specific error message was "Traceback (most recent call last): File "[file_name].py", line 3, in from demo.predictor import GeoDemo File "[path]/PGDP/demo/predictor.py", line 10, in from geo_parse.modeling.detector import build_detection_model File "[path]/PGDP/geo_parse/modeling/detector/init.py", line 2, in from .detectors import build_detection_model File "[path]/PGDP/geo_parse/modeling/detector/detectors.py", line 2, in from .generalized_rcnn import GeneralizedRCNN File "[path]/PGDP/geo_parse/modeling/detector/generalized_rcnn.py", line 9, in from ..backbone import build_backbone File "[path]/PGDP/geo_parse/modeling/backbone/init.py", line 2, in from .backbone import build_backbone File "[path]/PGDP/geo_parse/modeling/backbone/backbone.py", line 7, in from geo_parse.modeling.make_layers import conv_with_kaiming_uniform File "[path]/PGDP/geo_parse/modeling/make_layers.py", line 10, in from geo_parse.layers import Conv2d File "[path]/PGDP/geo_parse/layers/init.py", line 10, in from .nms import nms, ml_nms File "[path]/PGDP/geo_parse/layers/nms.py", line 3, in from geo_parse import _C ImportError: cannot import name '_C' from 'geo_parse' ([path]/PGDP/geo_parse/init.py)"

mingliangzhang2018 commented 4 months ago

Maybe the error in building, please check if it is right when runing "python setup.py build develop --no-deps"

SoniaQi commented 4 months ago

Maybe the error in building, please check if it is right when runing "python setup.py build develop --no-deps"

Thank you for the suggestion! Based on the feedback I think the error was caused by the absence of ‘geo_parse.csrc’ from the ‘packages’ configuration and some fucntions that got deprecated.