Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.pad.base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.pad.base
Commits
b655a657
Commit
b655a657
authored
Nov 05, 2018
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the builtin method for converting frame containers to arrays
parent
172d46e0
Pipeline
#24751
passed with stage
in 6 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
18 deletions
+1
-18
bob/pad/base/utils/helper_functions.py
bob/pad/base/utils/helper_functions.py
+1
-18
No files found.
bob/pad/base/utils/helper_functions.py
View file @
b655a657
...
...
@@ -24,24 +24,7 @@ def convert_frame_cont_to_array(frame_container):
An array containing features for all frames.
The rows are samples, the columns are features.
"""
feature_vectors
=
[]
frame_dictionary
=
{}
for
frame
in
frame_container
:
frame_dictionary
[
frame
[
0
]]
=
frame
[
1
]
sorted_keys
=
np
.
sort
([
int
(
key
)
for
key
in
frame_dictionary
.
keys
()])
for
idx
,
_
in
enumerate
(
frame_container
):
# Frames are stored in a mixed order, therefore we get them using incrementing frame index.
# Also, some frames might be missing, this is also addressed.
feature_vectors
.
append
(
frame_dictionary
[
str
(
sorted_keys
[
idx
])])
features_array
=
np
.
vstack
(
feature_vectors
)
return
features_array
return
frame_container
.
as_array
()
def
convert_and_prepare_features
(
features
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment