Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QIM
Tools
qim3d
Commits
10ad3d36
Commit
10ad3d36
authored
Jul 3, 2023
by
Stefan Peter Engelmann Jensen
Browse files
Options
Downloads
Patches
Plain Diff
minor change in plot_data variable definition
parent
ea35de0e
No related branches found
No related tags found
1 merge request
!2
minor change in plot_data variable definition
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
qim3d/viz/img.py
+2
-2
2 additions, 2 deletions
qim3d/viz/img.py
with
2 additions
and
2 deletions
qim3d/viz/img.py
+
2
−
2
View file @
10ad3d36
...
@@ -72,7 +72,7 @@ def grid_overview(data, num_images=7, cmap_im="gray", cmap_segm="viridis", alpha
...
@@ -72,7 +72,7 @@ def grid_overview(data, num_images=7, cmap_im="gray", cmap_segm="viridis", alpha
row_titles
=
[
"
Input images
"
,
"
Ground truth segmentation
"
,
"
Mask
"
]
row_titles
=
[
"
Input images
"
,
"
Ground truth segmentation
"
,
"
Mask
"
]
# Make new list such that possible augmentations remain identical for all three rows
# Make new list such that possible augmentations remain identical for all three rows
plot_data
=
list
(
data
[:
num_images
]
)
plot_data
=
[
data
[
idx
]
for
idx
in
range
(
num_images
)
]
fig
=
plt
.
figure
(
figsize
=
(
2
*
num_images
,
9
if
has_mask
else
6
),
constrained_layout
=
True
)
fig
=
plt
.
figure
(
figsize
=
(
2
*
num_images
,
9
if
has_mask
else
6
),
constrained_layout
=
True
)
...
@@ -168,7 +168,7 @@ def grid_pred(
...
@@ -168,7 +168,7 @@ def grid_pred(
model
.
eval
()
model
.
eval
()
# Make new list such that possible augmentations remain identical for all three rows
# Make new list such that possible augmentations remain identical for all three rows
plot_data
=
list
(
data
[:
num_images
]
)
plot_data
=
[
data
[
idx
]
for
idx
in
range
(
num_images
)
]
# Create input and target batch
# Create input and target batch
inputs
=
torch
.
stack
([
item
[
0
]
for
item
in
plot_data
],
dim
=
0
).
to
(
device
)
inputs
=
torch
.
stack
([
item
[
0
]
for
item
in
plot_data
],
dim
=
0
).
to
(
device
)
...
...
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