The image half of BioCLIP exported to ONNX and quantized to int8, so it can run fully offline in a phone browser with onnxruntime-web.
It powers NaturDex, a nature "Pokémon Snap" for school field trips on recycled phones.
| File | Size | Notes |
|---|---|---|
bioclip-image-int8.onnx |
~87 MB | dynamic int8 quantization (onnxruntime.quantization.quantize_dynamic) |
pixels: float32[1, 3, 224, 224], resized, center-cropped and normalized with CLIP's mean/std.embedding: float32[1, 512], L2-normalized.Only the image encoder is included. Text embeddings for the species list are computed ahead of time on a laptop, so the phone just compares the photo embedding against them (zero-shot classification).
Measured on 244 recent research-grade iNaturalist photos from Spain (82 species), against a list of ~1,900 species recorded in Asturias:
| Model | Top-1 | Top-3 | Top-5 |
|---|---|---|---|
| fp32 | 70% | 84% | 87% |
| int8 (this file) | 66% | 81% | 86% |
See embeddings/export_onnx.py in the NaturDex repository.
BioCLIP by the Imageomics Institute, released under the MIT license. This derived file keeps the same license. If you use it, please cite BioCLIP:
@inproceedings{stevens2024bioclip,
title = {{B}io{CLIP}: A Vision Foundation Model for the Tree of Life},
author = {Samuel Stevens and Jiaman Wu and Matthew J Thompson and Elizabeth G Campolongo and Chan Hee Song and David Edward Carlyn and Li Dong and Wasila M Dahdul and Charles Stewart and Tanya Berger-Wolf and Wei-Lun Chao and Yu Su},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2024}
}
imageomics/bioclip