yhenon / pytorch-retinanet

Pytorch implementation of RetinaNet object detection.
Apache License 2.0
2.14k stars 663 forks source link

undefined symbol : PyInt_FromLong #7

Closed DecentMakeover closed 6 years ago

DecentMakeover commented 6 years ago

Hi thanks for your code!

Im getting this error when i try to run on my custom data

Traceback (most recent call last):
  File "train.py", line 19, in <module>
    import model
  File "/media/sdc/Ryan/pytorch-retinanet/model.py", line 9, in <module>
    from lib.nms.pth_nms import pth_nms
  File "/media/sdc/Ryan/pytorch-retinanet/lib/nms/pth_nms.py", line 2, in <module>
    from ._ext import nms
  File "/media/sdc/Ryan/pytorch-retinanet/lib/nms/_ext/nms/__init__.py", line 3, in <module>
    from ._nms import lib as _lib, ffi as _ffi
ImportError: /media/sdc/Ryan/pytorch-retinanet/lib/nms/_ext/nms/_nms.so: undefined symbol:PyInt_FromLong`

anything obvious i'm missing?

yhenon commented 6 years ago

Hi, I hope you find this repo useful!

Did you compile the nms extension as indicated in step 4 of installation in the Readme?

On Sat, Jul 14, 2018, 10:47 AM Ryan Dsouza notifications@github.com wrote:

Hi thanks for your code!

Im getting this error when i try to run on my custom data

Traceback (most recent call last): File "train.py", line 19, in import model File "/media/sdc/Ryan/pytorch-retinanet/model.py", line 9, in

from lib.nms.pth_nms import pth_nms File "/media/sdc/Ryan/pytorch-retinanet/lib/nms/pth_nms.py", line 2, in from ._ext import nms File "/media/sdc/Ryan/pytorch-retinanet/lib/nms/_ext/nms/__init__.py", line 3, in from ._nms import lib as _lib, ffi as _ffi ImportError: /media/sdc/Ryan/pytorch-retinanet/lib/nms/_ext/nms/_nms.so: undefined symbol: PyInt_FromLong anything obvious i'm missing? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or mute the thread .
DecentMakeover commented 6 years ago

Sorry for the late reply , I did, I did not have a make.sh file, so i ran build.sh , I got a few warnings though

yhenon commented 6 years ago

I'm not 100% sure what's going on. It would help me out if you could post:

Thanks!

On Sat, Jul 14, 2018, 12:08 PM Ryan Dsouza notifications@github.com wrote:

Sorry for the late reply , I did, I did not have a make.sh file, so i ran build.sh , I got a few warnings though

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yhenon/pytorch-retinanet/issues/7#issuecomment-405033017, or mute the thread https://github.com/notifications/unsubscribe-auth/AJe4ynnSmDMZ9DLqwFboml-fIIjaaCYoks5uGheWgaJpZM4VP4X8 .

DecentMakeover commented 6 years ago

Sure, Give me a minute

DecentMakeover commented 6 years ago

Command im using

python train.py --dataset csv --csv_train annot.csv --csv_classes class_map.csv 

The compiler warning is attached below screenshot from 2018-07-14 21-50-30

python version 3.5 pytorch version 0.3

DecentMakeover commented 6 years ago

extended warnings

screenshot from 2018-07-14 21-55-03

yhenon commented 6 years ago

Nothing stands out to me, I'll have to do some testing. Note that I've only tested the code with pytorch 0.4, so upgrading might help, no guarantee though.

On Sat, Jul 14, 2018, 12:22 PM Ryan Dsouza notifications@github.com wrote:

Command im using

python train.py --dataset csv --csv_train annot.csv --csv_classes class_map.csv

The compiler warning is attached below [image: screenshot from 2018-07-14 21-50-30] https://user-images.githubusercontent.com/25679895/42726324-1a5ad872-87b0-11e8-9788-2b489a7a9d31.png

python version 3.5 pytorch version 0.3

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yhenon/pytorch-retinanet/issues/7#issuecomment-405033877, or mute the thread https://github.com/notifications/unsubscribe-auth/AJe4yphaMbCsEEE2xp9eFfiFRvxMcM_Mks5uGhrLgaJpZM4VP4X8 .

DecentMakeover commented 6 years ago

Oh ,Okay ,Let me see what i can do

Thanks for your time !

DecentMakeover commented 6 years ago

Not sure where to reach you, so posting this here , Hi ,I had just another question ,Most of the datasets have integer values as their bounding box co-ordinates like 56 43 22 77 etc, but for the open dataset challenge the bounding box co-ordinates are in float values like 0.0012, 0.4120, 0.1250, 0.2224 etc, so when during training my classification loss decreases but my regression loss stays 0, Any suggestion on what i could modify to make this work.For now in the dataloader script from line 274-277 i have changed the int argument to float to make it to accept float values.Thanks in advance

yhenon commented 6 years ago

Hi,

Please go ahead and create a separate issue for this, it keep things more organized and makes it easier for people to search (I get notified of any issues, so there's no trouble contacting me).

Did you solve the original problem?

On Tue, Jul 17, 2018, 9:14 AM Ryan Dsouza notifications@github.com wrote:

Not sure where to reach you, so posting this here , Hi ,I had just another question ,Most of the datasets have integer values as their bounding box co-ordinates like 56 43 22 77 etc, but for the open dataset challenge the bounding box co-ordinates are in float values like 0.0012, 0.4120, 0.1250, 0.2224 etc, so when training my classification loss decreases but my regression loss stays 0, Any suggestion on what i could modify to make this work.For now in the dataloader script from line 274-277 i have changed the int argument to float to make it to accept float values.Thanks in advance

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yhenon/pytorch-retinanet/issues/7#issuecomment-405577322, or mute the thread https://github.com/notifications/unsubscribe-auth/AJe4yvaWMKYvU8O8q6pPl5qqdH6fXYYIks5uHeNGgaJpZM4VP4X8 .

DecentMakeover commented 6 years ago

Sure,

Yes ,The original issue was solved

Vikramsinh commented 4 years ago

I have install pysftp library using yum install pysftp -t . on AMI linux command prompt and make zip file of it and upload it to AWS lambda layer. but still I am getting

Undefined Symbol: PyInt_FromLong

Please help