Download 3_ControlNet/annotator/canny/__init__.py from Qiyp/DiffICM: direct link, hf CLI and curl.
- Browser
- Download file 155 Bytes
-
https://huggingface.co/Qiyp/DiffICM/resolve/main/3_ControlNet/annotator/canny/__init__.py
- Command line
-
hf download hf://Qiyp/DiffICM/3_ControlNet/annotator/canny/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Qiyp/DiffICM/resolve/main/3_ControlNet/annotator/canny/__init__.py
155 Bytes
| import cv2 | |
| class CannyDetector: | |
| def __call__(self, img, low_threshold, high_threshold): | |
| return cv2.Canny(img, low_threshold, high_threshold) | |