Skip to content

Commit

Permalink
IO documentation (#106)
Browse files Browse the repository at this point in the history
* IO documentation
  • Loading branch information
bjuncek authored Dec 1, 2023
1 parent f37a1f8 commit 0444724
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0444724

Please sign in to comment.