Commit 1053a3ea authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'youtube' into 'master'

[youtube] make sure the db directory is always a string

Closes #21

See merge request !47
parents 1164a73d 65c61658
Pipeline #55592 passed with stages
in 11 minutes and 30 seconds
...@@ -129,7 +129,7 @@ class FailSafeVideo(Base): ...@@ -129,7 +129,7 @@ class FailSafeVideo(Base):
Parameters Parameters
---------- ----------
annotators : :any:`list` annotators : list
A list of annotators to try. A list of annotators to try.
max_age : int max_age : int
The maximum number of frames that an annotation is valid for next frames. The maximum number of frames that an annotation is valid for next frames.
......
...@@ -73,7 +73,7 @@ class YoutubeDatabase(Database): ...@@ -73,7 +73,7 @@ class YoutubeDatabase(Database):
protocol, protocol,
annotation_type="bounding-box", annotation_type="bounding-box",
fixed_positions=None, fixed_positions=None,
original_directory=rc.get("bob.bio.face.youtube.directory"), original_directory=rc.get("bob.bio.video.youtube.directory", ""),
extension=".jpg", extension=".jpg",
annotation_extension=".labeled_faces.txt", annotation_extension=".labeled_faces.txt",
frame_selector=None, frame_selector=None,
...@@ -81,10 +81,11 @@ class YoutubeDatabase(Database): ...@@ -81,10 +81,11 @@ class YoutubeDatabase(Database):
self._check_protocol(protocol) self._check_protocol(protocol)
if original_directory is None or not os.path.exists(original_directory): original_directory = original_directory or ""
if not os.path.exists(original_directory):
logger.warning( logger.warning(
"Invalid or non existant `original_directory`: f{original_directory}." "Invalid or non existant `original_directory`: f{original_directory}."
"Please, do `bob config set bob.bio.face.lfw.directory PATH` to set the LFW data directory." "Please, do `bob config set bob.bio.video.youtube.directory PATH` to set the Youtube data directory."
) )
urls = YoutubeDatabase.urls() urls = YoutubeDatabase.urls()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment