Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 170 Bytes
0c3992e |
1 2 3 4 5 6 7 8 |
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)) |