Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'deform_conv_cuda' from partially initialized module 'assets.ops.dcn' #380

Open
zys-creator opened this issue Oct 18, 2024 · 0 comments

Comments

@zys-creator
Copy link

verbose: True
Initializing log dir for workspace/SegDetectorModel-seg_detector/deformable_resnet18/L1BalanceCELoss
./datasets/total_text/
Traceback (most recent call last):
File "/home/zys/DB/demo.py", line 148, in
main()
File "/home/zys/DB/demo.py", line 43, in main
Demo(experiment, experiment_args, cmd=args).inference(args['image_path'], args['visualize'])
File "/home/zys/DB/demo.py", line 127, in inference
model = self.init_model()
^^^^^^^^^^^^^^^^^
File "/home/zys/DB/demo.py", line 66, in init_model
model = self.structure.builder.build(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zys/DB/structure/builder.py", line 24, in build
model = Model(self.model_args, device,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zys/DB/structure/model.py", line 37, in init
self.model = BasicModel(args)
^^^^^^^^^^^^^^^^
File "/home/zys/DB/structure/model.py", line 15, in init
self.backbone = getattr(backbones, args['backbone'])(**args.get('backbone_args', {}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zys/DB/backbones/resnet.py", line 263, in deformable_resnet18
model = ResNet(BasicBlock, [2, 2, 2, 2],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zys/DB/backbones/resnet.py", line 191, in init
self.layer2 = self._make_layer(
^^^^^^^^^^^^^^^^^
File "/home/zys/DB/backbones/resnet.py", line 225, in _make_layer
layers.append(block(self.inplanes, planes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zys/DB/backbones/resnet.py", line 55, in init
from assets.ops.dcn import ModulatedDeformConv
File "/home/zys/DB/assets/ops/dcn/init.py", line 1, in
from .functions.deform_conv import deform_conv, modulated_deform_conv
File "/home/zys/DB/assets/ops/dcn/functions/deform_conv.py", line 9, in
from .. import deform_conv_cuda
ImportError: cannot import name 'deform_conv_cuda' from partially initialized module 'assets.ops.dcn' (most likely due to a circular import) (/home/zys/DB/assets/ops/dcn/init.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant