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

Suport ultralytics yolo pose and seg model. Optimized fuzzy matching for unsupported models. #52

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

315386775
Copy link
Contributor

Update: Added fuzzy matching for unsupported models.

Scenario: When I enter a non-existent model ID, I will be prompted that the model is not supported while also being given suggestions for similar models. This is especially relevant when dealing with the YOLO series of models. For example, if the original YOLO model ID supports "ultralytics/yolov11s-seg" and also supports "yolov11s-seg", but I input something that doesn't exactly match, I should receive a suggestion to use one of the supported model IDs.

Compare result:

model = xinfer.create_model("ultralytics/yolo11n-pose", device="cuda", dtype="float16")

# fuzzy matching results
ValueError: Unsupported model: ultralytics/yolo11n-pose. Suggestion model: ultralytics/yolov11n-pose, ultralytics/yolov11n-seg, ultralytics/yolov11s-seg。

# original results
ValueError: Unsupported model: ultralytics/yolo11n-pose

Update: Suport ultralytics yolo pose and seg model

Pose model output:

model = xinfer.create_model("ultralytics/yolov11n-pose", device="cuda", dtype="float16")

[[[{'point': [633.5, 442.0], 'score': 0.9853515625, 'name': 'Nose'}, {'point': [667.0, 378.5], 'score': 0.814453125, 'name': 'Left Eye'}, {'point': [554.5, 364.25], 'score': 0.998046875, 'name': 'Right Eye'}, {'point': [0.0, 0.0], 'score': 0.0054473876953125, 'name': 'Left Ear'}, {'point': [360.5, 382.25], 'score': 0.99609375, 'name': 'Right Ear'}, {'point': [663.0, 669.0], 'score': 0.669921875, 'name': 'Left Shoulder'}, {'point': [198.5, 676.0], 'score': 0.52880859375, 'name': 'Right Shoulder'}, {'point': [0.0, 0.0], 'score': 0.01554107666015625, 'name': 'Left Elbow'}, {'point': [0.0, 0.0], 'score': 0.00963592529296875, 'name': 'Right Elbow'}, {'point': [0.0, 0.0], 'score': 0.033477783203125, 'name': 'Left Wrist'}, {'point': [0.0, 0.0], 'score': 0.0341796875, 'name': 'Right Wrist'}, {'point': [0.0, 0.0], 'score': 0.006439208984375, 'name': 'Left Hip'}, {'point': [0.0, 0.0], 'score': 0.003635406494140625, 'name': 'Right Hip'}, {'point': [0.0, 0.0], 'score': 0.004573822021484375, 'name': 'Left Knee'}, {'point': [0.0, 0.0], 'score': 0.002368927001953125, 'name': 'Right Knee'}, {'point': [0.0, 0.0], 'score': 0.004756927490234375, 'name': 'Left Ankle'}, {'point': [0.0, 0.0], 'score': 0.0021076202392578125, 'name': 'Right Ankle'}]]]
Saved Render Imgae to res/1.jpg

Seg Model output:

model = xinfer.create_model("ultralytics/yolov11n-seg", device="cuda", dtype="float16")

[[{'mask': array([[          0,           0,           0, ...,           0,           0,           0],
       [          0,           0,           0, ...,           0,           0,           0],
       [          0,           0,           0, ...,           0,           0,           0],
       ...,
       [          0,           0,           0, ...,           0,           0,           0],
       [          0,           0,           0, ...,           0,           0,           0],
       [          0,           0,           0, ...,           0,           0,           0]], dtype=float32), 'bbox': [87.0, 101.0, 765.0, 713.0], 'category_id': 0, 'score': 0.5380859375, 'class_name': 'person'}]]
Saved Render Imgae to res/1.jpg

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.

1 participant