Lightning Flash error with SemanticSegmentationData (NameError: name 'K' is not defined)
I'm trying to perform an image segmentation task with Colab and Lightning Flash.
I'm installing Flash with:
!pip install lightning-flash

I'm trying to instanciate a Lightning Flash SemanticSegmentationData using from_folders method like this:
datamodule = SemanticSegmentationData.from_folders(
    train_folder=x_train_dir,
    train_target_folder=y_train_dir,
    val_folder=x_valid_dir,
    val_target_folder=y_valid_dir,
    test_folder=x_test_dir,
    test_target_folder=y_test_dir,
    transform_kwargs=dict(image_size=(256, 256)),
    num_classes=1,
    batch_size=16,
)

But I'm getting this error:
/usr/local/lib/python3.7/dist-packages/flash/image/segmentation/input_transform.py in train_per_sample_transform(self)
 49             [DataKeys.INPUT, DataKeys.TARGET],
 50             KorniaParallelTransforms(
---&gt; 51                 K.geometry.Resize(self.image_size, interpolation=&quot;nearest&quot;), K.augmentation.RandomHorizontalFlip(p=0.5)
 52             ),
 53         )
NameError: name 'K' is not defined

How can I solve this problem?

Initially, I was trying to solve the problem this way:
!pip install kornia
import kornia as K

This didn't solve the problem. Then, I opened an issue in their GitHub Issue #1423. With a help from https://github.com/krshrimali, I discovered that just installing kornia would solve the problem.
So, the solution is just:
!pip install kornia 

