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

some modifications for python3 to work #15

Open
captainst opened this issue Aug 5, 2019 · 3 comments
Open

some modifications for python3 to work #15

captainst opened this issue Aug 5, 2019 · 3 comments

Comments

@captainst
Copy link

There are some minor modifications in order to make this great project work with python3

  1. In shape_context.py, change from utils import pairwise_distance to from utils.utils import pairwise_distance

  2. In utils.py, change all instances of xrange to range

  3. In utils.py, line 117, change hi, wi = height/n, width/n to hi, wi = height//n, width//n

Hope it helps.

@corin-lyz
Copy link

thank you! it's very nice!

@Borda
Copy link

Borda commented May 13, 2020

@captainst mind send a PR? I guess that xrange also needs some change...

@2970765122
Copy link

为了使这个伟大的项目与python3一起工作,有一些小的修改

  1. 在 shape_context.py 中,从 utils import pairwise_distance 更改为 from utils.utils import pairwise_distance
  2. utils.py 中,将 xrange 的所有实例更改为范围
  3. 在 utils.py 中,第 117 行,将 hi, wi = height/n, width/n 更改为 hi, wi = height//n, width//n

希望对您有所帮助。

因为我下载的init函数是空的,您可以通过电子邮件将文件发送给我吗?我的电子邮件 [[email protected])。非常感谢!

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

4 participants