cnn-registration icon indicating copy to clipboard operation
cnn-registration copied to clipboard

ImportError: cannot import name 'pairwise_distance'

Open PythonImageDeveloper opened this issue 7 years ago • 20 comments

Hi, When i run python3 demo.py in the root src , i faced with that error , why? How do i change to vgg15 with other cnn?

PythonImageDeveloper avatar Aug 04 '18 10:08 PythonImageDeveloper

I'm facing the same problem

ahmedsedik2017 avatar Jan 27 '19 03:01 ahmedsedik2017

I moved the files in the 'utils' folder to the 'src' folder and changed the name of 'utils.py' to 'util.py'. It works.

shyu4184 avatar Feb 09 '19 13:02 shyu4184

I tried but it did not work Kindly, could you send me the modified files

Get Outlook for Androidhttps://aka.ms/ghei36


From: shyu4184 [email protected] Sent: Saturday, February 9, 2019 3:03:57 PM To: yzhq97/cnn-registration Cc: ahmed sedik; Comment Subject: Re: [yzhq97/cnn-registration] ImportError: cannot import name 'pairwise_distance' (#2)

I moved the files in the 'utils' folder to the 'src' folder and changed the name of 'utils.py' to 'util.py'. It works.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/yzhq97/cnn-registration/issues/2#issuecomment-462042897, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Af4ppHprNdh7qE3O6fLIh9_mQnMGPp5Sks5vLsc9gaJpZM4Vu82q.

ahmedsedik2017 avatar Feb 11 '19 02:02 ahmedsedik2017

@ahmedsedik2017 let me know your email address. I'll send the modified files.

shyu4184 avatar Feb 11 '19 02:02 shyu4184

[email protected] Thank you so much

Get Outlook for Androidhttps://aka.ms/ghei36


From: shyu4184 [email protected] Sent: Monday, February 11, 2019 4:45:23 AM To: yzhq97/cnn-registration Cc: ahmed sedik; Mention Subject: Re: [yzhq97/cnn-registration] ImportError: cannot import name 'pairwise_distance' (#2)

@ahmedsedik2017https://github.com/ahmedsedik2017 let me know your email address. I'll send the modified files.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/yzhq97/cnn-registration/issues/2#issuecomment-462207137, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Af4ppCcb2jX1yJ9ubXBIGyRut6nn9Aaeks5vMNlDgaJpZM4Vu82q.

ahmedsedik2017 avatar Feb 11 '19 02:02 ahmedsedik2017

@shyu4184 Can you email the files to me as well. My email id is [email protected]

dhairyagada avatar Mar 24 '19 16:03 dhairyagada

@ahmedsedik2017 let me know your email address. I'll send the modified files.

Can you email the files to me as well? My email is [email protected]. Thank you so much!

Shawnmhy avatar Mar 28 '19 17:03 Shawnmhy

@shyu4184 Can you email the files to me as well. My email id is [email protected]

daoping123 avatar Mar 28 '19 22:03 daoping123

@ahmedsedik2017 have you received the modified code? Could you send me a copy? My email id is [email protected]

daoping123 avatar Mar 28 '19 22:03 daoping123

use from utils.utils import pairwise_distance instead of from utils import pairwise_distance in the third line of the file shape_context.py

mukul54 avatar Jun 05 '19 17:06 mukul54

Could you run demo.py successly in python3? What the result is ?

HeliumTang avatar Jul 11 '19 09:07 HeliumTang

@shyu4184 Can you please email the files to me as well. My email id is [email protected]

IsmaelAlajeli avatar Dec 25 '19 12:12 IsmaelAlajeli

Could you run demo.py successly in python3? What the result is ?

python3 is OK. but "xrange" should be modified as "range"

zp80272 avatar Apr 12 '20 09:04 zp80272

@shyu4184 Please if you can mail me the files. my email address [email protected]

Fatima-96 avatar Jun 02 '20 20:06 Fatima-96

you can change the "from utils import pairwise_distance" in the "shape_context.py" to "from utils.utils import pairwise_distance", I try it and worked.

Liuhq-DL avatar Dec 10 '20 06:12 Liuhq-DL

你能把文件也通过电子邮件发送给我吗?我的电子邮件 ID 是 [email protected]

您也可以通过电子邮件将文件发送给我吗?我的电子邮件 [[email protected])。非常感谢!

2970765122 avatar May 25 '23 12:05 2970765122

您也可以通过电子邮件将文件发送给我吗?我的电子邮件 [[email protected])。非常感谢!

2970765122 avatar May 25 '23 12:05 2970765122

让我知道您的电子邮件地址。我将发送修改后的文件。

您也可以通过电子邮件将文件发送给我吗?我的电子邮件 [[email protected])。非常感谢!

2970765122 avatar May 25 '23 12:05 2970765122

您是否收到修改后的代码?你能给我发一份吗?我的电子邮件 ID 是 [email protected]

您也可以通过电子邮件将文件发送给我吗?我的电子邮件 [[email protected])。非常感谢!

2970765122 avatar May 25 '23 12:05 2970765122