-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding additional interface for Object Detection #7
base: main
Are you sure you want to change the base?
Adding additional interface for Object Detection #7
Conversation
Adding additional interface for Object Detection in addition to error catching API calls to return JSON when no image / object labels get returned
Using https://github.com/MichaelLantz/mindsdb/tree/ml_integration/hf_inference_api_playground these are some tests I ran successfully:
followed by:
|
Hey @MichaelLantz, |
return self._query(inputs, model=model, task="object-detection") | ||
|
||
def object_detection_in_df(self, df: DataFrame, column: Text, model: Optional[Text] = None) -> DataFrame: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really awesome! I was just thinking that since this is object detection, we might need to include the coordinates as well? What do you think? We can maybe include these in separate columns in the resulting DataFrame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All thanks goes to you good sir! I'm just a fan who hopes I'm not making things worse. Coordinates will definitely be helpful especially if we want to augment images to pinpoint objects. I was messing around in my development area but need a little more time to try that without adding too much bloat to the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are making it much better! I was wondering how to tackle the object detection task and your help is much appreciated. Please take your time and reach out to me anytime if you want to talk it out.
|
||
def object_detection_in_df(self, df: DataFrame, column: Text, model: Optional[Text] = None) -> DataFrame: | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something else that I was thinking about is, given the situation that multiple objects are detected in a single image, we will only be returning the first one. Maybe we can include all of the objects detected for a particular image in separate rows? What do you feel about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I noticed this behavior. I think having all objects might be a good option and allows for extensibility. In my case I was happy with a single result for the first iteration. Having any accurate result was a huge win to start as far as I was concerned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Let's see what we can do to support this.
@MichaelLantz A couple of things,
|
Hi @MinuraPunchihewa!
First off I want to thank you for your contributions. I've been having a blast playing with the functionality.
I added this for something I'm testing but I'm hoping you / others can benefit.
Change: Adding additional interface for Object Detection in addition to error catching API calls to return JSON when no image / object labels get returned