Zero-Shot Image Classification
OpenCLIP
biomedical
contrastive-learning
image-text-retrieval
zero-shot-classification
Instructions to use ChartFoundation/BioLoom-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use ChartFoundation/BioLoom-models with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:ChartFoundation/BioLoom-models') tokenizer = open_clip.get_tokenizer('hf-hub:ChartFoundation/BioLoom-models') - Notebooks
- Google Colab
- Kaggle
Download Initialization/DINOv2/results/bioloom-retrieval.json from ChartFoundation/BioLoom-models: direct link, hf CLI and curl.
- Browser
- Download file 14 kB
-
https://huggingface.co/ChartFoundation/BioLoom-models/resolve/main/Initialization/DINOv2/results/bioloom-retrieval.json
- Command line
-
hf download hf://ChartFoundation/BioLoom-models/Initialization/DINOv2/results/bioloom-retrieval.json
-
curl -L -o bioloom-retrieval.json https://huggingface.co/ChartFoundation/BioLoom-models/resolve/main/Initialization/DINOv2/results/bioloom-retrieval.json
14 kB
| { | |
| "benchmark": "BioLoomBench", | |
| "split": "all", | |
| "model": "DINOv2", | |
| "protocol": { | |
| "concise_caption": "concise visual caption at native context", | |
| "source_caption_native": "original source caption at native context", | |
| "source_caption_cap77": "original source caption capped at 77 tokens; shorter native limits are retained", | |
| "native_context_length": 512, | |
| "cap77_effective_context_length": 77, | |
| "retrieval_directions": [ | |
| "image_to_text", | |
| "text_to_image" | |
| ], | |
| "recall_k": [ | |
| 1, | |
| 5, | |
| 10, | |
| 100 | |
| ] | |
| }, | |
| "tracks": { | |
| "concise_caption": { | |
| "n": 15000, | |
| "image_to_text": { | |
| "hierarchical_macro": { | |
| "R@1": 74.2705437631656, | |
| "R@5": 90.90051973409635, | |
| "R@10": 94.21448163463609, | |
| "R@100": 99.48754971664799 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 72.02157316085983, | |
| "bioRxiv": 76.51951436547138 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 90.76172195843687, | |
| "bioRxiv": 91.03931750975583 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 94.274181725261, | |
| "bioRxiv": 94.15478154401119 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 99.49191946376277, | |
| "bioRxiv": 99.48317996953321 | |
| } | |
| }, | |
| "R@1": 64.91333333333333, | |
| "R@5": 86.88666666666667, | |
| "R@10": 91.95333333333333, | |
| "R@100": 99.15333333333334, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 63.32104056613177, | |
| "bioRxiv": 68.12965572780351 | |
| }, | |
| "domain": { | |
| "bioengineering": 71.8, | |
| "cell_molecular": 63.1, | |
| "cytology_hematology": 58.099999999999994, | |
| "dermatology": 59.8, | |
| "development_anatomy": 68.2, | |
| "genetics_genomics": 64.3, | |
| "histopathology": 60.099999999999994, | |
| "microbiology_immunology": 66.8, | |
| "molecular_structure": 57.9, | |
| "neuroscience": 70.5, | |
| "ophthalmology": 58.199999999999996, | |
| "physiology_pharmacology": 67.30000000000001, | |
| "plant_ecology": 67.30000000000001, | |
| "radiology": 74.4, | |
| "surgery_endoscopy": 65.9 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 62.89090909090908, | |
| "chart_only": 67.60000000000001, | |
| "mixed_bio_chart": 62.69090909090909, | |
| "schematic_or_diagram": 72.64 | |
| }, | |
| "layout": { | |
| "multi_panel": 63.73148148148148, | |
| "single_panel": 67.95238095238095 | |
| } | |
| } | |
| }, | |
| "text_to_image": { | |
| "hierarchical_macro": { | |
| "R@1": 67.39635272508312, | |
| "R@5": 88.1596578749841, | |
| "R@10": 92.36006258555958, | |
| "R@100": 98.97089968630277 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 65.90665831887321, | |
| "bioRxiv": 68.88604713129301 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 86.90722993826306, | |
| "bioRxiv": 89.41208581170515 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 91.71609049469781, | |
| "bioRxiv": 93.00403467642134 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 98.80836789235805, | |
| "bioRxiv": 99.13343148024751 | |
| } | |
| }, | |
| "R@1": 57.48, | |
| "R@5": 81.36666666666666, | |
| "R@10": 87.71333333333334, | |
| "R@100": 98.22666666666666, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 55.14801156184591, | |
| "bioRxiv": 62.19045701630763 | |
| }, | |
| "domain": { | |
| "bioengineering": 64.4, | |
| "cell_molecular": 56.599999999999994, | |
| "cytology_hematology": 50.0, | |
| "dermatology": 54.1, | |
| "development_anatomy": 59.4, | |
| "genetics_genomics": 58.5, | |
| "histopathology": 50.5, | |
| "microbiology_immunology": 58.8, | |
| "molecular_structure": 49.3, | |
| "neuroscience": 61.1, | |
| "ophthalmology": 49.3, | |
| "physiology_pharmacology": 63.1, | |
| "plant_ecology": 60.699999999999996, | |
| "radiology": 66.2, | |
| "surgery_endoscopy": 60.199999999999996 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 56.03636363636364, | |
| "chart_only": 62.26666666666667, | |
| "mixed_bio_chart": 52.18181818181819, | |
| "schematic_or_diagram": 69.44 | |
| }, | |
| "layout": { | |
| "multi_panel": 53.98148148148149, | |
| "single_panel": 66.47619047619048 | |
| } | |
| } | |
| }, | |
| "mean_recall": { | |
| "R@1": 61.19666666666666, | |
| "R@5": 84.12666666666667, | |
| "R@10": 89.83333333333334, | |
| "R@100": 98.69 | |
| }, | |
| "mean_hierarchical_macro": { | |
| "R@1": 70.83344824412436, | |
| "R@5": 89.53008880454023, | |
| "R@10": 93.28727211009783, | |
| "R@100": 99.22922470147537 | |
| } | |
| }, | |
| "source_caption_native": { | |
| "n": 15000, | |
| "image_to_text": { | |
| "hierarchical_macro": { | |
| "R@1": 79.96505239565954, | |
| "R@5": 92.11995661681394, | |
| "R@10": 94.49418618636378, | |
| "R@100": 98.6719455905369 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 82.84114228557146, | |
| "bioRxiv": 77.08896250574763 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 95.11375560571821, | |
| "bioRxiv": 89.12615762790966 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 97.01384098489552, | |
| "bioRxiv": 91.97453138783202 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 99.5621173538787, | |
| "bioRxiv": 97.78177382719507 | |
| } | |
| }, | |
| "R@1": 78.63333333333333, | |
| "R@5": 91.68666666666667, | |
| "R@10": 94.38666666666666, | |
| "R@100": 98.29333333333334, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 81.88976377952756, | |
| "bioRxiv": 72.05556674048722 | |
| }, | |
| "domain": { | |
| "bioengineering": 82.5, | |
| "cell_molecular": 83.2, | |
| "cytology_hematology": 79.9, | |
| "dermatology": 67.10000000000001, | |
| "development_anatomy": 84.5, | |
| "genetics_genomics": 63.0, | |
| "histopathology": 84.3, | |
| "microbiology_immunology": 76.6, | |
| "molecular_structure": 84.8, | |
| "neuroscience": 83.39999999999999, | |
| "ophthalmology": 75.4, | |
| "physiology_pharmacology": 83.8, | |
| "plant_ecology": 75.1, | |
| "radiology": 81.39999999999999, | |
| "surgery_endoscopy": 74.5 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 75.43636363636364, | |
| "chart_only": 59.4, | |
| "mixed_bio_chart": 86.2, | |
| "schematic_or_diagram": 80.56 | |
| }, | |
| "layout": { | |
| "multi_panel": 84.08333333333333, | |
| "single_panel": 64.61904761904762 | |
| } | |
| } | |
| }, | |
| "text_to_image": { | |
| "hierarchical_macro": { | |
| "R@1": 77.63373765515371, | |
| "R@5": 91.07733671244648, | |
| "R@10": 93.86648871192719, | |
| "R@100": 98.48876821956924 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 82.39494101084175, | |
| "bioRxiv": 72.87253429946567 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 94.13116235883543, | |
| "bioRxiv": 88.02351106605755 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 96.67845199832523, | |
| "bioRxiv": 91.05452542552915 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 99.56885450995236, | |
| "bioRxiv": 97.40868192918613 | |
| } | |
| }, | |
| "R@1": 77.92, | |
| "R@5": 91.30666666666667, | |
| "R@10": 93.87333333333333, | |
| "R@100": 98.34666666666666, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 81.64058606598226, | |
| "bioRxiv": 70.40467082746125 | |
| }, | |
| "domain": { | |
| "bioengineering": 81.0, | |
| "cell_molecular": 81.89999999999999, | |
| "cytology_hematology": 79.5, | |
| "dermatology": 67.9, | |
| "development_anatomy": 84.0, | |
| "genetics_genomics": 64.60000000000001, | |
| "histopathology": 85.2, | |
| "microbiology_immunology": 75.3, | |
| "molecular_structure": 84.7, | |
| "neuroscience": 81.2, | |
| "ophthalmology": 76.6, | |
| "physiology_pharmacology": 81.3, | |
| "plant_ecology": 72.2, | |
| "radiology": 80.4, | |
| "surgery_endoscopy": 73.0 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 75.50909090909092, | |
| "chart_only": 55.13333333333333, | |
| "mixed_bio_chart": 85.61818181818181, | |
| "schematic_or_diagram": 79.96 | |
| }, | |
| "layout": { | |
| "multi_panel": 83.85185185185186, | |
| "single_panel": 62.66666666666667 | |
| } | |
| } | |
| }, | |
| "mean_recall": { | |
| "R@1": 78.27666666666667, | |
| "R@5": 91.49666666666667, | |
| "R@10": 94.13, | |
| "R@100": 98.32 | |
| }, | |
| "mean_hierarchical_macro": { | |
| "R@1": 78.79939502540662, | |
| "R@5": 91.59864666463021, | |
| "R@10": 94.18033744914548, | |
| "R@100": 98.58035690505307 | |
| } | |
| }, | |
| "source_caption_cap77": { | |
| "n": 15000, | |
| "image_to_text": { | |
| "hierarchical_macro": { | |
| "R@1": 65.8726487423479, | |
| "R@5": 85.27222249830157, | |
| "R@10": 89.3387571457503, | |
| "R@100": 96.81096956164268 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 70.3177605230111, | |
| "bioRxiv": 61.42753696168472 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 89.0736473177258, | |
| "bioRxiv": 81.47079767887733 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 93.4629838884989, | |
| "bioRxiv": 85.21453040300167 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 98.9491687186002, | |
| "bioRxiv": 94.67277040468514 | |
| } | |
| }, | |
| "R@1": 63.0, | |
| "R@5": 83.03333333333333, | |
| "R@10": 87.85333333333334, | |
| "R@100": 96.78, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 66.4208113226353, | |
| "bioRxiv": 56.090195288906784 | |
| }, | |
| "domain": { | |
| "bioengineering": 66.5, | |
| "cell_molecular": 62.2, | |
| "cytology_hematology": 60.199999999999996, | |
| "dermatology": 57.49999999999999, | |
| "development_anatomy": 67.7, | |
| "genetics_genomics": 52.5, | |
| "histopathology": 66.5, | |
| "microbiology_immunology": 57.9, | |
| "molecular_structure": 59.599999999999994, | |
| "neuroscience": 67.30000000000001, | |
| "ophthalmology": 58.9, | |
| "physiology_pharmacology": 71.39999999999999, | |
| "plant_ecology": 58.099999999999994, | |
| "radiology": 71.7, | |
| "surgery_endoscopy": 67.0 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 63.054545454545455, | |
| "chart_only": 52.26666666666666, | |
| "mixed_bio_chart": 62.727272727272734, | |
| "schematic_or_diagram": 69.92 | |
| }, | |
| "layout": { | |
| "multi_panel": 64.33333333333333, | |
| "single_panel": 59.57142857142858 | |
| } | |
| } | |
| }, | |
| "text_to_image": { | |
| "hierarchical_macro": { | |
| "R@1": 63.86892602275939, | |
| "R@5": 83.77139672688395, | |
| "R@10": 88.84323608992742, | |
| "R@100": 96.52276711674423 | |
| }, | |
| "source_macro": { | |
| "R@1": { | |
| "Europe PMC OA": 70.08374764239271, | |
| "bioRxiv": 57.65410440312607 | |
| }, | |
| "R@5": { | |
| "Europe PMC OA": 88.1469825599869, | |
| "bioRxiv": 79.39581089378099 | |
| }, | |
| "R@10": { | |
| "Europe PMC OA": 92.98362070173037, | |
| "bioRxiv": 84.70285147812446 | |
| }, | |
| "R@100": { | |
| "Europe PMC OA": 99.04205245703643, | |
| "bioRxiv": 94.00348177645202 | |
| } | |
| }, | |
| "R@1": 60.89333333333333, | |
| "R@5": 81.98666666666666, | |
| "R@10": 86.95333333333333, | |
| "R@100": 96.48, | |
| "breakdowns_R@1": { | |
| "source": { | |
| "Europe PMC OA": 64.44732383135653, | |
| "bioRxiv": 53.71451580430844 | |
| }, | |
| "domain": { | |
| "bioengineering": 63.4, | |
| "cell_molecular": 59.699999999999996, | |
| "cytology_hematology": 58.9, | |
| "dermatology": 56.3, | |
| "development_anatomy": 65.9, | |
| "genetics_genomics": 51.4, | |
| "histopathology": 65.7, | |
| "microbiology_immunology": 55.300000000000004, | |
| "molecular_structure": 57.199999999999996, | |
| "neuroscience": 64.1, | |
| "ophthalmology": 58.8, | |
| "physiology_pharmacology": 68.60000000000001, | |
| "plant_ecology": 54.2, | |
| "radiology": 69.8, | |
| "surgery_endoscopy": 64.1 | |
| }, | |
| "content_type": { | |
| "bioimage_only": 62.4, | |
| "chart_only": 47.199999999999996, | |
| "mixed_bio_chart": 59.05454545454546, | |
| "schematic_or_diagram": 69.84 | |
| }, | |
| "layout": { | |
| "multi_panel": 62.05555555555555, | |
| "single_panel": 57.904761904761905 | |
| } | |
| } | |
| }, | |
| "mean_recall": { | |
| "R@1": 61.946666666666665, | |
| "R@5": 82.50999999999999, | |
| "R@10": 87.40333333333334, | |
| "R@100": 96.63 | |
| }, | |
| "mean_hierarchical_macro": { | |
| "R@1": 64.87078738255364, | |
| "R@5": 84.52180961259276, | |
| "R@10": 89.09099661783885, | |
| "R@100": 96.66686833919346 | |
| } | |
| } | |
| } | |
| } | |