Skip to content
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

Update plantcv.kmeans_classifier.predict_kmeans to accept array rather than a filepath #1605

Open
HaleySchuhl opened this issue Oct 3, 2024 · 1 comment
Labels
cleanup Code quality updates enhancement Enhancements to existing features
Milestone

Comments

@HaleySchuhl
Copy link
Contributor

Start a discussion about anything you would like
Throughout PlantCV we use img as a parameter input name when the function takes numpy array data, and filepath when the function takes a path. Currently plantcv.kmeans_classifier.predict_kmeans(img, model_path="./kmeansout.fit", patch_size=10) is expecting a path for the img parameter.

I propose we update the behavior of this function, keep the parameter name the name, and just require users to read the image in upstream. Happy medium might be to just extend the functionality to accept both types of input, @k034b363 thoughts?

@HaleySchuhl HaleySchuhl added enhancement Enhancements to existing features cleanup Code quality updates labels Oct 3, 2024
@HaleySchuhl HaleySchuhl added this to the PlantCV v4.6 milestone Oct 3, 2024
@github-project-automation github-project-automation bot moved this to New Issues in PlantCV4 Oct 3, 2024
@k034b363
Copy link
Contributor

k034b363 commented Oct 3, 2024

I think that's a great idea! When I added that function, I didn't have a ton of experience using the rest of plantcv, so it wasn't on purpose that it kind of breaks the convention. There's nothing about it that means it couldn't use the image instead of path, but allowing it to accept either wouldn't hurt, so I have no strong feelings either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality updates enhancement Enhancements to existing features
Projects
Status: New Issues
Development

No branches or pull requests

2 participants