{"id":13813447,"url":"https://github.com/fvlima/raspycammonitor","last_synced_at":"2025-05-15T00:33:12.273Z","repository":{"id":218223275,"uuid":"124315336","full_name":"fvlima/raspycammonitor","owner":"fvlima","description":"A simple and experimental python script to run on raspberry, that uses picamera and opencv-python to detect human presence by face recognition, taking a photo and sending it through email","archived":false,"fork":false,"pushed_at":"2024-01-24T02:02:30.000Z","size":40,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T04:04:06.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvlima.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":"2018-03-08T00:57:27.000Z","updated_at":"2024-08-04T04:04:08.839Z","dependencies_parsed_at":"2024-01-24T03:23:44.105Z","dependency_job_id":"9ff8192d-acd8-4a4f-858f-fbf1561d90da","html_url":"https://github.com/fvlima/raspycammonitor","commit_stats":null,"previous_names":["fvlima/raspycammonitor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvlima%2Fraspycammonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvlima%2Fraspycammonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvlima%2Fraspycammonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvlima%2Fraspycammonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvlima","download_url":"https://codeload.github.com/fvlima/raspycammonitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225319229,"owners_count":17455729,"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":[],"created_at":"2024-08-04T04:01:18.088Z","updated_at":"2024-11-19T08:30:36.307Z","avatar_url":"https://github.com/fvlima.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# raspycammonitor\n\nA simple and experimental python script to run on raspberry, that uses picamera and opencv-python to detect human presence by face recognition, taking a photo and sending it through email. \n\nIt uses the haar-cascade [1] classifier for face detection and some configurations to improve the classifier type and detection scale can be made by envvars configured in .env file.\n\n1 - http://bit.ly/2FjyYB5\n\n## Installation and usage\n\nThis project requires `pipenv`.\n\n1. Clone the project `git clone https://github.com/fvlima/raspycammonitor.git`\n2. `pipenv install` (if any error occurs, try `pipenv install --skip-lock`)\n3. `cp default.env .env`\n4. Edit the `.env` file with your email credentials and other configuration if necessary\n5. Run `python monitor.py`\n\n\n## Using as a background service\n\nIt's possible to configure it as a  service, to run in background and automatic launch on system boot, example:\n\n\nCreate the service file\n```\nvim /lib/systemd/system/raspycammonitor.service\n```\n\nEdit this file like the lines bellow (change the venv and project location)\n```\n[Unit]\nDescription=Raspberry Py Camera Monitor\nAfter=multi-user.target\n\n[Service]\nType=simple\nExecStart=/your/venv/path/bin/python /your/local/path/raspycammonitor/monitor.py\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n```\n\nAnd run the follow comands in terminal (change the project location)\n\n```\nsudo chmod 644 /lib/systemd/system/raspycammonitor.service\nchmod +x /your/local/path/monitor.py\nsudo systemctl daemon-reload\nsudo systemctl enable raspycammonitor.service\nsudo systemctl start raspycammonitor.service\n``` \n\nAfter it, the project is already ready to run. It's possible to see the service status with the follow command\n\n```\nsudo systemctl status raspycammonitor.service\n```\n\nMore information about systemd can be found here https://wiki.debian.org/systemd\n\n## Configuration file\n\nHere the envvars configuration options are described\n```\nSMTP_SERVER=smtp.some-domain.com # the smtp server\nSMTP_PORT=587 # the smtp port\nSMTP_USER=user@some-domin.com # the user for smtp login\nSMTP_PASS='password' # the user smtp password between single quotes\nSMT_USE_TLS=True # if the smpt uses TLS or not\n\nEMAIL_FROM=user@some-domin.com # the email that will send the captured image\nEMAIL_TO=user@another-domin.com # the email that will receive the captured image\nEMAIL_SUBJECT=Face detection # the email subject\n\nCV2_CLASSIFIER=/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml # the classifier location\nCV2_SCALE_FACTOR=1.1 # cv2 scale factor image detection\nCV2_MIN_NEIGHBORS=5 # cv2 min neighbors image detection\n\nCAMERA_RESOLUTION=1024,768 # the picamera resolution\nCAMERA_CAPTURE_INTERVAL=2 # the interval in seconds between image capture \n``` \n\n## Notes\n\n- This project was tested with python 2.7+ and 3.5+\n- Maybe you need to install libopencv-dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvlima%2Fraspycammonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvlima%2Fraspycammonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvlima%2Fraspycammonitor/lists"}