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

Add Computer Vision (CV) functions #27

Closed
wants to merge 3 commits into from

Conversation

tzolov
Copy link
Collaborator

@tzolov tzolov commented Jan 22, 2024

This module is a replacement of the outdated TendorFlow functions.
It provides functions for performing common CV tasks such as Image Classification, Object Detection, Instance and Semantic Segmentation, Pose Estimation an more.

The implementation leverages the Deep Java Library (DJL) that serves as a bridge between the Java ecosystem and the cutting-edge capabilities of deep learning.
DJL provides integration with popular deep learning frameworks like TensorFlow, PyTorch, and MXNet, as well as support for a variety of pre-trained models using ONNX Runtime.

Consult project's README for detailed information.

See #20

@tzolov tzolov changed the title Initial CV function commit [FOR REVIEW ONLY] Add Computer Vision (CV) functions Jan 23, 2024
Copy link
Collaborator

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone through the quick review on GitHub.
Hope this would be enough to continue evolution.
Thanks

Copy link
Collaborator

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, consider to rebase your PR to the latest main: there is a conflict in the dependencies.gradle

* @author Christian Tzolov
*/
@AutoConfiguration(after = DjlAutoConfiguration.class)
@EnableConfigurationProperties({ DjlConfigurationProperties.class, ComputerVisionFunctionProperties.class })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not addressed

* `Function<Message<byte[]>, Message<byte[]>> imageClassifications` - The `Image Classification` task assigns a label to an image from a set of categories.
* `Function<Message<byte[]>, Message<byte[]>> semanticSegmentation` - `Semantic Segmentation` refers to the task of detecting objects of various classes at pixel level.
It colors the pixels based on the objects detected in that space.
* `Function<Message<byte[]>, Message<byte[]>> poseEstimation` - `Pose Estimation` refers to the task of detecting human figures in images and videos, and estimating the pose of the bodies.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where my comment is lost, but I'll repeat it.

It is better for end-user just to auto-wire a single function and leave the rest of hard logic up to internal routing.
You still can have those Function instances internally, but better to just expose only a single function for auto-configuration and so.

I would go with Spring Integration router, but probably a simple switch by some configuration property would be enough.

The point is that we pursue here a microservices architecture therefore a single auto-configured service from this module is what everyone would expect in their projects.

Any arguments that we have to leave it as a number of functions ?

Or... We might go with all those beans for functions since I see they are conditional, but let's see if we can make them with the same bean name in the end! So, target project would benefit from the same @Autowire without any paradox of choice for name.

@artembilan
Copy link
Collaborator

Hey, @tzolov !

We have a release this Thursday: let us know if you going to clean up the latest review round!
Or do you leave that to us on merge?
Or do you want to postpone it to the next milestone?

Thanks

@artembilan
Copy link
Collaborator

Moved to the next milestone since we have to release today, but this has not been finished yet.
Thanks

@artembilan
Copy link
Collaborator

Merged as 55f09da.

I had to @DisabledOnOs(OS.WINDOWS) the semanticSegmentation() test because PyTourch native library is not loaded for me somehow.
We will look how it behaves on Linux with our CI.

As I said before: I named all the conditional functions in the configuration as a computerVisionFunction for better end-user experience.
Modified README respectively.
Also fixed dependencies.gradle for Dependabot compatibility.

Thank you!

@artembilan artembilan closed this Mar 20, 2024
@artembilan
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants