Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bob.paper.pad_mccnns_swirdiff
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
Model registry
Operate
Environments
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.paper.pad_mccnns_swirdiff
Commits
b53c68a0
Commit
b53c68a0
authored
4 years ago
by
Anjith GEORGE
Browse files
Options
Downloads
Patches
Plain Diff
Updates test
parent
fbe98753
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#41190
failed
4 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configuration/preprocessing_mccnn_swirdiff.py
+66
-53
66 additions, 53 deletions
configuration/preprocessing_mccnn_swirdiff.py
with
66 additions
and
53 deletions
configuration/preprocessing_mccnn_swirdiff.py
+
66
−
53
View file @
b53c68a0
...
...
@@ -4,65 +4,78 @@
# ================
# === DATABASE ===
# ================
def
_color
(
f
):
return
f
.
stream
(
'
color
'
)
def
_swir_940
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_940nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1050
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1050nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1200
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1200nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1300
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1300nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1450
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1450nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1550
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1550nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
def
_swir_1650
(
f
):
color
=
f
.
stream
(
'
color
'
)
swir
=
f
.
stream
(
'
swir_1650nm
'
).
adjust
(
color
)
swir
=
swir
.
subtract_dark
()
swir
=
swir
.
warp
(
color
)
return
swir
dark_for_stereo
=
False
subtract_dark_nir
=
False
subtract_dark_swir
=
True
color
=
Stream
(
'
color
'
)
nir_735nm
=
Stream
(
'
nir_left_735nm
'
).
adjust
(
color
)
nir_850nm
=
Stream
(
'
nir_left_850nm
'
).
adjust
(
color
)
nir_940nm
=
Stream
(
'
nir_left_940nm
'
).
adjust
(
color
)
nir_1050nm
=
Stream
(
'
nir_left_1050nm
'
).
adjust
(
color
)
nir_left_dark
=
Stream
(
'
nir_left
'
).
adjust
(
color
)
nir_right_dark
=
Stream
(
'
nir_left
'
).
adjust
(
color
)
nir_left_stereo
=
Stream
(
'
nir_left_stereo
'
).
adjust
(
color
)
nir_right_stereo
=
Stream
(
'
nir_right_stereo
'
).
adjust
(
color
)
if
subtract_dark_nir
:
nir_735nm
=
nir_735nm
.
subtract_dark
(
nir_left_dark
)
nir_850nm
=
nir_850nm
.
subtract_dark
(
nir_left_dark
)
nir_940nm
=
nir_940nm
.
subtract_dark
(
nir_left_dark
)
nir_1050nm
=
nir_1050nm
.
subtract_dark
(
nir_left_dark
)
nir
=
nir_735nm
.
stack
(
nir_850nm
).
stack
(
nir_940nm
).
stack
(
nir_1050nm
)
nir
=
nir
.
warp
(
color
)
intel_depth
=
Stream
(
'
intel_depth
'
).
adjust
(
color
).
warp
(
color
)
swir_dark
=
Stream
(
'
swir
'
).
adjust
(
color
)
swir_940nm
=
Stream
(
'
swir_940nm
'
).
adjust
(
color
)
swir_1050nm
=
Stream
(
'
swir_1050nm
'
).
adjust
(
color
)
swir_1200nm
=
Stream
(
'
swir_1200nm
'
).
adjust
(
color
)
swir_1300nm
=
Stream
(
'
swir_1300nm
'
).
adjust
(
color
)
swir_1450nm
=
Stream
(
'
swir_1450nm
'
).
adjust
(
color
)
swir_1550nm
=
Stream
(
'
swir_1550nm
'
).
adjust
(
color
)
swir_1650nm
=
Stream
(
'
swir_1650nm
'
).
adjust
(
color
)
if
subtract_dark_swir
:
swir_940nm
=
swir_940nm
.
subtract_dark
(
swir_dark
)
swir_1050nm
=
swir_1050nm
.
subtract_dark
(
swir_dark
)
swir_1200nm
=
swir_1200nm
.
subtract_dark
(
swir_dark
)
swir_1300nm
=
swir_1300nm
.
subtract_dark
(
swir_dark
)
swir_1450nm
=
swir_1450nm
.
subtract_dark
(
swir_dark
)
swir_1550nm
=
swir_1550nm
.
subtract_dark
(
swir_dark
)
swir_1650nm
=
swir_1650nm
.
subtract_dark
(
swir_dark
)
swir
=
swir_940nm
swir
=
swir
.
stack
(
swir_1050nm
)
swir
=
swir
.
stack
(
swir_1200nm
)
swir
=
swir
.
stack
(
swir_1300nm
)
swir
=
swir
.
stack
(
swir_1450nm
)
swir
=
swir
.
stack
(
swir_1550nm
)
swir
=
swir
.
stack
(
swir_1650nm
)
swir
=
swir
.
warp
(
color
)
thermal
=
Stream
(
'
thermal
'
).
adjust
(
color
).
warp
(
color
)
streams
=
{
'
color
'
:
color
,
'
swir
'
:
swir
}
from
bob.extension
import
rc
as
_rc
from
bob.pad.face.database
import
HQWMCAPadDatabase
from
bob.pad.face.database
import
HQWMCAPadDatabase
_warp
as
HQWMCAPadDatabase
database
=
HQWMCAPadDatabase
(
protocol
=
'
grand_test
'
,
original_directory
=
_rc
[
'
bob.db.hqwmca.directory
'
],
original_extension
=
'
.h5
'
,
annotations_dir
=
'
./landmarks-full
'
,
load_function
=
[
_color
,
_swir_940
,
_swir_1050
,
_swir_1200
,
_swir_1300
,
_swir_1450
,
_swir_1550
,
_swir_1650
]
,
streams
=
streams
,
n_frames
=
10
)
groups
=
[
"
train
"
,
"
dev
"
,
"
eval
"
]
...
...
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