# Nicla Visoion not getting the boxes

**URL:** <https://forums.openmv.io/t/nicla-visoion-not-getting-the-boxes/9780>\
**Category:** Arduino Boards\
**Created:** [July 6, 2024, 2:11am UTC](https://forums.openmv.io/t/nicla-visoion-not-getting-the-boxes/9780 "2024-07-06T02:11:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kremlin](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@kremlin](https://forums.openmv.io/u/kremlin)\
**Post date:** [July 6, 2024, 2:11am UTC](https://forums.openmv.io/t/nicla-visoion-not-getting-the-boxes/9780/1 "2024-07-06T02:11:40Z")

</div>

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())

```

 ![Screenshot (147)](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/2X/5/5c49881c8388bdcfff069df0dbe4dda98aebf8ce.png)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [July 6, 2024, 4:05am UTC](https://forums.openmv.io/t/nicla-visoion-not-getting-the-boxes/9780/2 "2024-07-06T04:05:25Z")

</div>

The Haar Cascade was trained on mostly light-skinned people back in 2001… it doesn’t work the best on dark-skinned people 🙃, 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.
