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
ea11e4cb
Commit
ea11e4cb
authored
5 years ago
by
David GEISSBUHLER
Browse files
Options
Downloads
Patches
Plain Diff
fix annotation transform
parent
3c77cea4
No related branches found
No related tags found
No related merge requests found
Pipeline
#38981
failed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/face/database/hqwmca.py
+9
-5
9 additions, 5 deletions
bob/pad/face/database/hqwmca.py
with
9 additions
and
5 deletions
bob/pad/face/database/hqwmca.py
+
9
−
5
View file @
ea11e4cb
...
...
@@ -261,7 +261,10 @@ class HQWMCAPadDatabase(PadDatabase):
# set annotations in source channel
video
=
ff
.
vf
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
,
streams
=
streams
,
n_frames
=
self
.
n_frames
)[
'
color
'
]
#video = ff.vf.load( directory=self.original_directory, extension=self.original_extension, streams=streams, n_frames=self.n_frames)['color']
color_stream
=
streams
[
'
color
'
]
rep_color_stream
=
streams
[
'
rep_color
'
]
print
(
'
annotations.keys()
'
,
annotations
.
keys
())
...
...
@@ -276,9 +279,9 @@ class HQWMCAPadDatabase(PadDatabase):
print
(
"
img_points
"
,
img_points
,
img_points
.
shape
)
self
.
streams
[
'
color
'
]
.
image_points
[
int
(
idx
)]
=
img_points
color_stream
.
image_points
[
int
(
idx
)]
=
img_points
self
.
streams
[
'
color
'
]
.
bounding_box
[
int
(
idx
)]
=
np
.
zeros
((
2
,
2
))
color_stream
.
bounding_box
[
int
(
idx
)]
=
np
.
zeros
((
2
,
2
))
sorted_keys
=
sorted
(
frame_annotations
.
keys
())
...
...
@@ -289,7 +292,8 @@ class HQWMCAPadDatabase(PadDatabase):
# The reprojected color frames
video
=
ff
.
vf
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
,
streams
=
streams
,
n_frames
=
self
.
n_frames
)[
'
rep_color
'
]
# load only the reprojected stream
video
=
ff
.
vf
.
load
(
directory
=
self
.
original_directory
,
extension
=
self
.
original_extension
,
streams
=
{
'
rep_color
'
:
rep_color_stream
},
n_frames
=
self
.
n_frames
)
for
idx
,
image
in
enumerate
(
video
.
as_array
()):
# next line is not loading the data but just use the projection , probably wont work
...
...
@@ -299,7 +303,7 @@ class HQWMCAPadDatabase(PadDatabase):
print
(
'
self.streams
'
,
self
.
streams
,
image
.
shape
)
rep_image_points
=
self
.
streams
[
'
rep_color
'
]
.
image_points
[
idx
]
rep_image_points
=
rep_color
_stream
.
image_points
[
idx
]
print
(
"
rep_image_points
"
,
rep_image_points
)
...
...
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