cherubicXN / afm_cvpr2019

Official implementation of paper "Learning Attraction Field Map for Robust Line Segment Detection" (CVPR 2019)
MIT License
297 stars 66 forks source link

no module named squeeze #17

Closed WujiangXu closed 4 years ago

WujiangXu commented 4 years ago

I run the code and get this error. from squeeze.squeeze import region_grow ImportError: No module named 'squeeze' I saw in the squeeze folder don't have any squeeze.py

Can you give me some help? Thank u for u reply.

cherubicXN commented 4 years ago

Did you compile the cxx files?

WujiangXu commented 4 years ago

Did you compile the cxx files?

I have compiled in the lib folder.Just like in the install.md and get the information like another issue.

cherubicXN commented 4 years ago

If the squeeze.*.so file has been generated, can you try to import it in the folder of the .so file?

WujiangXu commented 4 years ago

If the squeeze.*.so file has been generated, can you try to import it in the folder of the .so file?

Did it mean that I need to cdll.LoadLibrary to import .so file in the squeeze_to_lsg.py.Because it cause the error in this file. those are error function name lsgenerator ---> region_grow

WujiangXu commented 4 years ago

Sorry to interrupt you.I also have anothor question.I test just one photo which is not in the dataset you provide.Do I need to do some change to the input.I saw the model that need (64,3,3,3).I can't understand this.Which size I need to resize the photo.

cherubicXN commented 4 years ago

Sorry to interrupt you.I also have anothor question.I test just one photo which is not in the dataset you provide.Do I need to do some change to the input.I saw the model that need (64,3,3,3).I can't understand this.Which size I need to resize the photo.

The input image should have 3 channels and you need to resize it into 320x320 if you train the model with 320x320 training samples.

WujiangXu commented 4 years ago

Sorry to interrupt you.I also have anothor question.I test just one photo which is not in the dataset you provide.Do I need to do some change to the input.I saw the model that need (64,3,3,3).I can't understand this.Which size I need to resize the photo.

The input image should have 3 channels and you need to resize it into 320x320 if you train the model with 320x320 training samples.

If I use the model which you provided,I also need to change the photo to 320?I use the unet.

cherubicXN commented 4 years ago

h

Yes

WujiangXu commented 4 years ago

h

Yes

In the squeeze_to_lsg.py, line 3 ,you import the from squeeze.squeeze import region_grow, and it will be a error. So I substitute it,just like it. `lib1 = cdll.LoadLibrary('/home/xyf/dataset/rotate/afm_cvpr2019-master/afm_cvpr2019-master/lib/squeeze/squeeze.cpython-35m-x86_64-linux-gnu.so')

rects = lib1.region_grow(xx, yy, theta, np.array([H, W], dtype=np.int32))

I use the cdll to load the .so file,but it make other error. AttributeError: squeeze.cpython-35m-x86_64-linux-gnu.so: undefined symbol: region_grow`

WujiangXu commented 4 years ago

I can't use the function in the squeeze_to_lsg.py. It called region_grow.Is it important to the information for the line.

preston2006 commented 4 years ago

from .squeeze.squeeze import region_grow