
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# provazioboia2dinov2-large-2024_02_15-with_data_aug_batch-size32_epochs1_freeze

DinoVd'eau is a fine-tuned version of [facebook/dinov2-large](https://huggingface.co/facebook/dinov2-large) on the multilabel_complete_dataset dataset.
It achieves the following results on the evaluation set:
- Loss: 0.7243
- F1 Micro: 0.2538
- F1 Macro: 0.1318
- Roc Auc: 0.4633
- Accuracy: 0.0
- Learning Rate: 0.001

## Model description

DinoVd'eau is a model built on top of dinov2 model for underwater multilabel image classification.The classification head is a combination of linear, ReLU, batch normalization, and dropout layers.
- **Developed by:** [lombardata](https://huggingface.co/lombardata), credits to [César Leblanc](https://huggingface.co/CesarLeblanc)

## Intended uses & limitations

You can use the raw model for classify diverse marine species, encompassing coral morphotypes classes taken from the Global Coral Reef Monitoring Network (GCRMN), habitats classes and seagrass species.

## Training and evaluation data

TDetails on the number of images for each class are given in the following table:
 |  |train |val |test |Total |
 |--- | --- | --- | --- | --- | 
 | Acropore_branched | 804 | 202 | 200 | 1206 | 
 | Acropore_digitised | 465 | 108 | 101 | 674 | 
 | Acropore_tabular | 964 | 276 | 267 | 1507 | 
 | Algae_assembly | 2172 | 692 | 698 | 3562 | 
 | Algae_limestone | 1327 | 439 | 441 | 2207 | 
 | Algae_sodding | 2079 | 676 | 671 | 3426 | 
 | Dead_coral | 1126 | 358 | 355 | 1839 | 
 | Fish | 874 | 243 | 242 | 1359 | 
 | Human_object | 407 | 135 | 136 | 678 | 
 | Living_coral | 1765 | 580 | 571 | 2916 | 
 | Millepore | 350 | 119 | 102 | 571 | 
 | No_acropore_encrusting | 411 | 142 | 129 | 682 | 
 | No_acropore_foliaceous | 212 | 34 | 39 | 285 | 
 | No_acropore_massive | 921 | 317 | 310 | 1548 | 
 | No_acropore_sub_massive | 1205 | 362 | 363 | 1930 | 
 | Rock | 3736 | 1218 | 1217 | 6171 | 
 | Sand | 3594 | 1202 | 1194 | 5990 | 
 | Scrap | 2121 | 724 | 741 | 3586 | 
 | Sea_cucumber | 781 | 254 | 265 | 1300 | 
 | Sea_urchins | 189 | 60 | 72 | 321 | 
 | Sponge | 226 | 75 | 88 | 389 | 
 | Syringodium_isoetifolium | 1171 | 386 | 392 | 1949 | 
 | Thalassodendron_ciliatum | 783 | 261 | 260 | 1304 | 
 | Useless | 587 | 195 | 195 | 977 | 


## Training procedure

### Data Augmentation

Data were augmented using the following transformations :
- training transformations : Sequential(
  (0): PreProcess()
  (1): Resize(output_size=(518, 518), p=1.0, p_batch=1.0, same_on_batch=True, size=(518, 518), side=short, resample=bilinear, align_corners=True, antialias=False)
  (2): RandomHorizontalFlip(p=0.25, p_batch=1.0, same_on_batch=False)
  (3): RandomVerticalFlip(p=0.25, p_batch=1.0, same_on_batch=False)
  (4): ColorJiggle(brightness=0.0, contrast=0.0, saturation=0.0, hue=0.0, p=0.25, p_batch=1.0, same_on_batch=False)
  (5): RandomPerspective(distortion_scale=0.5, p=0.25, p_batch=1.0, same_on_batch=False, align_corners=False, resample=bilinear)
  (6): Normalize(p=1.0, p_batch=1.0, same_on_batch=True, mean=tensor([0.4850, 0.4560, 0.4060]), std=tensor([0.2290, 0.2240, 0.2250]))
) 
- validation transformations : Sequential(
  (0): PreProcess()
  (1): Resize(output_size=(518, 518), p=1.0, p_batch=1.0, same_on_batch=True, size=(518, 518), side=short, resample=bilinear, align_corners=True, antialias=False)
  (2): Normalize(p=1.0, p_batch=1.0, same_on_batch=True, mean=tensor([0.4850, 0.4560, 0.4060]), std=tensor([0.2290, 0.2240, 0.2250]))
)

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: ReduceLROnPlateau with a patience of 5 epochs and a factor of 0.1
- freeze_encoder: True
- num_epochs: 1

### Training results

| Training Loss | Epoch | Step | Validation Loss | F1 Micro | F1 Macro | Roc Auc | Accuracy | Rate  |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:-------:|:--------:|:-----:|
| No log        | 1.0   | 1    | 0.7411          | 0.1885   | 0.1109   | 0.3925  | 0.0      | 0.001 |


### Framework versions

- Transformers 4.36.2
- Pytorch 2.1.0+cu118
- Datasets 2.14.5
- Tokenizers 0.15.0

{"language": ["eng"], "license": "apache-2.0", "tags": ["multilabel-image-classification", "multilabel", "generated_from_trainer"], "metrics": ["accuracy"], "base_model": "facebook/dinov2-large", "model-index": [{"name": "provazioboia2dinov2-large-2024_02_15-with_data_aug_batch-size32_epochs1_freeze", "results": []}]}
transformers tensorboard safetensors dinov2 multilabel-image-classification multilabel generated_from_trainer eng base_model:facebook/dinov2-large license:apache-2.0 endpoints_compatible region:us