Move open cv2 import only into experimental data loader class

This commit is contained in:
Jake Poznanski 2025-08-13 20:28:31 +00:00
parent 93411a80a0
commit 11302feb8c

View File

@ -21,7 +21,6 @@ from typing import (
get_origin,
)
import cv2
import numpy as np
import yaml
from PIL import Image
@ -533,6 +532,9 @@ class AugraphyBasicAugmentations(PipelineStep):
if "image" not in sample:
return sample
# Import opencv only here
import cv2
image = sample["image"]
# Skip all augmentations based on overall probability