Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.face
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.pad.face
Commits
ffaec1f3
Commit
ffaec1f3
authored
6 years ago
by
Olegs NIKISINS
Browse files
Options
Downloads
Patches
Plain Diff
Small modifications in BATL HLDI
parent
08484e67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!79
Batl hldi update
,
!78
Small modifications in BATL HLDI
Pipeline
#25977
canceled
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/batl.py
+17
-1
17 additions, 1 deletion
bob/pad/face/database/batl.py
with
17 additions
and
1 deletion
bob/pad/face/database/batl.py
+
17
−
1
View file @
ffaec1f3
...
@@ -573,6 +573,14 @@ class BatlPadDatabase(PadDatabase):
...
@@ -573,6 +573,14 @@ class BatlPadDatabase(PadDatabase):
if
not
os
.
path
.
isfile
(
file_path
):
# no file with annotations
if
not
os
.
path
.
isfile
(
file_path
):
# no file with annotations
# original values of the arguments of f:
stream_type_original
=
f
.
stream_type
reference_stream_type_original
=
f
.
reference_stream_type
warp_to_reference_original
=
f
.
warp_to_reference
convert_to_rgb_original
=
f
.
convert_to_rgb
crop_original
=
f
.
crop
video_data_only_original
=
f
.
video_data_only
f
.
stream_type
=
"
color
"
f
.
stream_type
=
"
color
"
f
.
reference_stream_type
=
"
color
"
f
.
reference_stream_type
=
"
color
"
f
.
warp_to_reference
=
False
f
.
warp_to_reference
=
False
...
@@ -583,6 +591,14 @@ class BatlPadDatabase(PadDatabase):
...
@@ -583,6 +591,14 @@ class BatlPadDatabase(PadDatabase):
video
=
f
.
load
(
directory
=
self
.
original_directory
,
video
=
f
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
)
extension
=
self
.
original_extension
)
# set arguments of f to the original values:
f
.
stream_type
=
stream_type_original
f
.
reference_stream_type
=
reference_stream_type_original
f
.
warp_to_reference
=
warp_to_reference_original
f
.
convert_to_rgb
=
convert_to_rgb_original
f
.
crop
=
crop_original
f
.
video_data_only
=
video_data_only_original
annotations
=
{}
annotations
=
{}
for
idx
,
image
in
enumerate
(
video
.
as_array
()):
for
idx
,
image
in
enumerate
(
video
.
as_array
()):
...
@@ -614,7 +630,7 @@ class BatlPadDatabase(PadDatabase):
...
@@ -614,7 +630,7 @@ class BatlPadDatabase(PadDatabase):
# If specified append annotations for the roi in the facial region:
# If specified append annotations for the roi in the facial region:
if
self
.
append_color_face_roi_annot
:
if
self
.
append_color_face_roi_annot
:
file_path
=
pkg_resources
.
resource_filename
(
'
bob.pad.face
'
,
os
.
path
.
join
(
'
lists/batl/color_skin_non_skin_annotations/
'
,
"
annotations_train_set
"
+
"
.json
"
)
)
file_path
=
pkg_resources
.
resource_filename
(
'
bob.pad.face
'
,
os
.
path
.
join
(
'
lists/batl/color_skin_non_skin_annotations/
'
,
"
annotations_train_
dev_
set
"
+
"
.json
"
)
)
with
open
(
file_path
,
'
r
'
)
as
json_file
:
# open the file containing all annotations:
with
open
(
file_path
,
'
r
'
)
as
json_file
:
# open the file containing all annotations:
...
...
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