From fab0b82a5c2680ab4e4823641955cdc7b9bb9891 Mon Sep 17 00:00:00 2001 From: Isaac Chung Date: Fri, 22 Nov 2024 14:38:10 +0200 Subject: [PATCH] [mieb] Fix Moco model on CIFAR10Clustering (#1487) Fix Moco model on CIFAR10Clustering --- mteb/models/moco_models.py | 5 ++++- .../CIFAR10Clustering.json | 22 +++++++++++++++++++ .../model_meta.json | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/CIFAR10Clustering.json diff --git a/mteb/models/moco_models.py b/mteb/models/moco_models.py index 3fa7dfe20..18e1a63ad 100644 --- a/mteb/models/moco_models.py +++ b/mteb/models/moco_models.py @@ -78,8 +78,11 @@ def get_image_embeddings( with torch.no_grad(): for i in tqdm(range(0, len(images), batch_size)): batch_images = images[i : i + batch_size] + inputs = torch.vstack( + [self.processor(b).unsqueeze(0) for b in batch_images] + ) output = self.model( - self.processor(batch_images) + inputs ) # output is (batch_size, num_features) shaped tensor all_image_embeddings.append(output) diff --git a/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/CIFAR10Clustering.json b/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/CIFAR10Clustering.json new file mode 100644 index 000000000..981ba63e6 --- /dev/null +++ b/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/CIFAR10Clustering.json @@ -0,0 +1,22 @@ +{ + "dataset_revision": "0b2714987fa478483af9968de7c934580d0bb9a2", + "evaluation_time": 265.58390378952026, + "kg_co2_emissions": null, + "mteb_version": "1.16.5", + "scores": { + "test": [ + { + "ari": 0.6686950213456546, + "cluster_accuracy": 0.8305, + "hf_subset": "default", + "languages": [ + "eng-Latn" + ], + "main_score": 0.7469370718746896, + "nmi": 0.7469370718746896, + "v_measure": 0.7469370718746896 + } + ] + }, + "task_name": "CIFAR10Clustering" +} \ No newline at end of file diff --git a/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/model_meta.json b/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/model_meta.json index d97b884a3..6ec67ca44 100644 --- a/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/model_meta.json +++ b/results-mieb/nyu-visionx__moco-v3-vit-b/7d091cd70772c5c0ecf7f00b5f12ca609a99d69d/model_meta.json @@ -1 +1 @@ -{"name": "nyu-visionx/moco-v3-vit-b", "revision": "7d091cd70772c5c0ecf7f00b5f12ca609a99d69d", "release_date": "2024-06-03", "languages": ["eng_Latn"], "n_parameters": null, "memory_usage": null, "max_tokens": null, "embed_dim": null, "license": null, "open_source": true, "similarity_fn_name": null, "framework": [], "loader": "mocov3_loader"} \ No newline at end of file +{"name": "nyu-visionx/moco-v3-vit-b", "revision": "7d091cd70772c5c0ecf7f00b5f12ca609a99d69d", "release_date": "2024-06-03", "languages": ["eng_Latn"], "n_parameters": null, "memory_usage": null, "max_tokens": null, "embed_dim": null, "license": null, "open_weights": null, "public_training_data": null, "public_training_code": null, "framework": [], "reference": null, "similarity_fn_name": null, "use_instuctions": null, "zero_shot_benchmarks": null, "loader": "mocov3_loader"} \ No newline at end of file