From c1108f47ff84d9919e70bbdeef27da21c49bdef5 Mon Sep 17 00:00:00 2001 From: Santiago Castro Date: Fri, 19 Jan 2024 17:46:39 -0300 Subject: [PATCH] Add code highlighting to the README (#277) --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 58f5a844..6d893dc5 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ If you believe in making reusable tools to make data easy to use for ML and you ## Install -``` +```bash pip install video2dataset ``` Or from source via -``` +```bash git clone https://github.com/iejMac/video2dataset cd video2dataset pip install -e . @@ -30,7 +30,7 @@ On Mac, replace 'decord' with 'eva_decord' in requirements.txt. For details, see ## Usage First get some video urls and metadata (all [supported sites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) by yt-dlp). For example lets save this small animal video dataset to a csv file called `videos.csv` -``` +```csv url,caption https://www.youtube.com/watch?v=od_PmtmMDV0,Driving to the banana store https://www.youtube.com/watch?v=8FhGOV7fs64,Polar bear eating @@ -40,7 +40,7 @@ https://www.dailymotion.com/video/x29ryo7,Cat and owl playing Then, run the tool: -``` +```bash video2dataset --url_list="videos.csv" --url_col="url" --caption_col="caption" --output_folder="dataset" ``` If you go into the output folder you should see a nice small video dataset stored with all relevant metadata. @@ -175,7 +175,7 @@ Some of these file systems require installing an additional package (for example See fsspec doc for all the details. If you need specific configuration for your filesystem, you may handle this problem by using the [fsspec configuration system](https://filesystem-spec.readthedocs.io/en/latest/features.html#configuration) that makes it possible to create a file such as `.config/fsspec/s3.json` and have information in it such as: -``` +```json { "s3": { "client_kwargs": { @@ -243,18 +243,18 @@ Either locally, or in [gitpod](https://gitpod.io/#https://github.com/iejMac/vide Setup a virtualenv: -``` +```bash python3 -m venv .env source .env/bin/activate pip install -e . ``` to run tests: -``` +```bash pip install -r requirements-test.txt ``` then -``` +```bash make lint make test ``` @@ -264,7 +264,7 @@ You can use `make black` to reformat the code `python -m pytest -x -s -v tests -k "dummy"` to run a specific test ## Citation -``` +```bibtex @misc{kilian-2023-video2dataset, author = {Maciej Kilian, Romain Beaumont, Daniel Mendelevitch, Sumith Kulal, Andreas Blattmann}, title = {video2dataset: Easily turn large sets of video urls to a video dataset},