Nicla Visoion not getting the boxes

i got the frame but i didn’t get any boxes around face i am using nicla vision .what is the issue

import sensor, image, time

Initialize camera sensor

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time=2000) # Let the camera adjust
sensor.set_gainceiling(16)

face_cascade = image.HaarCascade(“frontalface”, stages=25)
print(face_cascade)

clock = time.clock()

while True:
clock.tick()
img = sensor.snapshot()

objects = img.find_features(face_cascade, threshold=0.75, scale_factor=1.25)
for r in objects:
    img.draw_rectangle(r, thickness=3)
                       
print(clock.fps())

The Haar Cascade was trained on mostly light-skinned people back in 2001… it doesn’t work the best on dark-skinned people :upside_down_face:, if you raise the image brightness this helps.

Please use the Machine Learning → TensorFlow → ml_objection_detection example that uses the FOMO face model which is far better.