-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to return masks of segemented leaves #10
Comments
Hello! You are correct, the current version is very messy. I have an update that I have not pushed yet that exports all of the leaf masks as a very simple txt file. The new method uses a new key point detection algorithm to orient the leaves vertically (lamina tip at the top, lamina base at the bottom) and then saves the oriented points like this: Based on location in the mask: Based on ML predicted location: Line 6: beginning of the contour starting at the top-most point, all subsequent points are ordered clockwise based on Line 2, but you can write a script to reorder based on Line 4 if you want. I would use the Line 2 point to be the tip, and Line 5 point to be the base. Line 5 will be more robust to strange lamina base shapes. Line 2 will give the most consistent 'tip' value (unless the leaf has an inverted tip) Below are visualizations, the code should be pushed this week if all goes well. |
Hi! I am currently using LeafMachine to segment leaves on Herbarium sheets. I know I can see this in the resulting plots, and the bounding boxes in the output are helpful too, but I think it will be very useful to have the outlines of masks resulting from the segmentation step. I am currently extracting this information by saving Project.project_data_list as a numpy file, within "machine" in machine.py, for each image, and extracting the leaf outlines from the dictionary there, as a post-processing step. Was hoping to know a neater way of doing this! Thank you!
The text was updated successfully, but these errors were encountered: