File size: 4,351 Bytes
0959936
3a6d0ff
 
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0959936
 
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
 
 
0959936
 
 
3a6d0ff
0959936
3a6d0ff
 
 
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
 
 
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
 
 
 
 
 
 
 
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
 
 
 
0959936
3a6d0ff
 
 
 
 
 
 
 
0959936
3a6d0ff
0959936
3a6d0ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0959936
 
3a6d0ff
 
 
 
 
 
 
 
 
 
 
0959936
3a6d0ff
0959936
3a6d0ff
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
---
language:
- en
license: gemma
library_name: jax
pipeline_tag: image-text-to-text
tags:
- gemma
- earth-observation
- remote-sensing
- satellite-imagery
- lora
- jax
- tunix
base_model: google/gemma-3-4b-it
datasets:
- akshaydudhane/EarthDial-Dataset
metrics:
- exact_match
- precision
- recall
- f1
- jaccard
---

# Gemma Earth (Gemma 3 4B IT LoRA for Earth Observation)

## Model Description

Gemma Earth is a domain-adapted Earth Observation model built by fine-tuning Google Gemma 3 4B IT with LoRA adapters for satellite scene understanding.

The current release focuses on multi-label land-use and land-cover classification from the EarthDial BigEarthNet subset, with a pipeline designed to extend to additional EarthDial tasks.

This project provides an end-to-end JAX stack pipeline for dataset preparation, LoRA fine-tuning, checkpointing, evaluation, and inference serving.

Project repository: https://github.com/haruiz/gemma_earth

- Base model: google/gemma-3-4b-it
- Adaptation: LoRA
- Training stack: JAX + Flax (NNX) + Tunix + Qwix + Optax + Orbax + Grain
- Primary task: remote-sensing scene classification (multi-label)

## Intended Use

### Primary Use

- Earth Observation and remote-sensing research
- Multi-label scene classification on EarthDial/BigEarthNet-style samples
- Benchmarking and experimentation with TPU-based JAX fine-tuning workflows



## Training Data

- Dataset source: akshaydudhane/EarthDial-Dataset
- Current focus: EarthDial classification subset (BigEarthNet)
- Training setup in this project uses sampled subsets and validation splits configured via environment variables

## Training Procedure

- Hardware: Google Cloud TPU v5litepod-8
- LoRA configuration (default project setup):
  - Rank: 32
  - Alpha: 64.0
- Typical sequence length: 768
- Optimizer schedule includes warmup + decay (Optax)

## Evaluation Summary

Benchmark run size: 1500 samples

| Metric | Baseline | Fine-tuned | Delta (absolute) |
| --- | ---: | ---: | ---: |
| Exact Match | 2.53% | 22.80% | +20.27 pp |
| Sample Precision | 27.27% | 68.53% | +41.27 pp |
| Sample Recall | 10.35% | 71.86% | +61.51 pp |
| Sample F1 | 14.18% | 68.16% | +53.98 pp |
| Sample Jaccard | 10.35% | 57.47% | +47.12 pp |
| Micro Precision | 29.57% | 63.56% | +33.99 pp |
| Micro Recall | 9.25% | 67.00% | +57.75 pp |
| Micro F1 | 14.09% | 65.24% | +51.15 pp |
| Macro F1 | 6.53% | 31.50% | +24.97 pp |

The adapted model significantly improves over baseline across all reported metrics.

## How To Use

This model is intended to be used with the Gemma Earth codebase.

~~~bash
# Example: run one-image evaluation using a Hugging Face checkpoint directory
python scripts/one_example_eval.py \
  --model-checkpoint-source huggingface \
  --model-dir /path/to/hf_checkpoint_dir \
  --image-path /path/to/image.jpg
~~~

~~~bash
# Example: run benchmark evaluation with Hugging Face checkpoint source
python main.py benchmark \
  --num-examples 1500 \
  --eval-restore-policy permissive \
  --model-checkpoint-source huggingface
~~~
## Citation

If you use this model, please cite:

~~~bibtex
@misc{gemma_earth_2026,
  title={Gemma Earth: Fine-tuning Gemma for Remote Sensing Scene Classification},
  author={Henry Ruiz},
  year={2026},
  howpublished={GitHub repository},
  url={https://github.com/haruiz/gemma_earth},
}
~~~

Related references:

~~~bibtex
@misc{soni2024earthdial,
  title={EarthDial: Turning Multi-sensory Earth Observations to Interactive Dialogues},
  author={Soni, Sagar and Dudhane, Akshay and Debary, Hiyam and Fiaz, Mustansar and Munir, Muhammad Akhtar and Danish, Muhammad Sohail and Fraccaro, Paolo and Watson, Campbell D and others},
  year={2024},
  eprint={2412.15190},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  doi={10.48550/arXiv.2412.15190},
  url={https://arxiv.org/abs/2412.15190}
}

@misc{sumbul2019bigearthnet,
  title={BigEarthNet: A Large-Scale Benchmark Archive For Remote Sensing Image Understanding},
  author={Sumbul, Gencer and Charfuelan, Marcela and Demir, Beg{"u}m and Markl, Volker},
  year={2019},
  eprint={1902.06148},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  doi={10.48550/arXiv.1902.06148},
  url={https://arxiv.org/abs/1902.06148}
}
~~~

## Model And License Notes

This model is derived from Gemma 3 4B IT. Use must comply with the Gemma license and any applicable dataset terms.