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
Compare revisions
3c302a7810e0d5fb0441439fb8f5576926f756db to 3e1468bdd46b73f043ff3bd52203d427bb43b398
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
QIM/tools/qim3d
Select target project
No results found
3e1468bdd46b73f043ff3bd52203d427bb43b398
Select Git revision
Branches
3D_UNet
3d_watershed
conv_zarr_tiff_folders
convert_tiff_folders
layered_surface_segmentation
main
memmap_txrm
notebook_update
notebooks
notebooksv1
optimize_scaleZYXdask
save_files_function
scaleZYX_mean
test
threshold-exploration
tr_val_te_splits
Tags
v0.2.0
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.3.9
v0.4.0
v0.4.1
24 results
Swap
Target
QIM/tools/qim3d
Select target project
QIM/tools/qim3d
1 result
3c302a7810e0d5fb0441439fb8f5576926f756db
Select Git revision
Branches
3D_UNet
3d_watershed
conv_zarr_tiff_folders
convert_tiff_folders
layered_surface_segmentation
main
memmap_txrm
notebook_update
notebooks
notebooksv1
optimize_scaleZYXdask
save_files_function
scaleZYX_mean
test
threshold-exploration
tr_val_te_splits
Tags
v0.2.0
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.3.9
v0.4.0
v0.4.1
24 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Hotfix: Torch dependency
· 9278a1ef
fima
authored
5 months ago
9278a1ef
Merge remote-tracking branch 'refs/remotes/origin/main'
· 3e1468bd
fima
authored
5 months ago
3e1468bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
qim3d/viz/_metrics.py
+14
-11
14 additions, 11 deletions
qim3d/viz/_metrics.py
with
14 additions
and
11 deletions
qim3d/viz/_metrics.py
View file @
3e1468bd
...
...
@@ -6,9 +6,9 @@ import matplotlib.pyplot as plt
from
matplotlib.colors
import
LinearSegmentedColormap
from
matplotlib
import
colormaps
from
qim3d.utils._logger
import
log
import
torch
import
matplotlib
def
plot_metrics
(
*
metrics
:
tuple
[
dict
[
str
,
float
]],
linestyle
:
str
=
"
-
"
,
...
...
@@ -81,12 +81,12 @@ def plot_metrics(
def
grid_overview
(
data
:
list
|
torch
.
utils
.
data
.
Dataset
,
data
:
list
,
num_images
:
int
=
7
,
cmap_im
:
str
=
"
gray
"
,
cmap_segm
:
str
=
"
viridis
"
,
alpha
:
float
=
0.5
,
show
:
bool
=
False
show
:
bool
=
False
,
)
->
matplotlib
.
figure
.
Figure
:
"""
Displays an overview grid of images, labels, and masks (if they exist).
...
...
@@ -121,6 +121,7 @@ def grid_overview(
and the length of the data.
- The grid layout and dimensions vary based on the presence of a mask.
"""
import
torch
# Check if data has a mask
has_mask
=
len
(
data
[
0
])
>
2
and
data
[
0
][
-
1
]
is
not
None
...
...
@@ -290,7 +291,9 @@ def grid_pred(
return
fig
def
vol_masked
(
vol
:
np
.
ndarray
,
vol_mask
:
np
.
ndarray
,
viz_delta
:
int
=
128
)
->
np
.
ndarray
:
def
vol_masked
(
vol
:
np
.
ndarray
,
vol_mask
:
np
.
ndarray
,
viz_delta
:
int
=
128
)
->
np
.
ndarray
:
"""
Applies masking to a volume based on a binary volume mask.
...
...
This diff is collapsed.
Click to expand it.