run cascade file openmv3 crash

Hello,every one! when I loaded my cascade file from openmv-cascade.py generated,the openmv3 crash and disconnect from IDE.How to solve this issue?Thanks!The source as follow:

cars_cascade = image.HaarCascade("/cars.cascade", stages = 13)
print(face_cascade)

# FPS clock
clock = time.clock()

lcd.set_backlight(1)

while (True):
    clock.tick()

    # Capture snapshot
    img = sensor.snapshot()

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

    # Draw objects
    for r in objects:
        img.draw_rectangle(r)
    lcd.display(img)

Attach the cars xml file and cars.cascade
cars.rar (14.9 KB)

Ibrahim can debug this.

Hi, I tested your cascade on M4 and M7 it works on both. If I have to guess I’d say the file wasn’t fully written/flushed before you reset the cam, so try this copy the file again and then eject (or safe remove) the drive, reset the cam and then try to run the script again.

Hi,iabdalkader.

I tried this cascade and got OpenMV3 crashed. I wonder on what version of firmware did you try this? And would you please share the py test code ?

Thank you!

Hi,

I’m using the latest FW image:

And I used the example script that comes with the IDE, just replaced the cascade name and set stages = 13. I got one crash, then I copied the cascade again and it worked, which made me think that the file wasn’t fully written the first time. So my advise is to try again, but this time make sure the file is written (eject/safe remove the uSD after copying the file, then reset the cam from the IDE)

Hi,
I tried your way ,but failed again. I’m using v2.3 too.
I’ll try to get this resolved. Thank you anyway.

I’ll try your cascade again and get back to you.

Hello,iabdalkader,about the load cascade file crash issue have new methold to be solved?Thanks!

Tried again and it works, can you test the attached cascade ?
cars.cascade.zip (2.73 KB)