import sensor, time, image

# Reset sensor
sensor.reset()

# Sensor settings
sensor.set_contrast(1)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.QCIF)
sensor.set_pixformat(sensor.GRAYSCALE)

# Load Haar Cascade
# By default this will use all stages, lower satges is faster but less accurate.
face_cascade = image.HaarCascade("frontalface", stages=16)
print(face_cascade)

# FPS clock
clock = time.clock()
while (True):
    clock.tick()

    # Capture snapshot
    img = sensor.snapshot()

    # Find objects.
    # Note: Lower scale factor scales-down the img more and detects smaller objects.
    # Higher threshold results in a higher detection rate, with more false positives.
    objects = img.find_features(face_cascade, threshold=0.65, scale=1.65)

    # Draw objects
    for roi in objects:
        #img.histeq()
        eyes = img.find_eyes(roi)
        img.draw_cross(eyes[0], eyes[1])
        img.draw_cross(eyes[2], eyes[3])
        img.draw_rectangle(roi)

    if (len(objects)):
        # Add a small delay to see the drawing on the FB
        time.sleep(100)

    # Print FPS.
    # Note: Actual FPS is higher, streaming the FB makes it slower.
    print(clock.fps())

@@ -153,11 +153,11 @@
 or.Q
-CIF
+VGA
 )%0Ase
@@ -354,22 +354,87 @@
 ges=
-16)%0Aprint(face
+25)%0Aeyes_cascade = image.HaarCascade(%22eye%22, stages=24)%0Aprint(face_cascade, eyes
 _cas
@@ -473,16 +473,17 @@
 clock()%0A
+%0A
 while (T
@@ -557,17 +557,16 @@
 pshot()%0A
-%0A
     # Fi
@@ -568,24 +568,24 @@
  # Find 
-objects.
+a face !
 %0A    # N
@@ -626,17 +626,19 @@
 n the im
-g
+age
  more an
@@ -808,17 +808,16 @@
 shold=0.
-6
 5, scale
@@ -819,17 +819,16 @@
 scale=1.
-6
 5)%0A%0A    
@@ -834,22 +834,20 @@
  # Draw 
-object
+face
 s%0A    fo
@@ -848,19 +848,20 @@
     for 
-roi
+face
  in obje
@@ -877,259 +877,440 @@
     
-#
 img.
-histeq()%0A        eyes = img.
+draw_rectangle(face)%0A        # Now 
 find
-_
+ 
 eyes
-(roi)%0A        img.draw_cross(eyes%5B0%5D, eyes%5B1%5D)%0A        img.draw_cross(eyes%5B2%5D, eyes%5B3%5D)%0A        img.draw_rectangle(roi)%0A%0A    if (len(objects)):%0A        # Add a small delay to see the drawing on the FB%0A
+ within each face.%0A        # Note: Use a higher threshold here (more detections) and lower scale (to find small objects)%0A        eyes = img.find_features(eyes_cascade, threshold=0.5, scale=1.25, roi=face)%0A        for e in eyes:%0A            e = %5Bface%5B0%5D+e%5B0%5D, face%5B1%5D+e%5B1%5D, e%5B2%5D, e%5B3%5D%5D # Add face offset%0A            iris = img.find_eyes(e)%0A            img.draw_rectangle(e)%0A   
         
 time
@@ -1309,22 +1309,40 @@
     
-time.sleep(100
+ img.draw_cross(iris%5B0%5D, iris%5B1%5D
 )%0A%0A 

Update eye detection Python script.