---
title: README
emoji: 🚀
colorFrom: blue
colorTo: green
sdk: static
pinned: false
license: mit
short_description: Official Repository of Pretrained Models on BigEarthNet v2.0
---
[TU Berlin](https://www.tu.berlin/) | [RSiM](https://rsim.berlin/) | [DIMA](https://www.dima.tu-berlin.de/menue/database_systems_and_information_management_group/) | [BigEarth](http://www.bigearth.eu/) | [BIFOLD](https://bifold.berlin/)
:---:|:---:|:---:|:---:|:---:
| | | |
# BigEarthNetv2.0 Pretrained Weights
We provide pretrained weights for several different models.
All models were trained with different seeds.
The weights for the best-performing model (based on Macro Average Precision on the recommended test split) are uploaded.
All models are available as versions using Sentinel-1 only, Sentinel-2 only or Sentinel-1 and Sentinel-2 data.
The order of bands is as follows:
For models using Sentinel-1 only: `["VH", "VV"]`
For models using Sentinel-2 only: 10m bands, 20m bands = `["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B11", "B12", "B8A"]`
For models using Sentinel-1 and Sentinel-2: 10m bands, 20m bands, S1 bands = `["B02", "B03", "B04", "B08", "B05", "B06", "B07", "B11", "B12", "B8A", "VH", "VV"]`
The output classes are always in alphabetical order:
['Agro-forestry areas', 'Arable land', 'Beaches, dunes, sands', 'Broad-leaved forest', 'Coastal wetlands',
'Complex cultivation patterns', 'Coniferous forest', 'Industrial or commercial units', 'Inland waters',
'Inland wetlands', 'Land principally occupied by agriculture, with significant areas of natural vegetation',
'Marine waters', 'Mixed forest', 'Moors, heathland and sclerophyllous vegetation',
'Natural grassland and sparsely vegetated areas', 'Pastures', 'Permanent crops', 'Transitional woodland, shrub',
'Urban fabric']
![[BigEarthNet](http://bigearth.net/)](https://raw.githubusercontent.com/wiki/lhackel-tub/ConfigILM/static/imgs/combined_2000_600_2020_0_wide.jpg)
| Model | equivalent [`timm`](https://huggingface.co/docs/timm/en/index) model name | Sentinel-1 only | Sentinel-2 only | Sentinel-1 and Sentinel-2 |
|:-----------------|:---------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
| ConvMixer-768/32 | `convmixer_768_32` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convmixer_768_32-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convmixer_768_32-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convmixer_768_32-all-v0.1.1) |
| ConvNext v2 Base | `convnextv2_base` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convnextv2_base-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convnextv2_base-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/convnextv2_base-all-v0.1.1) |
| MLP-Mixer Base | `mixer_b16_224` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mixer_b16_224-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mixer_b16_224-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mixer_b16_224-all-v0.1.1) |
| MobileViT-S | `mobilevit_s` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mobilevit_s-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mobilevit_s-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/mobilevit_s-all-v0.1.1) |
| ResNet-50 | `resnet50` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet50-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet50-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet50-all-v0.1.1) |
| ResNet-101 | `resnet101` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet101-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet101-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/resnet101-all-v0.1.1) |
| ViT Base | `vit_base_patch8_224` | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/vit_base_patch8_224-s1-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/vit_base_patch8_224-s2-v0.1.1) | [link](https://huggingface.co/BIFOLD-BigEarthNetv2-0/vit_base_patch8_224-all-v0.1.1) |
![[BigEarthNet](http://bigearth.net/)](https://raw.githubusercontent.com/wiki/lhackel-tub/ConfigILM/static/imgs/combined_2000_600_2020_0_wide.jpg)
To use the model, download the codes that define the model architecture from the
[official BigEarthNet v2.0 (reBEN) repository](https://git.tu-berlin.de/rsim/reben-training-scripts) and load the model
using the code below. Note that you have to install [`configilm`](https://pypi.org/project/configilm/) to use the
provided code.
```python
from reben_publication.BigEarthNetv2_0_ImageClassifier import BigEarthNetv2_0_ImageClassifier
model = BigEarthNetv2_0_ImageClassifier.from_pretrained("path_to/huggingface_model_folder")
```
e.g.
```python
from reben_publication.BigEarthNetv2_0_ImageClassifier import BigEarthNetv2_0_ImageClassifier
model = BigEarthNetv2_0_ImageClassifier.from_pretrained(
"BIFOLD-BigEarthNetv2-0/resnet50-s2-v0.1.1")
```
If you use any of these models in your research, please cite the following papers:
```bibtex
CITATION FOR DATASET PAPER
```
```bibtex
@article{hackel2024configilm,
title={ConfigILM: A general purpose configurable library for combining image and language models for visual question answering},
author={Hackel, Leonard and Clasen, Kai Norman and Demir, Beg{\"u}m},
journal={SoftwareX},
volume={26},
pages={101731},
year={2024},
publisher={Elsevier}
}
```