Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sicom_image_analysis_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Kourosh Gerayeli
sicom_image_analysis_project
Commits
27e73da0
Commit
27e73da0
authored
1 year ago
by
Matthieu Muller
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused check
parent
b62cee2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/checks.py
+0
-14
0 additions, 14 deletions
src/checks.py
src/utils.py
+1
-1
1 addition, 1 deletion
src/utils.py
with
1 addition
and
15 deletions
src/checks.py
+
0
−
14
View file @
27e73da0
...
...
@@ -71,20 +71,6 @@ def check_data_range(img: np.ndarray) -> None:
raise
Exception
(
f
'
Pixel
\'
s values must be in range [0, 1]. Got range [
{
np
.
min
(
img
)
}
,
{
np
.
max
(
img
)
}
].
'
)
def
check_len
(
img1_list
:
list
|
np
.
ndarray
,
img2_list
:
list
|
np
.
ndarray
)
->
None
:
"""
Checks if two lists have the same length.
Args:
img1_list (list | np.ndarray): First list.
img2_list (list | np.ndarray): Secind list.
Raises:
Exception: Exception if the two list do not have the same length.
"""
if
len
(
img1_list
)
!=
len
(
img2_list
):
raise
Exception
(
f
'
The two lists must have the same length. Got
{
len
(
img1_list
)
}
and
{
len
(
img2_list
)
}
.
'
)
def
check_cfa
(
cfa
:
str
)
->
None
:
"""
Checks if the CFA
'
s name is correct.
...
...
This diff is collapsed.
Click to expand it.
src/utils.py
+
1
−
1
View file @
27e73da0
...
...
@@ -7,7 +7,7 @@ from skimage.metrics import peak_signal_noise_ratio, structural_similarity
from
skimage.io
import
imread
,
imsave
import
numpy
as
np
from
src.checks
import
check_len
,
check_data_range
,
check_rgb
,
check_shape
,
check_path
,
check_png
from
src.checks
import
check_data_range
,
check_rgb
,
check_shape
,
check_path
,
check_png
def
normalise_image
(
img
:
np
.
ndarray
)
->
np
.
ndarray
:
...
...
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