Spaces:
Runtime error
Runtime error
Download preprocess.py from KurtLin/CoronaryAngioSegment_Rescale: direct link, hf CLI and curl.
- Browser
- Download file 157 Bytes
-
https://huggingface.co/spaces/KurtLin/CoronaryAngioSegment_Rescale/resolve/main/preprocess.py
- Command line
-
hf download hf://spaces/KurtLin/CoronaryAngioSegment_Rescale/preprocess.py
-
curl -L -o preprocess.py https://huggingface.co/spaces/KurtLin/CoronaryAngioSegment_Rescale/resolve/main/preprocess.py
157 Bytes
| import cv2 | |
| def unsharp_masking(img): | |
| gaussian = cv2.GaussianBlur(img, (0, 0), 2.0) | |
| img = cv2.addWeighted(img, 2.0, gaussian, -1.0, 0) | |
| return img |