Given the dataset of the object, I would like to extract that object from an image.
The object is leaf in my case. It is easy in these kind of situation where there is only one big leaf in front of the camera. This can be done using the edge detected version of this picture as suggested in this answer as we are getting somewhat clear edge of what we want as output.
But how can I extract all the leaves from an image in which there are a lot of such leaves. for example :