atatakun's picture
Duplicate from atatakun/ControlNet-v1-1-Annotators-cpu
87b62f4
raw
history blame
155 Bytes
import cv2
class CannyDetector:
def __call__(self, img, low_threshold, high_threshold):
return cv2.Canny(img, low_threshold, high_threshold)