Skip to content
Snippets Groups Projects
Commit cd2b660a authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Renamed file

parent 598a7fa5
No related branches found
No related tags found
No related merge requests found
...@@ -15,16 +15,23 @@ import torch ...@@ -15,16 +15,23 @@ import torch
sys.path.append('..') sys.path.append('..')
# local modules # local modules
from pytorch.dataset import SparcsDataset from pytorch.dataset import SparcsDataset, Cloud95Dataset
from pytorch.trainer import NetworkTrainer from pytorch.trainer import NetworkTrainer
from pytorch.models import SegNet from pytorch.models import SegNet
from main.config import (dataset_path, bands, tile_size, tvratio, filters, from main.config import (dataset_name, dataset_path, bands, tile_size, tvratio,
skip_connection, kwargs, loss_function, optimizer, filters, skip_connection, kwargs, loss_function,
lr, ttratio, batch_size, seed) optimizer, lr, ttratio, batch_size, seed, patches)
# check which dataset the model is trained on
# instanciate the SparcsDataset class if dataset_name == 'Sparcs':
dataset = SparcsDataset(dataset_path, bands, tile_size) # instanciate the SparcsDataset
dataset = SparcsDataset(dataset_path, use_bands=bands, tile_size=tile_size)
elif dataset_name == 'Cloud95':
dataset = Cloud95Dataset(dataset_path, use_bands=bands,
tile_size=tile_size, exclude=patches)
else:
raise ValueError('{} is not a valid dataset. Available datasets are '
'"Sparcs" and "Cloud95".'.format(dataset_name))
# print the bands used for the segmentation # print the bands used for the segmentation
print('------------------------ Input bands -----------------------------') print('------------------------ Input bands -----------------------------')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment