From 97eb75bf3123bd6484fc70c4197be99f91b557d3 Mon Sep 17 00:00:00 2001 From: dnth Date: Tue, 29 Oct 2024 11:36:08 +0800 Subject: [PATCH] update readme --- README.md | 66 ++++++++++++++++----------------- tests/smoke/test_ultralytics.py | 4 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 0b05f04..ef15353 100644 --- a/README.md +++ b/README.md @@ -124,32 +124,32 @@ xinfer.list_models() ``` Available Models -┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ -┃ Implementation ┃ Model ID ┃ Input --> Output ┃ -┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ -│ timm │ eva02_large_patch14_448.mim_m38m_ft_in22k_in1k │ image --> categories │ -│ timm │ eva02_large_patch14_448.mim_m38m_ft_in1k │ image --> categories │ -│ timm │ eva02_large_patch14_448.mim_in22k_ft_in22k_in1k │ image --> categories │ -│ timm │ eva02_large_patch14_448.mim_in22k_ft_in1k │ image --> categories │ -│ timm │ eva02_base_patch14_448.mim_in22k_ft_in22k_in1k │ image --> categories │ -│ timm │ eva02_base_patch14_448.mim_in22k_ft_in1k │ image --> categories │ -│ timm │ eva02_small_patch14_336.mim_in22k_ft_in1k │ image --> categories │ -│ timm │ eva02_tiny_patch14_336.mim_in22k_ft_in1k │ image --> categories │ -│ transformers │ Salesforce/blip2-opt-6.7b-coco │ image-text --> text │ -│ transformers │ Salesforce/blip2-flan-t5-xxl │ image-text --> text │ -│ transformers │ Salesforce/blip2-opt-6.7b │ image-text --> text │ -│ transformers │ Salesforce/blip2-opt-2.7b │ image-text --> text │ -│ transformers │ fancyfeast/llama-joycaption-alpha-two-hf-llava │ image-text --> text │ -│ transformers │ vikhyatk/moondream2 │ image-text --> text │ -│ transformers │ sashakunitsyn/vlrm-blip2-opt-2.7b │ image-text --> text │ -│ ultralytics │ yolov8x │ image --> boxes │ -│ ultralytics │ yolov8m │ image --> boxes │ -│ ultralytics │ yolov8l │ image --> boxes │ -│ ultralytics │ yolov8s │ image --> boxes │ -│ ultralytics │ yolov8n │ image --> boxes │ -│ ... │ ... │ ... │ -│ ... │ ... │ ... │ -└────────────────┴─────────────────────────────────────────────────┴──────────────────────┘ +┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Implementation ┃ Model ID ┃ Input --> Output ┃ +┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ +│ timm │ timm/eva02_large_patch14_448.mim_m38m_ft_in22k_in1k │ image --> categories │ +│ timm │ timm/eva02_large_patch14_448.mim_m38m_ft_in1k │ image --> categories │ +│ timm │ timm/eva02_large_patch14_448.mim_in22k_ft_in22k_in1k │ image --> categories │ +│ timm │ timm/eva02_large_patch14_448.mim_in22k_ft_in1k │ image --> categories │ +│ timm │ timm/eva02_base_patch14_448.mim_in22k_ft_in22k_in1k │ image --> categories │ +│ timm │ timm/eva02_base_patch14_448.mim_in22k_ft_in1k │ image --> categories │ +│ timm │ timm/eva02_small_patch14_336.mim_in22k_ft_in1k │ image --> categories │ +│ timm │ timm/eva02_tiny_patch14_336.mim_in22k_ft_in1k │ image --> categories │ +│ transformers │ Salesforce/blip2-opt-6.7b-coco │ image-text --> text │ +│ transformers │ Salesforce/blip2-flan-t5-xxl │ image-text --> text │ +│ transformers │ Salesforce/blip2-opt-6.7b │ image-text --> text │ +│ transformers │ Salesforce/blip2-opt-2.7b │ image-text --> text │ +│ transformers │ fancyfeast/llama-joycaption-alpha-two-hf-llava │ image-text --> text │ +│ transformers │ vikhyatk/moondream2 │ image-text --> text │ +│ transformers │ sashakunitsyn/vlrm-blip2-opt-2.7b │ image-text --> text │ +│ ultralytics │ ultralytics/yolov8x │ image --> boxes │ +│ ultralytics │ ultralytics/yolov8m │ image --> boxes │ +│ ultralytics │ ultralytics/yolov8l │ image --> boxes │ +│ ultralytics │ ultralytics/yolov8s │ image --> boxes │ +│ ultralytics │ ultralytics/yolov8n │ image --> boxes │ +│ ... │ ... │ ... │ +│ ... │ ... │ ... │ +└────────────────┴───────────────────────────────────────────────────────┴──────────────────────┘ ``` If you're running in a Juypter Notebook environment, you can specify `interactive=True` to list and search supported models interactively. @@ -285,7 +285,7 @@ All models from [TIMM](https://github.com/huggingface/pytorch-image-models) fine For example load a `resnet18.a1_in1k` model: ```python -xinfer.create_model("resnet18.a1_in1k") +xinfer.create_model("timm/resnet18.a1_in1k") ``` You can also load any model (or a custom timm model) by using the `TIMMModel` class. @@ -312,15 +312,15 @@ model = xinfer.create_model(model) YOLOv8 Series -
xinfer.create_model("yolov8n")
+
xinfer.create_model("ultralytics/yolov8n")
YOLOv10 Series -
xinfer.create_model("yolov10x")
+
xinfer.create_model("ultralytics/yolov10x")
YOLOv11 Series -
xinfer.create_model("yolov11s")
+
xinfer.create_model("ultralytics/yolov11s")
@@ -350,15 +350,15 @@ model = xinfer.create_model(model) Molmo-72B -
xinfer.create_model("allenai/Molmo-72B-0924")
+
xinfer.create_model("vllm/allenai/Molmo-72B-0924")
Molmo-7B-D -
xinfer.create_model("allenai/Molmo-7B-D-0924")
+
xinfer.create_model("vllm/allenai/Molmo-7B-D-0924")
Molmo-7B-O -
xinfer.create_model("allenai/Molmo-7B-O-0924")
+
xinfer.create_model("vllm/allenai/Molmo-7B-O-0924")
diff --git a/tests/smoke/test_ultralytics.py b/tests/smoke/test_ultralytics.py index 8505ee9..7fba317 100644 --- a/tests/smoke/test_ultralytics.py +++ b/tests/smoke/test_ultralytics.py @@ -8,7 +8,7 @@ @pytest.fixture def model(): - return xinfer.create_model("yolov8n", device="cpu", dtype="float32") + return xinfer.create_model("ultralytics/yolov8n", device="cpu", dtype="float32") @pytest.fixture @@ -17,7 +17,7 @@ def test_image(): def test_ultralytics_initialization(model): - assert model.model_id == "yolov8n" + assert model.model_id == "ultralytics/yolov8n" assert model.device == "cpu" assert model.dtype == torch.float32