{"id":17018210,"url":"https://github.com/rashadgarayev/persondetection","last_synced_at":"2026-03-04T02:02:51.218Z","repository":{"id":192343881,"uuid":"246579373","full_name":"RashadGarayev/PersonDetection","owner":"RashadGarayev","description":"Person Detection using HOG Feature and SVM Classifier","archived":false,"fork":false,"pushed_at":"2020-03-11T19:31:07.000Z","size":67264,"stargazers_count":23,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T09:52:35.683Z","etag":null,"topics":["hog-features","image-classification","object-detection","opencv-python","person-detection","svm-classifier"],"latest_commit_sha":null,"homepage":null,"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/RashadGarayev.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,"zenodo":null}},"created_at":"2020-03-11T13:31:34.000Z","updated_at":"2025-03-13T14:07:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"25b99daa-6b04-458e-9649-e1be9af667ac","html_url":"https://github.com/RashadGarayev/PersonDetection","commit_stats":null,"previous_names":["rashadgarayev/persondetection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RashadGarayev/PersonDetection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RashadGarayev%2FPersonDetection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RashadGarayev%2FPersonDetection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RashadGarayev%2FPersonDetection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RashadGarayev%2FPersonDetection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RashadGarayev","download_url":"https://codeload.github.com/RashadGarayev/PersonDetection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RashadGarayev%2FPersonDetection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30069236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","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":["hog-features","image-classification","object-detection","opencv-python","person-detection","svm-classifier"],"created_at":"2024-10-14T06:44:55.425Z","updated_at":"2026-03-04T02:02:51.214Z","avatar_url":"https://github.com/RashadGarayev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Person Detection using HOG Feature and SVM Classifier\n\n\n\n\n### Tested \n\n```python3 visualize_image.py``` \n\n![Conv](test/Person.png)\n\n## Usage\n```git clone https://github.com/RashadGarayev/PersonDetection``` \n\n```cd PersonDetection``` \n\n### For training\n  \n```python3 training_SVM.py```  \n\n* for real-time person detection :\n\n```python3 visualize_real_time.py```  \n\n-----------------------------------------------------------------------------------------------------------------------\n\n ## The sliding windows detection algorithm\n \n In object detection problems, we generally have to find all the possible objects in the image like all the cars in the image, all the pedestrians in the image, all the bikes in the image, etc. To achieve this, we use an algorithm known as Sliding window detection. Let us understand this algorithm.\n * In this algorithm, we choose a grid cell of a specific size. Let us choose the grid cell of size 2x2.\n * We pass the above grid cell through the image and convolute the part of the image in the grid cell and predict the output.\n * Then we slide the grid cell through stride-2 and then convolute the next part of the image.\n * In this way, we go cover the whole image.\n * We repeat the same procedure with different grid cells size.\n \n\n![Conv](test/sd.png)\n\n\n![Conv](test/sliding.gif)\n\n## Histogram of oriented gradients\n\n![Conv](test/hog-vis.png)\n\nHistogram of oriented gradients (HOG) is a feature descriptor used to detect objects in computer vision and image processing. The HOG descriptor technique counts occurrences of gradient orientation in localized portions of an image - detection window, or region of interest (ROI).\n\nImplementation of the HOG descriptor algorithm is as follows:\n\nDivide the image into small connected regions called cells, and for each cell compute a histogram of gradient directions or edge orientations for the pixels within the cell.\nDiscretize each cell into angular bins according to the gradient orientation.\nEach cell's pixel contributes weighted gradient to its corresponding angular bin.\nGroups of adjacent cells are considered as spatial regions called blocks. The grouping of cells into a block is the basis for grouping and normalization of histograms.Normalized group of histograms represents the block histogram. The set of these block histograms represents the descriptor.\n\nThe following figure demonstrates the algorithm implementation scheme:\n\n![Conv](test/hog.png)\n\n\nComputation of the HOG descriptor requires the following basic configuration parameters:\n\n    Masks to compute derivatives and gradients\n    Geometry of splitting an image into cells and grouping cells into a block\n    Block overlapping\n    Normalization parameters\n\nAccording to (Source : https://lear.inrialpes.fr/people/triggs/pubs/Dalal-cvpr05.pdf) the recommended values for the HOG parameters are:\n\n    1D centered derivative mask [-1, 0, +1]\n    Detection window size is 64x128\n    Cell size is 8x8\n    Block size is 16x16 (2x2 cells)\n    \n    \n\n![Conv](test/hog1.gif)\n\n\n### Reference\n\n* https://lear.inrialpes.fr/people/triggs/pubs/Dalal-cvpr05.pdf\n* http://www.cs.utoronto.ca/~fidler/slides/CSC420/lecture17.pdf\n* https://arxiv.org/pdf/1406.2419.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadgarayev%2Fpersondetection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frashadgarayev%2Fpersondetection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadgarayev%2Fpersondetection/lists"}