{"id":19658870,"url":"https://github.com/aegilops/find_motion","last_synced_at":"2025-04-28T20:31:31.527Z","repository":{"id":39736721,"uuid":"146128554","full_name":"aegilops/find_motion","owner":"aegilops","description":"Find motion and objects in video files","archived":false,"fork":false,"pushed_at":"2024-08-31T00:00:31.000Z","size":25,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-05T10:41:28.451Z","etag":null,"topics":["cctv","cvlib","motion","motion-detection","object-detection","object-recognition","opencv","opencv-python","pyimagesearch","python","python-image-processing","python3","python36","python37","security-camera","video","video-processing","yolov3","yolov4"],"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/aegilops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-25T20:47:05.000Z","updated_at":"2024-04-12T09:16:00.000Z","dependencies_parsed_at":"2024-11-11T15:41:13.799Z","dependency_job_id":"13dd7c12-8093-4f65-9bce-2acba6da6b75","html_url":"https://github.com/aegilops/find_motion","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegilops%2Ffind_motion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegilops%2Ffind_motion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegilops%2Ffind_motion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegilops%2Ffind_motion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aegilops","download_url":"https://codeload.github.com/aegilops/find_motion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251383724,"owners_count":21580926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cctv","cvlib","motion","motion-detection","object-detection","object-recognition","opencv","opencv-python","pyimagesearch","python","python-image-processing","python3","python36","python37","security-camera","video","video-processing","yolov3","yolov4"],"created_at":"2024-11-11T15:39:18.222Z","updated_at":"2025-04-28T20:31:31.509Z","avatar_url":"https://github.com/aegilops.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# find_motion - Motion and object detection with OpenCV\n\nVideo processing Python 3 script to detect motion and objects, with tunable parameters.\n\nUses brightness, color changes and edge changes to spot movement against a relatively still background.\n\nCaches images for a few frames before and after it detects movement.\n\nWith much help from OpenCV, https://www.pyimagesearch.com/ and https://cvlib.net/.\n\n## Data files\n\nThis repo no longer directly provides the data files `coco.names`, `yolov4.weights`, `yolov4.cfg`, `yolov4-tiny.weights`, `yolov4-tiny.cfg`.\n\nThis is because of excessive LFS bandwidth. You will need to source these files from elsewhere before installing and using the repo.\n\nThey are currently available in a [Release of this project on GitHub](https://github.com/aegilops/find_motion/releases).\n\nPlace them into the `find_motion/data` directory after cloning, and before installing.\n\n## Installing\n\nFirst clone the repo and change into the directory.\n\n\u003e NOTE: see above about data files that are required dependencies and are not inside this repo when you clone it\n\nTo install as a module do `python3 -mpip install . --user` in the repo directory. You can run it with `find_motion` once it is installed.\n\nOtherwise, use `python3 -mpip install -r requirements.txt --user` to install dependencies. Then call `./find_motion.py` directly.\n\nIf you start to get errors to do with progressbar, try reinstalling `progressbar2` (`python3 -mpip install progressbar2 --user`) - something else may have installed `progressbar`, which conflicts with `progressbar2`.\n\n### A note on OpenCV2\n\nOpenCV2 is available as a pre-built package from pypi using pip, but it can lag the latest OpenCV2.\n\nYou can build OpenCV2 from source if it has features missing from the pip package, or to possibly improve performance:\n\n* [OpenCV2 GitHub](https://github.com/opencv/opencv/)\n\n### Installing on Windows\n\nSome of the dependencies may be nested so deep that they exceed `MAX_PATH` on Windows.\n\nIf you are using Windows 10 or 11, try opting in to the new long file names, which have no length limit:\n\n* [Enable long paths in Windows 10 version 1607 and later](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later)\n\n## Usage\n\nUse `./find_motion.py -h` and `pydoc3 find_motion.py` (or `find_motion -h` and `pydoc3 find_motion` if you installed the module) to get detailed documentation of the command-line options.\n\n### Keyboard controls\n* `Ctrl-c`: at the command-line - ends all processing.\n* `q`: skip to the next video.\n* `spacebar`: on an output frame this will pause processing. On the \"unpause\" window this will pause/unpause processing.  \n\n### Tuning\n\nTo reduce false motion from shadows, wind movement, noise, sun glare and so on, you can control:\n* Shade, hue or edge change detection\n  Whether to use changes in gray scale shade, color hue or edges to spot motion\n\n* Threshold\n\n  How much difference in gray/hue/edge level between frames counts as a difference\n* Minimum time\n\n  How long a difference in the background must be seen for to count as motion\n* Cache time\n\n  How long to cache frames before motion is detected and how long to keep showing them after motion stops\n* Averaging\n\n  What proportion of the 'background' is provided by the last seen frame (0 to 1)\n* Blur scale\n\n  How large the blurring of the image is during processing (larger sizes are slower, but less sensitive to tiny motions)\n* Masking\n\n  Areas to ignore. They are defined as tuples of coordinates. They can be provided as literals at the command line or in a JSON file\n  * square: `((0, 0), (100, 100))`\n  * triangle: `((0, 0), (0, 100), (100, 0))`\n  * JSON:\n    ```\n    [\n        [[0, 0], [100, 100]],\n        [[0, 0], [0, 100], [100, 0]]\n    ]\n    ```\n\n### Video sources\n\nInput can come from a list of files, an input folder, or one or more cameras.\n\n### Output\n\nFiles are written to an output directory in 2GB sections.\n\nProgress is logged by default in `progress.log` in the output directory.\n\n### Config file\n\nYou can provide an INI format file with a single `[settings]` section using the `--config` option.\n\nUse the same names as the optional arguments given in the help for the fields of the settings file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegilops%2Ffind_motion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faegilops%2Ffind_motion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegilops%2Ffind_motion/lists"}