Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.67k stars 449 forks source link

Symbol Not Found #121

Open JacobsDylan opened 2 years ago

JacobsDylan commented 2 years ago

I'm getting this error when attempting to run the following lines of code:

config = "lp://TableBank/faster_rcnn_R_101_FPN_3x/config" # TableBank configuration (from model zoo) model = lp.Detectron2LayoutModel(config) layout = model.detect(image)

Symbol not found: __Z16THPVariable_WrapN2at6TensorE

lolipopshock commented 2 years ago

I think the problem is majorly about the way you've installed pytorch and Detectron2.

One thing to try first is whether pytorch is successfully installed -- e.g.,

import torch
torch.tensor([1,2])+torch.tensor([1,2])

If that works, then this might be an issue from Detectron2 installation. That is a bit complicated, but the easiest thing to do reinstall Detectron2 following the official instructions https://detectron2.readthedocs.io/en/latest/tutorials/install.html .