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

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):
Parameters
----------
annotators : :any:`list`
annotators : list
A list of annotators to try.
max_age : int
The maximum number of frames that an annotation is valid for next frames.
......
......@@ -20,7 +20,7 @@ class YoutubeDatabase(Database):
The actual raw data for the `YouTube Faces` database should be downloaded from the original URL (though we were not able to contact the corresponding Professor).
.. warning::
To use this dataset protocol, you need to have the original files of the YOUTUBE datasets.
Once you have it downloaded, please run the following command to set the path for Bob
......@@ -40,9 +40,9 @@ class YoutubeDatabase(Database):
>>> from bob.bio.video.database import YoutubeDatabase
>>> youtube = YoutubeDatabase(protocol="fold0")
>>>
>>> # Fetching the gallery
>>> # Fetching the gallery
>>> references = youtube.references()
>>> # Fetching the probes
>>> # Fetching the probes
>>> probes = youtube.probes()
......@@ -50,7 +50,7 @@ class YoutubeDatabase(Database):
----------
protocol: str
One of the Youtube above mentioned protocols
One of the Youtube above mentioned protocols
annotation_type: str
One of the supported annotation types
......@@ -73,7 +73,7 @@ class YoutubeDatabase(Database):
protocol,
annotation_type="bounding-box",
fixed_positions=None,
original_directory=rc.get("bob.bio.face.youtube.directory"),
original_directory=rc.get("bob.bio.video.youtube.directory", ""),
extension=".jpg",
annotation_extension=".labeled_faces.txt",
frame_selector=None,
......@@ -81,10 +81,11 @@ class YoutubeDatabase(Database):
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(
"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()
......
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