{"id":23011912,"url":"https://github.com/chriamue/hog-detector","last_synced_at":"2026-05-18T04:40:16.055Z","repository":{"id":58088761,"uuid":"527561258","full_name":"chriamue/hog-detector","owner":"chriamue","description":"Histogram of Oriented Gradients and Object Detection","archived":false,"fork":false,"pushed_at":"2024-01-07T09:33:06.000Z","size":57689,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:21:12.493Z","etag":null,"topics":["histogram-of-oriented-gradients","hog-features","image-processing","object-detection","rust","wasm"],"latest_commit_sha":null,"homepage":"https://chriamue.github.io/hog-detector","language":"Rust","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/chriamue.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}},"created_at":"2022-08-22T12:46:40.000Z","updated_at":"2023-03-06T15:40:27.000Z","dependencies_parsed_at":"2024-01-01T12:33:25.356Z","dependency_job_id":null,"html_url":"https://github.com/chriamue/hog-detector","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/chriamue%2Fhog-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriamue%2Fhog-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriamue%2Fhog-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriamue%2Fhog-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriamue","download_url":"https://codeload.github.com/chriamue/hog-detector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246856674,"owners_count":20844974,"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":["histogram-of-oriented-gradients","hog-features","image-processing","object-detection","rust","wasm"],"created_at":"2024-12-15T10:11:45.837Z","updated_at":"2026-05-18T04:40:11.029Z","avatar_url":"https://github.com/chriamue.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hog-detector\n\n[![Github Repo](https://img.shields.io/badge/github-repo-green)](https://github.com/chriamue/hog-detector/)\n[![Github Pages Build](https://github.com/chriamue/hog-detector/actions/workflows/gh-pages.yml/badge.svg)](https://chriamue.github.io/hog-detector/)\n[![Benchmarks](https://github.com/chriamue/hog-detector/actions/workflows/bench.yml/badge.svg)](https://github.com/chriamue/hog-detector/actions/workflows/bench.yml)\n[![codecov](https://codecov.io/gh/chriamue/hog-detector/branch/main/graph/badge.svg?token=RJ6T5D9DZT)](https://codecov.io/gh/chriamue/hog-detector)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Demo](https://img.shields.io/badge/Demo-online-green.svg)](https://chriamue.github.io/hog-detector/)\n[![Doc](https://img.shields.io/badge/Docs-online-green.svg)](https://chriamue.github.io/hog-detector/hog_detector/)\n\nHistogram of Oriented Gradients and Object Detection\n\nThis project uses support vector machines (SVM) and histogram of oriented gradients (HOG) to detect objects in images. The SVM classifier is trained on HOG features extracted from training images to identify the objects in new images. The project is written in Rust and can be compiled to WebAssembly (WASM) for use in web applications.\n\nYou can find a [demo here](https://chriamue.github.io/hog-detector)\n\n![HogDetector](https://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.github.com/chriamue/hog-detector/master/docs/hog_detector.puml)\n\n## How it works\n\n1. A training dataset with positive and negative samples is given.\n2. HOG descriptors of the samples are calculated.\n3. A Linear Support Vector Machine is trained on the positive and negative samples.\n4. Using a sliding window, the svm classifier detects bounding boxes.\n5. Applying non-maximum suppression removes some of the bounding boxes.\n\n## Requirements\n\n* Rust\n* wasm-pack (for compiling to WASM)\n\n## Usage\n\n1. Clone the repository:\n\n    ```sh\n    git clone https://github.com/chriamue/hog-detector\n    cd hog-detector\n    ```\n\n2. Compile the code to WASM:\n\n    ```sh\n    trunk build --release\n    ```\n\n3. Run the Web version in your browser\n\n    ```sh\n    trunk serve --release\n    ```\n\nOpen your browser on [Localhost](http://localhost:8000)\n\n## Examples\n\nYou can find examples in example folder.\nThe mnist example loads the mnist dataset and trains hog on the numbers.\n\n```sh\ncargo run --features mnist --example mnist\n```\n\n## Testing\n\nThe project includes a test suite that can be run with:\n\n```sh\ncargo test\n```\n\nBenchmarks can be run with:\n\n```sh\ncargo bench\n```\n\n## Train data preparation\n\nFind a minimal annotation tool in the [demo](https://chriamue.github.io/hog-detector).\n\n## References\n\n[https://pyimagesearch.com/2014/11/10/histogram-oriented-gradients-object-detection/](https://pyimagesearch.com/2014/11/10/histogram-oriented-gradients-object-detection/)\n\n[Hard Negative Mining](https://openaccess.thecvf.com/content_ECCV_2018/papers/SouYoung_Jin_Unsupervised_Hard-Negative_Mining_ECCV_2018_paper.pdf)\n\n[Eye Dataset](https://github.com/tiruss/eye_detector/tree/master/eye_data)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriamue%2Fhog-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriamue%2Fhog-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriamue%2Fhog-detector/lists"}