Retrieve and Evaluate with X(any) models
Project description
x.retrieval
Retrieve and evaluate with X (any) models.
This project simplifies automated text-image retrieval benchmarks.
Inputs:
- A dataset
- A model
- A mode (e.g.
image-to-image
)
Outputs:
- A retrieval results dataframe
- A retrieval metrics dataframe
๐ Key Features
- โ Supports a wide range of models and datasets.
- โ Installation in one line.
- โ Run benchmarks with one function call.
๐ Quickstart
import xretrieval
xretrieval.run_benchmark(
dataset_name="coco-val-2017",
model_id="transformers/Salesforce/blip2-itm-vit-g",
mode="text-to-text",
)
Output:
{
'MRR': 0.2953,
'NormalizedDCG': 0.3469,
'Precision': 0.2226,
'Recall': 0.4864,
'HitRate': 0.4864,
'MAP': 0.2728
}
๐ฆ Installation
pip install xretrieval
๐ ๏ธ Usage
List datasets:
xretrieval.list_datasets()
List models:
xretrieval.list_models()
๐งฐ Supported Models and Datasets
Models:
Available Models
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโ
โ Model ID โ Model Input โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ transformers/Salesforce/blip2-itm-vit-g โ text-image โ
โ transformers/Salesforce/blip2-itm-vit-g-text โ text โ
โ transformers/Salesforce/blip2-itm-vit-g-image โ image โ
โ sentence-transformers/paraphrase-MiniLM-L3-v2 โ text โ
โ sentence-transformers/paraphrase-albert-small-v2 โ text โ
โ sentence-transformers/multi-qa-distilbert-cos-v1 โ text โ
โ sentence-transformers/all-MiniLM-L12-v2 โ text โ
โ sentence-transformers/all-distilroberta-v1 โ text โ
โ sentence-transformers/multi-qa-mpnet-base-dot-v1 โ text โ
โ sentence-transformers/all-mpnet-base-v2 โ text โ
โ sentence-transformers/multi-qa-MiniLM-L6-cos-v1 โ text โ
โ sentence-transformers/all-MiniLM-L6-v2 โ text โ
โ timm/resnet18.a1_in1k โ image โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
Datasets:
coco-val-2017
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xretrieval-0.1.0.tar.gz
(3.9 MB
view details)
Built Distribution
File details
Details for the file xretrieval-0.1.0.tar.gz
.
File metadata
- Download URL: xretrieval-0.1.0.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4206cf275b3d57f75c6981403d69b33aefe14e8b69afddd17b25facefbd73632 |
|
MD5 | 497b464d99652a1775ea35c7b3e7ed66 |
|
BLAKE2b-256 | 897edaec602f25ba77811c59d46475cea3445230572b6d955adb145ae949f515 |
File details
Details for the file xretrieval-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: xretrieval-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4889de9ad4eb122252ee964bf0468c4316b10b7dee6e38fbce4fc9cc53158aab |
|
MD5 | e34f8dae7e5486cd6587d179b8ede947 |
|
BLAKE2b-256 | 1092bf6e5ca28f2c6731ae08332b81cdd19a098ddabb501b212dfac1eeae3832 |