File size: 4,874 Bytes
3d562ea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
---
license: apache-2.0
base_model:
- timm/eva02_large_patch14_448.mim_m38m_ft_in22k_in1k
library_name: fastai
tags:
- Coleoptera
- Taxonomy
- Biology
- Cicindelidae
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
This model was trained on all specimens of *Cicindela* tiger beetles from the Field Museum. It is a multilabel model able to identify species and subspecies. See the model config file for all labels included and the publication for metrics.
## Model Details
This model is based on the pre-trained [eva02_large_patch14_448](https://huggingface.co/timm/eva02_large_patch14_448.mim_m38m_ft_in22k_in1k) from the timm library.
The training included several tricks to allow multilabel training with an imbalanced dataset, see the publication for details.
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** [XXXX]
- **Model type:** Image classification
- **License:** Apache 2.0
- **Finetuned from model [optional]:** [eva02_large_patch14_448](https://huggingface.co/timm/eva02_large_patch14_448.mim_m38m_ft_in22k_in1k)
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Paper [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
Identification of pinned *Cicindela* specimens.
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
This model will fail to make predictions on species not present in the FMNH collection. It is also unlikely to perform well for specimens that are not pinned.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
The model is only expected to perform well for images of pinned tiger beetles.
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
Data generated by [XXXX] using DrawerDissect on Field Museum specimens, see the publication for details.
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Training Hyperparameters
- **Training regime:** fp16 mixed precision
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
A subset of the specimens was held as a test set. See publication for details
#### Metrics
Metrics in the test set:
Dataset Overview:
- Total taxa analyzed: 193
- Species: 115 (59.6%)
- Subspecies: 78 (40.4%)
Performance Summary:
Species:
- Specimen-weighted precision: 96.8%
- Specimen-weighted recall: 80.9%
- Specimen-weighted precision: 97.0%
- Specimen-weighted recall: 96.4%
Subspecies:
- Specimen-weighted precision: 89.0%
- Specimen-weighted recall: 66.5%
- Specimen-weighted precision: 85.0%
- Specimen-weighted recall: 89.0%
## Usage
The learner can be loaded to fastai with:
```{python}
from huggingface_hub import from_pretrained_fastai
learn = from_pretrained_fastai("brunoasm/eva02_large_patch14_448.Cicindela_ID_FMNH")
```
To avoid loading a pickle file and loading the model weights only, you can use:
```{python}
import requests
import io
from fastai.vision.all import *
def load_model_from_url(learn, url):
try:
print("Downloading model...")
response = requests.get(url, stream=True)
response.raise_for_status()
buffer = io.BytesIO(response.content)
learn.load(buffer, with_opt=False)
print("Model loaded successfully!")
except Exception as e:
print(f"Error loading model: {e}")
url = 'https://huggingface.co/brunoasm/eva02_large_patch14_448.Cicindela_ID_FMNH/resolve/main/pytorch_model.bin'
learn = vision_learner(dls, "eva02_large_patch14_448.mim_m38m_ft_in22k_in1k")
response = requests.get(url, stream=True)
response.raise_for_status()
buffer = io.BytesIO(response.content)
learn.load(buffer, with_opt=False)
```
where `dls` is a previously created dataloader.
## Citation
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
[XXXX]. DrawerDissect: Whole-drawer insect imaging, segmentation, and transcription using AI.
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Model Card Authors
[XXXX].
|