diff --git a/README.md b/README.md index 5acd25f..97e9aa7 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,17 @@ Since each time the script is run the list of input files is shuffled, you don't workers will be processing the same video. On a rare occasion when the collision happens, the script will rewrite previously extracted features. + +## Input +The inputs are paths to video files. +Paths can be passed as a list of paths or as a text file formatted with a single path per line. + + +## Output +Output is defined by the `on_extraction` argument; by default it prints the features to the command line. +Possible values of output are ['print', 'save_numpy', 'save_pickle']. `save_*` options save the features in +the `output_path` folder with the same name as the input video file but with the `.npy` or `.pkl` extension. + ## Used in * [SpecVQGAN](https://arxiv.org/abs/2110.08791) branch `specvqgan` diff --git a/utils/utils.py b/utils/utils.py index 99d6b9f..123778c 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -131,7 +131,8 @@ def form_list_from_user_input( to_shuffle: bool = True, ) -> list: '''User specifies either list of videos in the cmd or a path to a file with video paths. This function - transforms the user input into a list of paths. + transforms the user input into a list of paths. Files are expected to be formatted with a single + video-path in each line. Args: video_paths (Union[str, ListConfig, None], optional): a list of video paths. Defaults to None.