Fastai2.medical.imaging: ModuleNotFoundError: No module named 'kornia'

Hi everyone!
I’m using fastai2.medical.imaging in the current Hemorrhage competition on Kaggle. A kernel that worked perfectly yesterday now fails to load the libraries (in particular, the module “kornia”.

Here is the error message :


ModuleNotFoundError Traceback (most recent call last)
in
3
4 from fastai2.basics import *
----> 5 from fastai2.medical.imaging import *
6 from tqdm import tqdm_notebook
7 np.set_printoptions(linewidth=120)

/opt/conda/lib/python3.6/site-packages/fastai2/medical/imaging.py in
9 from …vision import models
10
—> 11 import pydicom,kornia,skimage
12 from pydicom.dataset import Dataset as DcmDataset
13 from pydicom.tag import BaseTag as DcmTag

ModuleNotFoundError: No module named ‘kornia’

I tried to look on the forum to see if anybody had already reported this and didn’t find anything. Apologies if I missed it somewhere (or if that’s not the correct place to report this).

I think it was just added to fastai2 in the last day or so, adding the below fixed it for me (using GCP)

!pip install git+https://github.com/arraiyopensource/kornia

1 Like

It worked. Thanks a lot!

1 Like

Just pip install kornia should suffice.

3 Likes