Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PySegCNN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
earth_observation_public
PySegCNN
Commits
bf590e6b
Commit
bf590e6b
authored
4 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Removed the date option for plot_sample.
parent
3a60f332
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pysegcnn/core/graphics.py
+4
-17
4 additions, 17 deletions
pysegcnn/core/graphics.py
with
4 additions
and
17 deletions
pysegcnn/core/graphics.py
+
4
−
17
View file @
bf590e6b
...
...
@@ -156,7 +156,6 @@ def plot_sample(x, use_bands, labels,
y
=
None
,
y_pred
=
{},
accuracy
=
False
,
date
=
None
,
figsize
=
(
16
,
9
),
bands
=
[
'
nir
'
,
'
red
'
,
'
green
'
],
alpha
=
0
,
...
...
@@ -191,9 +190,6 @@ def plot_sample(x, use_bands, labels,
accuracy : `bool`, optional
Whether to calculate the accuracy of the predictions ``y_pred`` with
respect to the ground truth ``y``. The default is `False`
date : :py:class:`datetime.datetime` or `None`
The date of the sample. If specified, ``date`` is plotted as title of
the FCC. The default is `None`, i.e. ``date`` is not used as title.
figsize : `tuple`, optional
The figure size in centimeters. The default is `(16, 9)`.
bands : `list` [`str`], optional
...
...
@@ -232,9 +228,6 @@ def plot_sample(x, use_bands, labels,
-------
fig : :py:class:`matplotlib.figure.Figure`
An instance of :py:class:`matplotlib.figure.Figure`.
ax : :py:class:`numpy.ndarray`
A :py:class:`numpy.ndarray` of
:py:class:`matplotlib.axes._subplots.AxesSubplot` instances.
"""
# check whether the output path is valid
...
...
@@ -281,16 +274,10 @@ def plot_sample(x, use_bands, labels,
# plot false color composite
fig
.
axes
[
0
].
imshow
(
rgb
)
# check which title to set
if
date
is
None
:
fig
.
axes
[
0
].
text
(
0.5
,
1.04
,
'
R = {}, G = {}, B = {}
'
.
format
(
*
bands
),
transform
=
fig
.
axes
[
0
].
transAxes
,
ha
=
'
center
'
,
va
=
'
bottom
'
)
else
:
fig
.
axes
[
0
].
text
(
0.5
,
1.04
,
datetime
.
datetime
.
strftime
(
date
,
'
%Y-%m-%d
'
),
transform
=
fig
.
axes
[
0
].
transAxes
,
ha
=
'
center
'
,
va
=
'
bottom
'
)
# set title
fig
.
axes
[
0
].
text
(
0.5
,
1.04
,
'
R = {}, G = {}, B = {}
'
.
format
(
*
bands
),
transform
=
fig
.
axes
[
0
].
transAxes
,
ha
=
'
center
'
,
va
=
'
bottom
'
)
# check whether to plot ground truth
if
y
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment