Skip to content

Commit f587d9a

Browse files
authored
Merge branch 'microsoft:main' into oodxbd
2 parents ae33510 + 259c03e commit f587d9a

File tree

685 files changed

+17982
-3026
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

685 files changed

+17982
-3026
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "Torchgeo DevContainer",
44
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
5-
"image": "mcr.microsoft.com/devcontainers/python:3.12",
5+
"image": "mcr.microsoft.com/devcontainers/python:3.13",
66

77
// Features to add to the dev container. More info: https://containers.dev/features.
88
"features": {

.github/workflows/deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
- name: Clone repo
1212
uses: actions/checkout@v4.2.2
1313
- name: Set up python
14-
uses: actions/setup-python@v5.3.0
14+
uses: actions/setup-python@v5.5.0
1515
with:
16-
python-version: '3.12'
16+
python-version: '3.13'
1717
- name: Install pip dependencies
1818
run: pip install build
1919
- name: List pip dependencies
2020
run: pip list
2121
- name: Build project
2222
run: python3 -m build
2323
- name: Upload artifacts
24-
uses: actions/upload-artifact@v4.6.0
24+
uses: actions/upload-artifact@v4.6.2
2525
with:
2626
name: pypi-dist
2727
path: dist/
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
steps:
3939
- name: Download artifacts
40-
uses: actions/download-artifact@v4.1.8
40+
uses: actions/download-artifact@v4.2.1
4141
with:
4242
name: pypi-dist
4343
path: dist/

.github/workflows/release.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
uses: actions/checkout@v4.2.2
1919
- name: Set up python
2020
id: setup-python
21-
uses: actions/setup-python@v5.3.0
21+
uses: actions/setup-python@v5.5.0
2222
with:
23-
python-version: '3.12'
23+
python-version: '3.13'
2424
- name: Cache dependencies
25-
uses: actions/cache@v4.2.0
25+
uses: actions/cache@v4.2.3
2626
id: cache
2727
with:
2828
path: ${{ env.pythonLocation }}
@@ -36,7 +36,8 @@ jobs:
3636
run: pip list
3737
- name: Run integration checks
3838
run: |
39-
pytest -m slow --durations=10
39+
pytest -m slow --durations=10 tests/samplers
40+
pytest -m slow --durations=10 tests/trainers
4041
python -m torchgeo --help
4142
torchgeo --help
4243
notebooks:
@@ -47,24 +48,24 @@ jobs:
4748
uses: actions/checkout@v4.2.2
4849
- name: Set up python
4950
id: setup-python
50-
uses: actions/setup-python@v5.3.0
51+
uses: actions/setup-python@v5.5.0
5152
with:
52-
python-version: '3.12'
53+
python-version: '3.13'
5354
- name: Cache dependencies
54-
uses: actions/cache@v4.2.0
55+
uses: actions/cache@v4.2.3
5556
id: cache
5657
with:
5758
path: ${{ env.pythonLocation }}
5859
key: ${{ runner.os }}-${{ runner.arch }}-Python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}-tutorials
5960
- name: Install pip dependencies
6061
if: steps.cache.outputs.cache-hit != 'true'
6162
run: |
62-
pip install .[docs,tests] planetary_computer pystac tensorboard
63+
pip install .[docs,tests] planetary_computer pystac tensorboard h5py scikit-learn
6364
pip cache purge
6465
- name: List pip dependencies
6566
run: pip list
6667
- name: Run notebook checks
6768
run: pytest --nbmake --durations=10 docs/tutorials
6869
concurrency:
6970
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
70-
cancel-in-progress: true
71+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/style.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
uses: actions/checkout@v4.2.2
2121
- name: Set up python
2222
id: setup-python
23-
uses: actions/setup-python@v5.3.0
23+
uses: actions/setup-python@v5.5.0
2424
with:
25-
python-version: '3.12'
25+
python-version: '3.13'
2626
- name: Cache dependencies
27-
uses: actions/cache@v4.2.0
27+
uses: actions/cache@v4.2.3
2828
id: cache
2929
with:
3030
path: ${{ env.pythonLocation }}
@@ -46,11 +46,11 @@ jobs:
4646
uses: actions/checkout@v4.2.2
4747
- name: Set up python
4848
id: setup-python
49-
uses: actions/setup-python@v5.3.0
49+
uses: actions/setup-python@v5.5.0
5050
with:
51-
python-version: '3.12'
51+
python-version: '3.13'
5252
- name: Cache dependencies
53-
uses: actions/cache@v4.2.0
53+
uses: actions/cache@v4.2.3
5454
id: cache
5555
with:
5656
path: ${{ env.pythonLocation }}
@@ -73,7 +73,7 @@ jobs:
7373
- name: Clone repo
7474
uses: actions/checkout@v4.2.2
7575
- name: Set up nodejs
76-
uses: actions/setup-node@v4.2.0
76+
uses: actions/setup-node@v4.4.0
7777
with:
7878
node-version: '20'
7979
cache: 'npm'
@@ -88,4 +88,4 @@ jobs:
8888
run: npx prettier --check .
8989
concurrency:
9090
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
91-
cancel-in-progress: true
91+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/tests.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest, macos-latest, windows-latest]
21-
python-version: ['3.10', '3.11', '3.12']
21+
python-version: ['3.11', '3.12', '3.13']
2222
steps:
2323
- name: Clone repo
2424
uses: actions/checkout@v4.2.2
2525
- name: Set up python
2626
id: setup-python
27-
uses: actions/setup-python@v5.3.0
27+
uses: actions/setup-python@v5.5.0
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030
- name: Cache dependencies
31-
uses: actions/cache@v4.2.0
31+
uses: actions/cache@v4.2.3
3232
id: cache
3333
with:
3434
path: ${{ env.pythonLocation }}
@@ -46,7 +46,7 @@ jobs:
4646
pytest --cov=torchgeo --cov-report=xml
4747
python3 -m torchgeo --help
4848
- name: Report coverage
49-
uses: codecov/codecov-action@v5.3.1
49+
uses: codecov/codecov-action@v5.4.2
5050
with:
5151
token: ${{ secrets.CODECOV_TOKEN }}
5252
minimum:
@@ -57,11 +57,11 @@ jobs:
5757
uses: actions/checkout@v4.2.2
5858
- name: Set up python
5959
id: setup-python
60-
uses: actions/setup-python@v5.3.0
60+
uses: actions/setup-python@v5.5.0
6161
with:
62-
python-version: '3.10'
62+
python-version: '3.11'
6363
- name: Cache dependencies
64-
uses: actions/cache@v4.2.0
64+
uses: actions/cache@v4.2.3
6565
id: cache
6666
with:
6767
path: ${{ env.pythonLocation }}
@@ -78,7 +78,7 @@ jobs:
7878
pytest --cov=torchgeo --cov-report=xml
7979
python3 -m torchgeo --help
8080
- name: Report coverage
81-
uses: codecov/codecov-action@v5.3.1
81+
uses: codecov/codecov-action@v5.4.2
8282
with:
8383
token: ${{ secrets.CODECOV_TOKEN }}
8484
datasets:
@@ -89,11 +89,11 @@ jobs:
8989
uses: actions/checkout@v4.2.2
9090
- name: Set up python
9191
id: setup-python
92-
uses: actions/setup-python@v5.3.0
92+
uses: actions/setup-python@v5.5.0
9393
with:
94-
python-version: '3.12'
94+
python-version: '3.13'
9595
- name: Cache dependencies
96-
uses: actions/cache@v4.2.0
96+
uses: actions/cache@v4.2.3
9797
id: cache
9898
with:
9999
path: ${{ env.pythonLocation }}
@@ -110,9 +110,9 @@ jobs:
110110
pytest --cov=torchgeo --cov-report=xml
111111
python3 -m torchgeo --help
112112
- name: Report coverage
113-
uses: codecov/codecov-action@v5.3.1
113+
uses: codecov/codecov-action@v5.4.2
114114
with:
115115
token: ${{ secrets.CODECOV_TOKEN }}
116116
concurrency:
117117
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
118-
cancel-in-progress: true
118+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.github/workflows/tutorials.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ jobs:
2222
uses: actions/checkout@v4.2.2
2323
- name: Set up python
2424
id: setup-python
25-
uses: actions/setup-python@v5.3.0
25+
uses: actions/setup-python@v5.5.0
2626
with:
27-
python-version: '3.12'
27+
python-version: '3.13'
2828
- name: Cache dependencies
29-
uses: actions/cache@v4.2.0
29+
uses: actions/cache@v4.2.3
3030
id: cache
3131
with:
3232
path: ${{ env.pythonLocation }}
3333
key: ${{ runner.os }}-${{ runner.arch }}-Python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements/required.txt', 'requirements/docs.txt', 'requirements/tests.txt') }}-tutorials
3434
- name: Install pip dependencies
3535
if: steps.cache.outputs.cache-hit != 'true'
3636
run: |
37-
pip install -r requirements/required.txt -r requirements/docs.txt -r requirements/tests.txt planetary_computer pystac tensorboard .
37+
pip install -r requirements/required.txt -r requirements/docs.txt -r requirements/tests.txt planetary_computer pystac tensorboard h5py scikit-learn .
3838
pip cache purge
3939
- name: List pip dependencies
4040
run: pip list
4141
- name: Run notebook checks
4242
run: pytest --nbmake --durations=10 docs/tutorials
4343
concurrency:
4444
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
45-
cancel-in-progress: true
45+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ repos:
2929
- pillow>=10.4.0
3030
- pytest>=6.1.2
3131
- scikit-image>=0.22.0
32+
- timm>=1.0.15
3233
- torch>=2.6
33-
- torchmetrics>=0.10
34+
- torchmetrics>=1.6.2
3435
- torchvision>=0.18
3536
exclude: (build|data|dist|logo|logs|output)/
3637
- repo: https://github.com/pre-commit/mirrors-prettier

.readthedocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ version: 2
88
build:
99
os: ubuntu-lts-latest
1010
tools:
11+
# Sphinx 6.1 and older do not support Python 3.13+
1112
python: '3.12'
1213

1314
# Configuration of the Python environment to be used

CITATION.cff

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,14 @@ preferred-citation:
2929
given-names: 'Juan M.'
3030
- family-names: 'Banerjee'
3131
given-names: 'Arindam'
32-
collection-title: 'Proceedings of the 30th International Conference on Advances in Geographic Information Systems'
33-
collection-type: 'proceedings'
34-
conference:
35-
city: 'Seattle'
36-
name: "SIGSPATIAL '22"
37-
region: 'Washington'
38-
doi: '10.1145/3557915.3560953'
39-
end: 12
40-
isbn: '9781450395298'
41-
month: 11
42-
number: 19
32+
doi: '10.1145/3707459'
33+
issn: '2374-0353'
34+
journal: 'ACM Transactions on Spatial Algorithms and Systems'
35+
month: 12
4336
publisher:
4437
name: 'Association for Computing Machinery'
45-
start: 1
4638
title: 'TorchGeo: Deep Learning With Geospatial Data'
47-
type: 'conference-paper'
48-
url: 'https://dl.acm.org/doi/10.1145/3557915.3560953'
49-
year: 2022
39+
type: 'article'
40+
url: 'https://doi.org/10.1145/3707459'
41+
year: 2024
5042
title: 'TorchGeo: Deep Learning With Geospatial Data'

