Vaihingen datamodule
See original GitHub issueDescription
I would expect that with a existing Vaihingen datamodule, I only need to define a segmentation task and a pl.Trainer
to train a model on this dataset (but maybe this expectation is wrong). However, the Vaihingen dataset has variable sized image dimensions, and therefore one cannot specify a batch_size>1
because otherwise tensors cannot be stacked. So either there should be a collate function for the dataloaders in the datamodule or some comment in the documentation because the default batch_size of the datamodule is 64.
Steps to reproduce
from torchgeo.datamodules import Vaihingen2DDataModule
from torchgeo.trainers import SemanticSegmentationTask
import pytorch_lightning as pl
datamodule = Vaihingen2DDataModule(root="./data/Vaihingen")
task = SemanticSegmentationTask(
segmentation_model="unet",
encoder_name="resnet18",
encoder_weights="imagenet",
in_channels=3,
num_classes=6,
loss="jaccard",
ignore_index=None,
learning_rate=0.001,
learning_rate_schedule_patience=5
)
trainer = pl.Trainer(
fast_dev_run=True,
enable_progress_bar=False
)
trainer.fit(
model=task,
datamodule=datamodule
)
Version
0.4.0.dev0
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Fix Vaihingen datamodule #853 - microsoft/torchgeo - GitHub
This PR closes #851. As suggested, based on the OSCDDatamodule, random patch crops are taken during training. For validation and testing the ...
Read more >torchgeo.datamodules - Read the Docs
LightningDataModule implementation for the Chesapeake CVPR Land Cover dataset. Uses the random splits defined per state to partition tiles into train, val, and ......
Read more >Module:Adjacent stations/Stuttgart S-Bahn - Wikipedia
This is a data module for Module:Adjacent stations. It supports services operated by Stuttgart S-Bahn. LinesEdit. Line, Keys, Color, Hex ...
Read more >Understanding PyTorch Lightning DataModules
DataModule is a reusable and shareable class that encapsulates the DataLoaders along with the steps required to process data.
Read more >ADA146251.pdf - DTIC
synchronous operation of the LSTDM with the multirate digital data module in the AN/FCC-98 and CY-104 will also be implemented. In higher levels...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They aren’t georeferenced
There are 16 samples in the training dataset and they are more like “tiles” or “scenes”. I think the datamodule should randomly sample fixed size crops from them.
The sizes: