My own weed detection

I created a ‘p’ and a ‘n’ folder where the weed and other was placed
I run ‘Cascade trainer GUI’ with this settings


There was no error

then I run: Python C:\Users\Ulf\Desktop\bild2\classifier\cascade.xml

There was no error

Here is the modified face recognition

net = tf.load("trained.tflite", load_to_fb=True)
labels = [l.rstrip('\n') for l in open("labels.txt")]
    img = sensor.snapshot().gamma_corr(contrast=1.5)
    faces = img.find_features(image.HaarCascade("cascade.cascade"))

But there is no ‘face’ or in my case weed

Can you see whats wrong?

It’s a lot easier to do classification with TF and EdgeImpulse and you’ll get much better results. Please see the tutorials around just google openmv+edgeimpulse. Otherwise you should try tuning the threshold and scale factor, see the comments in the face detection example.

I have used Edge impulse to classify p and n
but I can not see that Edge impulse can create a HaarCascade file like the one you use for face detection
can you guide me on how to produce the HaarCascade

Actually I meant use EdgeImpulse to train a neural network, it can’t train haar cascades, you can only do that with open-cv. If you already trained a cascade that works, just try to lower the threshold and/or increase the scaling step.