Detect Plant leaves

I'm trying to find a package that has the capability of detecting the plant leaves and then exporting it as a shapefile. I would really appreciate any help in finding such a package if it exists. Below is a picture for reference. Thanks.