{"id":20875705,"url":"https://github.com/timatooth/catscanface","last_synced_at":"2025-05-12T15:31:39.778Z","repository":{"id":141828426,"uuid":"72908541","full_name":"timatooth/catscanface","owner":"timatooth","description":"Detect motion and cat faces with OpenCV 😺 🔎","archived":false,"fork":false,"pushed_at":"2017-05-19T12:05:33.000Z","size":62,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T07:26:05.120Z","etag":null,"topics":["aws-lambda","cats","mice","opencv","raspberry-pi"],"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/timatooth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-11-05T06:07:01.000Z","updated_at":"2024-05-19T12:23:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"02bca984-9986-4b81-815e-b6abfb8fd203","html_url":"https://github.com/timatooth/catscanface","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timatooth%2Fcatscanface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timatooth%2Fcatscanface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timatooth%2Fcatscanface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timatooth%2Fcatscanface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timatooth","download_url":"https://codeload.github.com/timatooth/catscanface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253765902,"owners_count":21960816,"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":["aws-lambda","cats","mice","opencv","raspberry-pi"],"created_at":"2024-11-18T06:47:50.664Z","updated_at":"2025-05-12T15:31:39.761Z","avatar_url":"https://github.com/timatooth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# catscanface 😺\n\u003e Detect motion and cat faces with Raspberry Pi, OpenCV \u0026 AWS Lambda\n\n![Thug cat detected with OpenCV](https://i.imgur.com/RDmYoce.png)\n\nContains Raspberry Pi agent for uploading motion detected frames to S3 which triggers a Python lambda function\nfor doing further cat Haar Cascade facial processing.\n\nMakes optional use of Datadog for statsd metrics \u0026 Raspberry Pi Sense Hat.\n\n#### Blog post\nhttp://timatooth.com/development/2017/01/01/raspberry-pi-motion-detection-aws-lambda-opencv.html\n\n## Raspberry Pi Agent usage\nConfiguration can be set on the command line or via environment variables. Usage of S3 requires AWS client ID \u0026 secrets\nto be configured.\n\n    usage: agent.py [-h] [--resolution RESOLUTION] [--fps FPS]\n                    [--delta-threshold DELTA_THRESHOLD] [--min-area MIN_AREA]\n                    [--enable-sensehat] [--enable-statsd] [--enable-annotate]\n                    [--image-path IMAGE_PATH] [--enable-s3]\n                    [--s3-bucket S3_BUCKET] [--s3-prefix S3_PREFIX]\n\n    Motion detect and upload frames to S3\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --resolution RESOLUTION\n                            e.g 640x480\n      --fps FPS             Framerate e.g: 18\n      --delta-threshold DELTA_THRESHOLD\n      --min-area MIN_AREA\n      --enable-sensehat     Use Sense Hat display\n      --enable-statsd       Send metrics\n      --enable-annotate     Draw detected regions to image\n      --image-path IMAGE_PATH\n                            Where to save images locally eg /tmp\n      --enable-s3           Enable saving frames to AWS S3\n      --s3-bucket S3_BUCKET\n                            AWS S3 bucket to save frames\n      --s3-prefix S3_PREFIX\n                            AWS S3 bucket prefix path e.g cats/\n\n#### Requirements\nOpenCV on Raspberry Pi\n\n```apt-get install libopencv-dev python-opencv python-dev```\n\npip dependencies for AWS \u0026 Datadog\n\n```pip install boto3 dogstatsd```\n\n## AWS Lambda Function for Cat Haar-Cascade facial detection:\n\n#### CloudFormation Stack\n\n    aws cloudformation create-stack --stack-name catscanface --template-body file://cloudformation.yaml --capabilities CAPABILITY_IAM --parameters ParameterKey=S3BucketName,ParameterValue=timatooth\n\n#### Lambda Deployment\n\nThis will download [OpenCV compiled on Amazon Linux](https://github.com/aeddi/aws-lambda-python-opencv) and update the AWS Lambda function code.\n\n    ./deploy-lambda.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimatooth%2Fcatscanface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimatooth%2Fcatscanface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimatooth%2Fcatscanface/lists"}