eurosat multiband classification problem
See original GitHub issuei have a problem running torchgeo on eurosat MS tif images i wrote a simple code :
eurosat = EuroSAT(euro_root, split="train", download=False)
# sampler = RandomGeoSampler(eurosat, size=64, length=10000)
# dataloader = DataLoader(eurosat, batch_size=128, sampler=sampler, collate_fn=stack_samples)
dataloader = DataLoader(eurosat, batch_size=128, collate_fn=stack_samples)
num_classes = 10
channels = 13
num_workers = 4
batch_size = 4
backbone = "resnet50"
weights = "imagenet"
lr = 0.01
lr_schedule_patience = 5
epochs = 50
datamodule = EuroSATDataModule(
root_dir=euro_root,
batch_size=batch_size,
num_workers=num_workers,
)
task = ClassificationTask(
classification_model=backbone,
weights=weights,
num_classes=num_classes,
in_channels=channels,
loss="ce",
learning_rate=lr,
learning_rate_schedule_patience=lr_schedule_patience
)
checkpoint_callback = pl.callbacks.ModelCheckpoint(
monitor="val_loss",
save_top_k=1,
save_last=True,
)
early_stopping_callback = pl.callbacks.EarlyStopping(
monitor="val_loss",
min_delta=0.00,
patience=10,
)
# Train
trainer = pl.Trainer(
callbacks=[checkpoint_callback, early_stopping_callback],
max_epochs=epochs
)
trainer.fit(model=task, datamodule=datamodule)
but i get this error on fit line :
.........
_pickle.PicklingError: Can't pickle <class 'nn.BatchNorm2d.BatchNorm2d'>: import of module 'nn.BatchNorm2d' failed
..........
OSError: [Errno 22] Invalid argument: 'C:\\Users\\mohsc\\PycharmProjects\\pythonProject\\<input>'
am i missing a preparing step or something ? help would be appreciated, by the way tutorials are still lacking essential sample codes and documentations like this issue on MS images. thanks
Issue Analytics
- State:
- Created a year ago
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Deep Transfer Learning for Land Use and Land Cover ... - MDPI
In this study, the challenge of LULC classification was addressed using deep transfer learning techniques. For this task, two prominent transfer learning ...
Read more >Issues · microsoft/torchgeo - GitHub
Issues list ; Using VHR10 dataset with AugmentationSequential datasets Geospatial or benchmark datasets. #894 opened ; eurosat multiband classification problem ...
Read more >Land Cover Classification with EuroSAT Dataset - Kaggle
In this notebook we will tackle the problem of land-use and land-cover classification where we try to identify the class of given remote...
Read more >Efficient Convolutional Neural Networks for Multi-Spectral ...
In this case the image was correctly classified both when using RGB bands and 10 spectral bands.
Read more >Classification Performance of Land Use from Multispectral ...
Forest and Support Vector Machine Using EuroSAT Data ... classification problem can be separated into classes that.
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
i will try on linux and report back
This is likely a multiprocessing issue. The reason @calebrob6 can’t reproduce this is because multiprocessing uses a different start method on macOS/Windows vs. Linux: https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
If I’m correct, I should be able to reproduce this on macOS. Let me give it a shot.