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

Changed default format from png to pdf.

parent b8030ead
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ from pysegcnn.core.trainer import DatasetConfig
from pysegcnn.core.graphics import plot_class_distribution
from pysegcnn.core.logging import log_conf
from pysegcnn.plot.plot_config import (PLOT_PATH, BANDS, FIGSIZE, ALPHA,
DATASETS, DPI)
DATASETS)
if __name__ == '__main__':
......@@ -42,5 +42,5 @@ if __name__ == '__main__':
fig = plot_class_distribution(ds, FIGSIZE, ALPHA)
# save figure
filename = PLOT_PATH.joinpath('{}_sdist.png'.format(name))
fig.savefig(filename, dpi=DPI, bbox_inches='tight')
filename = PLOT_PATH.joinpath('{}_sdist.pdf'.format(name))
fig.savefig(filename, bbox_inches='tight')
......@@ -23,7 +23,7 @@ from pysegcnn.core.trainer import DatasetConfig
from pysegcnn.core.graphics import plot_sample
from pysegcnn.core.logging import log_conf
from pysegcnn.plot.plot_config import (PLOT_PATH, BANDS, FIGSIZE, ALPHA,
DATASETS, PLOT_BANDS, DPI)
DATASETS, PLOT_BANDS)
# module level logger
LOGGER = logging.getLogger(__name__)
......@@ -57,5 +57,5 @@ if __name__ == '__main__':
alpha=ALPHA, figsize=FIGSIZE)
# save the figure
fig.savefig(PLOT_PATH.joinpath('.'.join([scene_id, 'png'])),
dpi=DPI, bbox_inches='tight')
fig.savefig(PLOT_PATH.joinpath('.'.join([scene_id, 'pdf'])),
bbox_inches='tight')
......@@ -29,8 +29,8 @@ if not PLOT_PATH.exists():
# path to the datasets on the current machine
# DRIVE_PATH = pathlib.Path('C:/Eurac/Projects/CCISNOW/Datasets/')
# DRIVE_PATH = pathlib.Path('F:/Studium/SS 2020/Datasets/')
DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets') # nopep8
DRIVE_PATH = pathlib.Path('F:/Studium/SS 2020/Datasets/')
# DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets') # nopep8
# DRIVE_PATH = pathlib.Path('/home/dfrisinghelli/Datasets')
# name and paths to the datasets
......@@ -42,15 +42,14 @@ DATASETS = {'Sparcs': {'root_dir': DRIVE_PATH.joinpath('Sparcs'),
'merge_labels': {'Cirrus': 'Cloud',
'Not_used': 'No_data'},
'gt_pattern': '(.*)Labels\\.tif'}
}
}
# spectral bands to plot distribution
BANDS = ['blue', 'green', 'red', 'nir', 'swir1', 'swir2']
# plot parameters
FIGSIZE = (16, 9)
FIGSIZE = (10, 10)
ALPHA = 0.5
DPI = 300
# natural with atmospheric removal
PLOT_BANDS = ['swir2', 'nir', 'green']
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