{"id":23413494,"url":"https://github.com/leonardcser/waldo-video-preprocessor","last_synced_at":"2026-04-25T22:34:09.628Z","repository":{"id":150656970,"uuid":"436137459","full_name":"leonardcser/waldo-video-preprocessor","owner":"leonardcser","description":"Convert videos into preprocessed frames.","archived":false,"fork":false,"pushed_at":"2021-12-08T17:46:09.000Z","size":2335,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T18:18:18.602Z","etag":null,"topics":["opencv","preprocessing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonardcser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-08T06:14:05.000Z","updated_at":"2021-12-08T17:46:12.000Z","dependencies_parsed_at":"2023-06-12T12:30:18.884Z","dependency_job_id":null,"html_url":"https://github.com/leonardcser/waldo-video-preprocessor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leonardcser/waldo-video-preprocessor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardcser%2Fwaldo-video-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardcser%2Fwaldo-video-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardcser%2Fwaldo-video-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardcser%2Fwaldo-video-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonardcser","download_url":"https://codeload.github.com/leonardcser/waldo-video-preprocessor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonardcser%2Fwaldo-video-preprocessor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32279657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opencv","preprocessing"],"created_at":"2024-12-22T19:36:31.022Z","updated_at":"2026-04-25T22:34:09.596Z","avatar_url":"https://github.com/leonardcser.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waldo Video Preprocessor\n\nUtility script that allows you to convert videos into preprocessed frames. The main use is preprocessing video data for Neural Networks.\n\n## Table of contents\n\n- [Waldo Video Preprocessor](#waldo-video-preprocessor)\n  - [Table of contents](#table-of-contents)\n  - [Preview](#preview)\n  - [How to use](#how-to-use)\n    - [With Docker (recommended)](#with-docker-recommended)\n    - [Without Docker](#without-docker)\n  - [Options](#options)\n  - [Other notes](#other-notes)\n    - [Remove the container](#remove-the-container)\n    - [Error messages](#error-messages)\n    - [Bugs](#bugs)\n  - [Testing](#testing)\n\n## Preview\n\n```\npython3 run.py -s \"./data\" -f 1\n```\n\n![Converted Frame 1](images/frame_11.png)\n\n```\npython3 run.py -s \"./data\" -f 1 --width 128 --height 128 -g\n```\n\n![Converted Frame 2](images/frame_11_converted.png)\n\n_Credits to Homeless. (https://drive.google.com/drive/folders/1-nK8-WthZyB9G1O9MmAgD3h6CQsYkhUr)_\n\n## How to use\n\n### With Docker (recommended)\n\n1. Make sure you have these dependencies installed on your computer:\n\n- Python3 (3.8-3.9): https://www.python.org/downloads/\n- Docker: https://docs.docker.com/engine/install/\n\n2. Build the container video with the following command (takes a minute \u0026 approx. 1.1GB):\n\n```sh\npython3 build.py\n```\n\n3. Process videos with the following command:\n\n```sh\npython3 run.py -s \"your_folder_path_with_videos\"\n```\n\nWhen running the script, by default it will create a new folder `out/` in your current working directory with all the frames split into separate folders.\n\n### Without Docker\n\nThere is also the option to run without Docker. However, this can cause errors as you need to manually install and setup opencv-python to work with `cv2.VideoCapture()`.\n\nMake sure to have Python3 installed (see above versions \u0026 download link).\n\n1. Set `IS_DOCKER` to `False` in [variables.py](variables.py)\n2. Create virtualenv (optional):\n\n```sh\npython3 -m venv .venv\nsource .venv/bin/activate\npip install --upgrade pip\n```\n\n3. Install dependencies:\n\n```sh\npip install -r requirements/requirments.txt\n```\n\n4. Process videos with this command (same options as the other 'run.py' command):\n\n```sh\npython3 main.py -s \"your_folder_path_with_videos\"\n```\n\n## Options\n\nYou can view all of the available options with the following command:\n\n```sh\npython3 run.py -h\n```\n\nThe options include:\n\n| Arguments     | Description                                                                         | Required | Default   | Type   |\n| ------------- | ----------------------------------------------------------------------------------- | -------- | --------- | ------ |\n| -s --src      | The source folder                                                                   | Yes      | -         | `str`  |\n| -d --dest     | The destination folder                                                              | No       | `\"./out\"` | `str`  |\n| -f --fps      | The output target fps                                                               | No       | `10`      | `int`  |\n| --width       | The output frame width. If not provied, the width will not be resized               | No       | `None`    | `int`  |\n| --height      | The output frame height. If not provied, the height will not be resized             | No       | `None`    | `int`  |\n| --cxmin       | The output frame crop min x. If not provided, the frames will not be cropped        | No       | `None`    | `int`  |\n| --cxmax       | The output frame crop max x. If not provided, the frames will not be cropped        | No       | `None`    | `int`  |\n| --cymin       | The output frame crop min y. If not provided, the frames will not be cropped        | No       | `None`    | `int`  |\n| --cymax       | The output frame crop max y. If not provided, the frames will not be cropped        | No       | `None`    | `int`  |\n| -g --gray     | Convert frames to grayscale                                                         | No       | `False`   | `bool` |\n| --silent      | No console logging                                                                  | No       | `False`   | `bool` |\n| -t --threads  | The numbers of thread to create in order to process the videos (1 file == 1 thread) | No       | `4`       | `int`  |\n| -ni --noinput | Prevent the script from asking user input                                           | No       | `False`   | `bool` |\n| -h --help     | Show the list of options                                                            | No       | `False`   | `bool` |\n\n## Other notes\n\n### Remove the container\n\nTo remove the container, simply run:\n\n```sh\npython3 clean.py\n```\n\n### Error messages\n\nYou might see this error message in the console:\n\n```\nFATAL: exception not rethrown\n```\n\nFor the moment just ignore it.\n\n### Bugs\n\nFeel free to open a issue if you encounter any problems. [[Open Issue]](https://github.com/leonardcser/waldo-preprocess/issues/new/choose)\n\n## Testing\n\nFirst make sure you have installed the dependencies found in the [requirements.txt](requirements/requirements.txt). (see [Without Docker](#without-docker))\n\nTest python formatting:\n\n```sh\nblack --check .\n```\n\nTest python linting:\n\n```sh\nflake8 .\n```\n\nPython run test suite:\n\n```sh\npython3 -m unittest discover tests\n```\n\nHere again there is a option to run the tests with or without Docker by toggling the `IS_DOCKER` boolean in [variables.py](variables.py).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonardcser%2Fwaldo-video-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonardcser%2Fwaldo-video-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonardcser%2Fwaldo-video-preprocessor/lists"}