Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.vein
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
bob
bob.bio.vein
Commits
a8586e10
Commit
a8586e10
authored
7 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Fix loading of fv3d fingers
parent
b6acc543
No related branches found
No related tags found
1 merge request
!35
3DFV and multiple fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/vein/database/fv3d.py
+6
-3
6 additions, 3 deletions
bob/bio/vein/database/fv3d.py
with
6 additions
and
3 deletions
bob/bio/vein/database/fv3d.py
+
6
−
3
View file @
a8586e10
...
@@ -8,6 +8,7 @@ import numpy
...
@@ -8,6 +8,7 @@ import numpy
from
bob.bio.base.database
import
BioFile
,
BioDatabase
from
bob.bio.base.database
import
BioFile
,
BioDatabase
from
.
import
AnnotatedArray
from
.
import
AnnotatedArray
from
..preprocessor.utils
import
poly_to_mask
class
File
(
BioFile
):
class
File
(
BioFile
):
...
@@ -38,13 +39,15 @@ class File(BioFile):
...
@@ -38,13 +39,15 @@ class File(BioFile):
"""
(Overrides base method) Loads both image and mask
"""
"""
(Overrides base method) Loads both image and mask
"""
image
=
super
(
File
,
self
).
load
(
*
args
,
**
kwargs
)
image
=
super
(
File
,
self
).
load
(
*
args
,
**
kwargs
)
image
=
numpy
.
rot90
(
image
,
3
)
roi
=
self
.
__f
.
roi
()
roi
=
self
.
__f
.
roi
()
# calculates the 90 degrees anti-clockwise rotated RoI points
# calculates the 90 degrees anti-clockwise rotated RoI points
h
,
w
=
image
.
shape
w
,
h
=
image
.
shape
roi
=
[(
x
,
-
y
+
h
)
for
k
in
roi
]
roi
=
[(
x
,
h
-
y
)
for
(
y
,
x
)
in
roi
]
mask
=
poly_to_mask
(
image
.
shape
,
roi
)
return
ImageWithAnnotation
(
numpy
.
rot90
(
image
)
,
metadata
=
dict
(
mask
=
roi
))
return
AnnotatedArray
(
image
,
metadata
=
dict
(
mask
=
mask
,
roi
=
roi
))
class
Database
(
BioDatabase
):
class
Database
(
BioDatabase
):
...
...
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