import image
import sensor
import ai
sensor.reset()
ml = ai.load(ai.FACE_DETECT)
print(ml)
roi = (620,220,640,640)
def loop():
img = sensor.snapshot()
#img.draw_rectangle(roi, color=(0,0,255), thickness=4)
out = ml.forward(img,roi=roi)
for it in out:
print(it.rect())
img.draw_rectangle(it.rect(),color=(0,255,0), thickness=4)