{"id":15657362,"url":"https://github.com/kalebu/real-time-vehicle-dection-python","last_synced_at":"2025-05-01T09:56:33.193Z","repository":{"id":37076469,"uuid":"261134090","full_name":"Kalebu/Real-time-Vehicle-Dection-Python","owner":"Kalebu","description":"A python project that does real-time vehicle detection using a trained car-cascade Model ","archived":false,"fork":false,"pushed_at":"2023-06-15T09:54:39.000Z","size":2900,"stargazers_count":37,"open_issues_count":2,"forks_count":40,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T09:56:27.923Z","etag":null,"topics":["article","computervision","data-science","machine-learning","object-detection","python","python-3","python-datascience","python-tanzania","pythonprojects","vehicle-dection-python","vehicle-detection"],"latest_commit_sha":null,"homepage":"https://kalebujordan.dev/real-time-vehicle-detection-using-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kalebu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"patreon":"kalebujordan"}},"created_at":"2020-05-04T09:41:34.000Z","updated_at":"2025-04-21T17:32:04.000Z","dependencies_parsed_at":"2024-10-23T05:09:26.557Z","dependency_job_id":"de237aba-8f6e-4f48-8d1f-aae4bd5cfa53","html_url":"https://github.com/Kalebu/Real-time-Vehicle-Dection-Python","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/Kalebu%2FReal-time-Vehicle-Dection-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalebu%2FReal-time-Vehicle-Dection-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalebu%2FReal-time-Vehicle-Dection-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalebu%2FReal-time-Vehicle-Dection-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kalebu","download_url":"https://codeload.github.com/Kalebu/Real-time-Vehicle-Dection-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251856992,"owners_count":21655119,"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":["article","computervision","data-science","machine-learning","object-detection","python","python-3","python-datascience","python-tanzania","pythonprojects","vehicle-dection-python","vehicle-detection"],"created_at":"2024-10-03T13:06:28.127Z","updated_at":"2025-05-01T09:56:33.169Z","avatar_url":"https://github.com/Kalebu.png","language":"Python","funding_links":["https://patreon.com/kalebujordan","https://www.patreon.com/kalebujordan"],"categories":[],"sub_categories":[],"readme":"\u003csamp\u003e\n    \n# [Real-time-Vehicle-Dection-Python](https://kalebujordan.dev/real-time-vehicle-detection-using-python/)\n\nHi guys, This repository consist of a source code of script to detect cars in a video/camera frame and then draw rectangaluar boxes around them.\n\nThe **ML algorithms** used for detecting cars and bounding boxes coordinates is a pretrained cascade model [Haarcascade car](https://github.com/Kalebu/Real-time-Vehicle-Dection-Python/blob/master/haarcascade_car.xml).\n\n[![Become a patron](pictures/become_a_patron_button.png)](https://www.patreon.com/kalebujordan)\n\n## Where is the full article ?\n\nThe full article for this project is originally published on [my blog](kalebujordan.dev) with an article with title [Real-time vehicle detection in python](https://kalebujordan.dev/real-time-vehicle-detection-using-python/)\n\n## Getting started\n\nFirstly we have to clone the project repository or download the zip of project and then extract it.\n\n```bash\ngit clone https://github.com/Kalebu/Real-time-Vehicle-Dection-Python\ncd Real-time-Vehicle-Dection-Python\nReal-time-Vehicle-Dection-Python -\u003e\n```\n\n## Dependencies\n\nNow once we have the project repo in our local directory, now lets install the dependecies required to run our script\n\n```bash\npip install opencv-python\n```\n\n## Sample video\n\nThe sample video we used in this project is [**cars.mp4**](https://github.com/Kalebu/Real-time-Vehicle-Dection-Python/blob/master/cars.mp4) which will come as you download or clone the repository, to load a different video with different filename, you might wanna change the source code a bit.\n\n```python\ndef Simulator():\n    CarVideo = cv2.VideoCapture('cars.mp4') # change cars.mp4 to name of your vidoe\n    while CarVideo.isOpened():\n        ret, frame = CarVideo.read()\n        controlkey = cv2.waitKey(1)\n        if ret:        \n            cars_frame = detect_cars(frame)\n            cv2.imshow('frame', cars_frame)\n        else:\n            break\n        if controlkey == ord('q'):\n            break\n\n    CarVideo.release()\n    cv2.destroyAllWindows()\n\n```\n\n## **[\u003cimg src=\"./pictures/rocket.png\" width=\"50\" height=\"50\"/\u003e](./pictures/rocket.png) running our script**\n\nNow you can launch your scripts;\n\n```bash\npython app.py \n```\n\nIf you use the provided sample video, your script is going to look as shown in the picture below;\n\n\u003cimg src=\"sample.png\" alt=\"drawing\" width=\"400\" height=\"200\"/\u003e\n\n## Issues ?\n\nAre you facing any issue while trying to run the script, well then raise an issue and I will do my best fixing it as soon as I can\n\n## Credits\n\nAll the credits to [kalebu](github.com/kalebu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalebu%2Freal-time-vehicle-dection-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalebu%2Freal-time-vehicle-dection-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalebu%2Freal-time-vehicle-dection-python/lists"}