README.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ dataloader = DataLoader(
139139

140140
# Training loop
141141
for batch in dataloader:
142-
images = batch["image"] # list of images
143-
boxes = batch["boxes"] # list of boxes
144-
labels = batch["labels"] # list of labels
145-
masks = batch["masks"] # list of masks
142+
image = batch["image"] # list of images
143+
bbox_xyxy = batch["bbox_xyxy"] # list of boxes
144+
label = batch["label"] # list of labels
145+
mask = batch["mask"] # list of masks
146146

147147
# train a model, or make predictions using a pre-trained model
148148
```
@@ -177,11 +177,8 @@ task = SemanticSegmentationTask(
177177
backbone="resnet50",
178178
weights=True,
179179
in_channels=3,
180-
num_classes=2,
181-
loss="ce",
182-
ignore_index=None,
183-
lr=0.1,
184-
patience=6,
180+
task="binary",
181+
loss="bce",
185182
)
186183
trainer = Trainer(default_root_dir="...")
187184

@@ -254,21 +251,17 @@ See the [Lightning documentation](https://lightning.ai/docs/pytorch/stable/cli/l
254251

255252
## Citation
256253

257-
If you use this software in your work, please cite our [paper](https://dl.acm.org/doi/10.1145/3557915.3560953):
254+
If you use this software in your work, please cite our [paper](https://doi.org/10.1145/3707459):
258255

259256
```bibtex
260-
@inproceedings{Stewart_TorchGeo_Deep_Learning_2022,
261-
address = {Seattle, Washington},
257+
@article{Stewart_TorchGeo_Deep_Learning_2024,
262258
author = {Stewart, Adam J. and Robinson, Caleb and Corley, Isaac A. and Ortiz, Anthony and Lavista Ferres, Juan M. and Banerjee, Arindam},
263-
booktitle = {Proceedings of the 30th International Conference on Advances in Geographic Information Systems},
264-
doi = {10.1145/3557915.3560953},
265-
month = nov,
266-
pages = {1--12},
267-
publisher = {Association for Computing Machinery},
268-
series = {SIGSPATIAL '22},
259+
doi = {10.1145/3707459},
260+
journal = {ACM Transactions on Spatial Algorithms and Systems},
261+
month = dec,
269262
title = {{TorchGeo}: Deep Learning With Geospatial Data},
270-
url = {https://dl.acm.org/doi/10.1145/3557915.3560953},
271-
year = {2022}
263+
url = {https://doi.org/10.1145/3707459},
264+
year = {2024}
272265
}
273266
```
274267

docs/api/datamodules.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ QuakeSet
180180

181181
.. autoclass:: QuakeSetDataModule
182182

183+
ReforesTree
184+
^^^^^^^^^^^
185+
186+
.. autoclass:: ReforesTreeDataModule
187+
183188
RESISC45
184189
^^^^^^^^
185190

@@ -218,6 +223,11 @@ SSL4EO-L Benchmark
218223

219224
.. autoclass:: SSL4EOLBenchmarkDataModule
220225

226+
Substation
227+
^^^^^^^^^^
228+
229+
.. autoclass:: SubstationDataModule
230+
221231
SustainBench Crop Yield
222232
^^^^^^^^^^^^^^^^^^^^^^^
223233

0 commit comments

Comments
 (0)