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 YOLO-World model documentation #276

Merged
merged 6 commits into from
Feb 21, 2024
Merged

Add YOLO-World model documentation #276

merged 6 commits into from
Feb 21, 2024

Conversation

capjamesg
Copy link
Contributor

Description

This PR adds instructions on how to use YOLO-World to the Inference documentation.

Type of change

  • Documentation improvements

How has this change been tested, please provide a testcase or example of how you tested the change?

You can test this project by navigating to the Models tab, click "YOLO World", and ensure the page opens properly.

Any specific deployment considerations

N/A

Docs

N/A

@capjamesg capjamesg self-assigned this Feb 19, 2024
@capjamesg capjamesg added the documentation Improvements or additions to documentation label Feb 19, 2024
Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

We shall also include examples of running the requests against HTTP API with inference_sdk

@capjamesg
Copy link
Contributor Author

@PawelPeczek-Roboflow Do you have code to share for those methods?

@PawelPeczek-Roboflow
Copy link
Collaborator

result = client.infer_from_yolo_world(
    inference_input=["https://media.istockphoto.com/id/1417882544/photo/large-group-of-cats-and-dogs-looking-at-the-camera-on-blue-background.jpg?s=612x612&w=0&k=20&c=kGKANSIFdNfhBJMipyuaKU4BcVE1oELWev9lF2ickE0="]*3,
    class_names=["dog", "cat"],
    model_version="m",
    confidence=0.1,
)

there is also async version

result = await client.infer_from_yolo_world_async(
    inference_input=["https://media.istockphoto.com/id/1417882544/photo/large-group-of-cats-and-dogs-looking-at-the-camera-on-blue-background.jpg?s=612x612&w=0&k=20&c=kGKANSIFdNfhBJMipyuaKU4BcVE1oELWev9lF2ickE0="]*3,
    class_names=["dog", "cat"],
    model_version="m",
    confidence=0.1,
)

and if one inefrence server start and pip install inference-sdk first then this should work out of the box

@PawelPeczek-Roboflow
Copy link
Collaborator

this is example for batch requests

@PawelPeczek-Roboflow
Copy link
Collaborator

one may also give np array, PIL or single file path / url - as per standard way of specifying images in sdk

confidence=0.1,
)

detections = sv.Detections.from_inference(results)
Copy link
Collaborator

Choose a reason for hiding this comment

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

afaik we return list of dictionaries, so probably results[0] is appropriate here

from inference_sdk import InferenceHTTPClient

client = InferenceHTTPClient(
api_url="http://127.0.0.1:9001",
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shall probably instruct users to run server with inference-cli and probably give a hint about pip install ...

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Choose a reason for hiding this comment

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

LGTM, but please add changes as suggested

@capjamesg
Copy link
Contributor Author

I have made the requested changes. Can you review again? (I can't merge without the last commit being reviewed and approved)

@capjamesg capjamesg merged commit 8c88ae4 into main Feb 21, 2024
5 checks passed
@capjamesg capjamesg deleted the add-yolo-world-docs branch February 21, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants