Image classification

I am using for finding weed in the grass
there is two classes grass and weed

the result is as below

Predictions at [x=0,y=0,w=240,h=240]
grass = 0.207843
weed = 0.796078
3.792188 fps

I need to find where the weed is (x and y) in the image.

I suppose that img.draw_rectangle(obj.rect()) show the entire window since it print Predictions at [x=0,y=0,w=240,h=240]
or is it the rectangle for grass?

Can you explain how to find the weed

The code just does image classification. If you want to find a location… you can use the sliding window feature in the algorithm to have it rescale the image to detect the object. However, this is very slow.

Please see the comments in the Examples->Machine Learning->Person Detection scripts about how the sliding window work.