Spaces:
Paused
Paused
Download src/tools/process_image.py from snap-stanford/SKB-Explorer: direct link, hf CLI and curl.
- Browser
- Download file 170 Bytes
-
https://huggingface.co/spaces/snap-stanford/SKB-Explorer/resolve/main/src/tools/process_image.py
- Command line
-
hf download hf://spaces/snap-stanford/SKB-Explorer/src/tools/process_image.py
-
curl -L -o process_image.py https://huggingface.co/spaces/snap-stanford/SKB-Explorer/resolve/main/src/tools/process_image.py
170 Bytes
| import numpy as np | |
| from PIL import Image | |
| import matplotlib.pyplot as plt | |
| def extract_patch(image, box): | |
| x1, y1, x2, y2 = box | |
| return image.crop((x1, y1, x2, y2)) |