vcg-uvic / sportsfield_release

Code release for WACV 2020, "Optimizing Through Learned Errors for Accurate Sports Field Registration"
Other
67 stars 25 forks source link

Problem with module 'kornia' #4

Closed jonghyun0921 closed 3 years ago

jonghyun0921 commented 3 years ago

Hi, I've just tried to follow your code.

While I was running the ipynb file you uploaded after setting the environment by environment.yml, I faced the problem below, although I did the previous settings without any failures;

image

The code ran in colab instead of Jupyter Notebook.

jiangwei221 commented 3 years ago

Have you tried to install kornia? In the .yml file there is "kornia==0.1.3.post2" installed using pip.

One way to avoid installing kornia is: replacing the following lines: https://github.com/vcg-uvic/sportsfield_release/blob/89c14b2e17f9b7d736ac5cdd4f0348bbfe2ddaee/utils/utils.py#L127-L132 with: https://github.com/kornia/kornia/blob/0af8eb6aa9c1b40e6805fd3dd84b65d101cb55f8/kornia/geometry/transform/imgwarp.py#L161-L263

I only used get_perspective_transform from kornia package.

jiangwei221 commented 3 years ago

added a new commit to solve it(if kornia is not found): https://github.com/vcg-uvic/sportsfield_release/commit/106cb994029b25f266ed77b3f9cc7ae97dcd38d9