Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.replaymobile
Commits
1c4e98b7
Commit
1c4e98b7
authored
Nov 29, 2016
by
Amir MOHAMMADI
Browse files
Merge branch 'bio' into 'master'
dont print use logger, try again if video fails to load See merge request
!5
parents
caa5e209
0a1efca3
Pipeline
#5543
passed with stages
in 5 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/db/replaymobile/models.py
View file @
1c4e98b7
...
...
@@ -12,6 +12,9 @@ from sqlalchemy.ext.declarative import declarative_base
import
numpy
import
bob.io.base
import
bob.io.video
import
bob.core
logger
=
bob
.
core
.
log
.
setup
(
'bob.db.replaymobile'
)
Base
=
declarative_base
()
...
...
@@ -206,7 +209,7 @@ class File(Base):
[optional] The extension of the filename - this will control the type of
output and the codec for saving the input blob.
"""
print
(
'video file extension:
'
,
extension
)
logger
.
debug
(
'video file extension:
{}'
.
format
(
extension
)
)
if
extension
is
None
:
extension
=
'.mov'
# if self.get_quality() == 'laptop':
...
...
@@ -223,7 +226,7 @@ class File(Base):
vin
=
numpy
.
rollaxis
(
vin
,
3
,
2
)
if
not
self
.
is_tablet
():
print
(
"
flipping mobile video
"
)
logger
.
debug
(
'
flipping mobile video
'
)
vin
=
vin
[:,
:,
::
-
1
,
:]
# if self.is_rotated():
...
...
bob/db/replaymobile/verificationprotocol.py
View file @
1c4e98b7
...
...
@@ -35,9 +35,13 @@ class File(BaseFile):
def
load
(
self
,
directory
=
None
,
extension
=
None
):
if
extension
in
(
None
,
'.mov'
):
video
=
self
.
_f
.
load
(
directory
,
extension
)
# just return the required frame.
return
video
[
self
.
framen
]
for
i
in
range
(
100
):
try
:
video
=
self
.
_f
.
load
(
directory
,
extension
)
# just return the required frame.
return
video
[
self
.
framen
]
except
RuntimeError
:
pass
else
:
return
super
(
File
,
self
).
load
(
directory
,
extension
)
...
...
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