Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
medai
software
mednet
Commits
a3febdc4
Commit
a3febdc4
authored
1 year ago
by
André Anjos
Committed by
Daniel CARRON
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[tests.test_tbx11k] Fix test after bounding-box type fix
parent
f0e1e38e
No related branches found
No related tags found
1 merge request
!12
Adds grad-cam support on classifiers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_tbx11k.py
+6
-6
6 additions, 6 deletions
tests/test_tbx11k.py
with
6 additions
and
6 deletions
tests/test_tbx11k.py
+
6
−
6
View file @
a3febdc4
...
@@ -193,19 +193,19 @@ def check_loaded_batch(
...
@@ -193,19 +193,19 @@ def check_loaded_batch(
):
):
# there must be a sign indicated on the image, if active TB is detected
# there must be a sign indicated on the image, if active TB is detected
if
label
==
1
:
if
label
==
1
:
assert
len
(
bboxes
[
0
]
)
!=
0
assert
len
(
bboxes
)
!=
0
# eif label == 0: # not true, may have TBI!
# eif label == 0: # not true, may have TBI!
# assert len(bboxes) == 0
# assert len(bboxes) == 0
# asserts all bounding boxes are within the raw image width and height
# asserts all bounding boxes are within the raw image width and height
for
bbox
_label
,
xmin
,
ymin
,
width
,
height
in
zip
(
*
bboxes
)
:
for
bbox
in
bboxes
:
if
label
==
1
:
if
label
==
1
:
assert
bbox
_
label
==
1
assert
bbox
.
label
==
1
else
:
else
:
assert
bbox
_
label
==
0
assert
bbox
.
label
==
0
assert
(
xmin
+
width
)
<
sample
.
shape
[
2
]
assert
bbox
.
xmax
<
sample
.
shape
[
2
]
assert
(
ymin
+
height
)
<
sample
.
shape
[
1
]
assert
bbox
.
ymax
<
sample
.
shape
[
1
]
# use the code below to view generated images
# use the code below to view generated images
# from torchvision.transforms.functional import to_pil_image
# from torchvision.transforms.functional import to_pil_image
...
...
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