{"id":18246702,"url":"https://github.com/atomashpolskiy/rustface","last_synced_at":"2025-10-09T13:37:16.090Z","repository":{"id":46155447,"uuid":"115044066","full_name":"atomashpolskiy/rustface","owner":"atomashpolskiy","description":"Face detection library for the Rust programming language","archived":false,"fork":false,"pushed_at":"2024-04-04T09:23:25.000Z","size":3671,"stargazers_count":425,"open_issues_count":5,"forks_count":39,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-09-09T16:36:55.598Z","etag":null,"topics":["face-detection","library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomashpolskiy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-12-21T20:24:40.000Z","updated_at":"2025-08-28T08:01:18.000Z","dependencies_parsed_at":"2024-04-04T10:43:00.650Z","dependency_job_id":null,"html_url":"https://github.com/atomashpolskiy/rustface","commit_stats":{"total_commits":173,"total_committers":7,"mean_commits":"24.714285714285715","dds":"0.35838150289017345","last_synced_commit":"93c97ed7d0fa1cc3553f5483d865292cc37ceb98"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/atomashpolskiy/rustface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomashpolskiy%2Frustface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomashpolskiy%2Frustface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomashpolskiy%2Frustface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomashpolskiy%2Frustface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomashpolskiy","download_url":"https://codeload.github.com/atomashpolskiy/rustface/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomashpolskiy%2Frustface/sbom","scorecard":{"id":215130,"data":{"date":"2025-08-11","repo":{"name":"github.com/atomashpolskiy/rustface","commit":"fa3d5b5d576c91d1c8a099af381e0f0906a0d3a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 7/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0145 / GHSA-g98v-hv3f-hcfr","Warn: Project is vulnerable to: RUSTSEC-2024-0375","Warn: Project is vulnerable to: RUSTSEC-2020-0023 / GHSA-q2gj-9r85-p832","Warn: Project is vulnerable to: RUSTSEC-2020-0147","Warn: Project is vulnerable to: RUSTSEC-2021-0140","Warn: Project is vulnerable to: RUSTSEC-2021-0127"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T01:30:17.770Z","repository_id":46155447,"created_at":"2025-08-17T01:30:17.770Z","updated_at":"2025-08-17T01:30:17.770Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001489,"owners_count":26083102,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["face-detection","library"],"created_at":"2024-11-05T09:27:22.639Z","updated_at":"2025-10-09T13:37:16.068Z","avatar_url":"https://github.com/atomashpolskiy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\n    \u003ca href=\"http://atomashpolskiy.github.io/rustface/\"\u003eRustface\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003e\n\u003csup\u003e\n\u003cbr/\u003eSeetaFace detection library for the Rust programming language\n\u003c/sup\u003e\n\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://atomashpolskiy.github.io/static/img/scientists.png\" alt=\"Bt Example\"\u003e\n    \u003ci\u003eExample of demo program output\u003c/i\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://crates.io/crates/rustface\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/rustface.svg\"\n             alt=\"crates.io\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://docs.rs/rustface\"\u003e\n            \u003cimg src=\"https://docs.rs/rustface/badge.svg\"\n                 alt=\"docs.rs\"\u003e\n        \u003c/a\u003e\n    \u003ca href=\"https://travis-ci.com/github/atomashpolskiy/rustface\"\u003e\n        \u003cimg src=\"https://travis-ci.com/atomashpolskiy/rustface.svg?branch=master\"\n             alt=\"Linux build\"\u003e\n    \u003c/a\u003e    \n    \u003ca href=\"https://opensource.org/licenses/BSD-2-Clause\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-BSD-blue.svg\"\n             alt=\"License\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n* **[SEETAFACE C++](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceDetection)** – Github repository for the original library\n* **[PYTHON BINDINGS](https://github.com/torchbox/rustface-py)** – call Rustface from Python code\n* **[LICENSE](https://github.com/atomashpolskiy/rustface/blob/master/LICENSE)** – licensed under permissive BSD 2-Clause\n\n## About\n\nSeetaFace Detection is an implementation of Funnel-Structured cascade, which is designed for **real-time** multi-view face detection. FuSt aims at a good trade-off between accuracy and speed by using a coarse-to-fine structure. It consists of multiple view-specific fast LAB cascade classifiers at early stages, followed by coarse Multilayer Perceptron (MLP) cascades at later stages. The final stage is one unified fine MLP cascade, processing all proposed windows in a centralized style. \n\n[Read more...](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceDetection#seetaface-detection)\n\n## Performance\n\nYou can run the criterion benchmarks using `cargo bench`.\n\n### Using nightly Rust\n\nThe `nightly` branch contains a slightly (~20%) faster version of rustface. This speedup is made possible by using explicit SIMD intrinsics.  If you want to use this branch, you need an older nightly toolchain.\n\n```\nrustup toolchain install nightly-2018-01-15\nrustup default nightly-2018-01-15\n```\n\nRegarding the performance of the `nightly` branch: crude manual benchmarking showed that this nightly Rust version of SeetaFace is _slightly faster_ than the original C++ version. In this particular test the Rust version has been **4% faster on average** than its C++ counterpart. When using multiple threads and enabling LTO (link-time optimization), Rust performance is a tad better (I observe a **8% boost**):\n\n```\nMulti-threaded (Rayon threads set to 2)\nLTO enabled\n\n* Rustface *\nsamples (ms): 787,789,795,795,787,785,791,799,795,788\nmean (ms): 791.1\nstddev (ms): 4.39\n```\n\n\n\n## Usage example\n\n```rust\nextern crate rustface;\n\nuse rustface::{Detector, FaceInfo, ImageData};\n\nfn main() {\n    let mut detector = rustface::create_detector(\"/path/to/model\").unwrap();\n    detector.set_min_face_size(20);\n    detector.set_score_thresh(2.0);\n    detector.set_pyramid_scale_factor(0.8);\n    detector.set_slide_window_step(4, 4);\n    \n    let mut image = ImageData::new(bytes, width, height);\n    for face in detector.detect(\u0026mut image).into_iter() {\n        // print confidence score and coordinates\n        println!(\"found face: {:?}\", face);\n    }\n}\n```\n\n## How to build\n\nThe project is a library crate and also contains a runnable example for demonstration purposes.\n\nThen just use the standard Cargo `build` command:\n\n```\ncargo build --release\n```\n\n## Run demo\n\nCode for the demo is located in `examples/image_demo.rs` file. It performs face detection for a given image and saves the result into a file in the working directory.\n\nYou can run the demo using:\n\n```\ncargo run --release --example image_demo model/seeta_fd_frontal_v1.0.bin assets/test/scientists.jpg\n```\n\nPlease note that this library makes use of [Rayon](https://github.com/rayon-rs/rayon) framework to parallelize some computations. By default, **Rayon** spawns the same number of threads as the number of CPUs (logicals cores) available. Instead of making things faster, the penalty of switching between so many threads may severely hurt the performance, so it's strongly advised to keep the number of threads small by manually setting `RAYON_NUM_THREADS` environment variable.\n\n```\n# empirically found to be the sweet spot for the number of threads\nexport RAYON_NUM_THREADS=2\ncargo run --release --example image_demo model/seeta_fd_frontal_v1.0.bin assets/test/scientists.jpg\n```\n\nNote that Rayon can be disabled entirely at compile time by providing the `--no-default-features` flag.\n\n## TODO\n\n* Use stable SIMD intrinsics when available\n* Benchmark benefit of parallelisation. Compiler improvements may have reduced the relative benefit of parallel processing, especially when running on smaller images. Simplify where possible.\n* Parallelize remaining CPU intensive loops\n* Tests (it would make sense to start with an integration test for `Detector::detect`, based on the results retrieved from the original library)\n\n## Authors\n\n- Andrei Tomashpolskiy [@atomashpolskiy](https://github.com/atomashpolskiy)\n  \n  _Original developer and maintainer_\n\n- Jurriaan BW [@jjhbw](https://github.com/jjhbw)\n\n  _Contributor and chief maintainer_\n  \n- Ashley [@expenses](https://github.com/expenses)\n\n  _Contributor. Added the switch from OpenCV to [Image](https://crates.io/crates/image)._\n\nThis library is based on the following works:\n\n- Face detection method described in the paper: _\"Funnel-structured cascade for multi-view face detection with alignment awareness, Shuzhe Wu, Meina Kan, Zhenliang He, Shiguang Shan, Xilin Chen. In Neurocomputing (under review)\"_\n\n- [original C++ implementation](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceDetection)\n\n## License\n\nOriginal SeetaFace Detection is released under the [BSD 2-Clause license](https://github.com/seetaface/SeetaFaceEngine/blob/master/LICENSE). This project is a derivative work and uses the same license as the original.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomashpolskiy%2Frustface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomashpolskiy%2Frustface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomashpolskiy%2Frustface/lists"}