{"id":15026202,"url":"https://github.com/redapparat/facedetector","last_synced_at":"2025-05-15T14:03:25.655Z","repository":{"id":41280894,"uuid":"96151836","full_name":"RedApparat/FaceDetector","owner":"RedApparat","description":"Face detection for your Android app","archived":false,"fork":false,"pushed_at":"2018-03-02T23:33:57.000Z","size":42956,"stargazers_count":1174,"open_issues_count":23,"forks_count":197,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-04-15T03:52:16.397Z","etag":null,"topics":["android","camera","face-detection"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedApparat.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}},"created_at":"2017-07-03T21:27:59.000Z","updated_at":"2025-02-27T06:21:07.000Z","dependencies_parsed_at":"2022-07-14T11:30:47.174Z","dependency_job_id":null,"html_url":"https://github.com/RedApparat/FaceDetector","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/RedApparat%2FFaceDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedApparat%2FFaceDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedApparat%2FFaceDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedApparat%2FFaceDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedApparat","download_url":"https://codeload.github.com/RedApparat/FaceDetector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003955,"owners_count":21196794,"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":["android","camera","face-detection"],"created_at":"2024-09-24T20:04:02.284Z","updated_at":"2025-04-15T03:52:25.051Z","avatar_url":"https://github.com/RedApparat.png","language":"Java","readme":"# FaceDetector\n\nWant to detect human faces on a camera preview stream in real time? Well, you came to the right place.\n\nFaceDetector is a library which:\n\n- detects faces\n- works on Android\n- very simple to use\n- works greatly with [Fotoapparat](https://github.com/Fotoapparat/Fotoapparat)\n- you can use it with whichever camera library or source you like\n- uses C++ core which can easily be ported to iOS (we have plans for that)\n\nDetecting faces with `Fotoapparat` is as simple as:\n\n```java\nFotoapparat\n    .with(context)\n    .into(cameraView)\n    .frameProcessor(\n      FaceDetectorProcessor\n        .with(context)\n        .build()\n    )\n    .build()\n```\n\n\n\u003cimg src=\"/screenshot.gif\" width=\"200\" /\u003e\n\n\n## How it works\n\n### Step One (optional)\n\nTo display detected faces on top of the camera view, set up your layout as following.\n\n```xml\n\u003cio.fotoapparat.facedetector.view.CameraOverlayLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n    \u003c!-- Adjust parameters as you like. But cameraView has to be inside CameraOverlayLayout --\u003e\n    \u003cio.fotoapparat.view.CameraView\n        android:id=\"@+id/cameraView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" /\u003e\n\n    \u003c!-- This view will display detected faces --\u003e\n    \u003cio.fotoapparat.facedetector.view.RectanglesView\n        android:id=\"@+id/rectanglesView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:rectanglesColor=\"@color/colorAccent\"\n        app:rectanglesStrokeWidth=\"2dp\"/\u003e\n\n\u003c/io.fotoapparat.facedetector.view.CameraOverlayLayout\u003e\n```\n\n### Step Two\n\nCreate `FaceDetectorProcessor`:\n\nJava:\n\n```java\nFaceDetectorProcessor processor = FaceDetectorProcessor.with(this)\n    .listener(faces -\u003e {\n        rectanglesView.setRectangles(faces);  // (Optional) Show detected faces on the view.\n\n        // ... or do whatever you want with the result\n    })\n    .build()\n```\n\nor Kotlin:\n\n```kotlin\nprivate val processor = FaceDetectorProcessor.with(this)\n    .listener({ faces -\u003e\n        rectanglesView.setRectangles(faces)  // (Optional) Show detected faces on the view.\n\n        // ... or do whatever you want with the result\n    })\n    .build()\n```\n\n### Step Three\n\nAttach the processor to `Fotoapparat`\n\n```java\nFotoapparat.with(this)\n    .into(cameraView)\n    // the rest of configuration\n    .frameProcessor(processor)\n    .build()\n```\n\nAnd you are good to go!\n\n## Set up\n\nAdd dependency to your `build.gradle`\n\n```groovy\nrepositories {\n    maven { \n        url  \"http://dl.bintray.com/fotoapparat/fotoapparat\" \n    }\n}\n\nimplementation 'io.fotoapparat:facedetector:1.0.0'\n\n// If you are using Fotoapparat add this one as well\nimplementation 'io.fotoapparat.fotoapparat:library:1.2.0' // or later version\n```\n\n## Contact us\n\nImpressed? We are actually open for your projects.\n\nIf you want some particular computer vision algorithm (document recognition, photo processing or more), drop us a line at fotoapparat.team@gmail.com.\n\n## License\n\n```\nCopyright 2017 Fotoapparat\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredapparat%2Ffacedetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredapparat%2Ffacedetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredapparat%2Ffacedetector/lists"}