{"id":28240310,"url":"https://github.com/jarif87/vehicle-detection-app","last_synced_at":"2026-04-21T10:03:22.765Z","repository":{"id":293628766,"uuid":"984636448","full_name":"jarif87/Vehicle-Detection-App","owner":"jarif87","description":"Vehicle Detection App: A Flask web app that detects and counts cars and buses in images using OpenCV with a modern UI, image previews and responsive design.","archived":false,"fork":false,"pushed_at":"2025-05-16T09:11:39.000Z","size":8955,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T14:12:23.839Z","etag":null,"topics":["bus","cars","harcascades","image","opencv-python","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/jarif87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2025-05-16T08:55:43.000Z","updated_at":"2025-05-16T09:13:36.000Z","dependencies_parsed_at":"2025-05-16T10:36:45.428Z","dependency_job_id":null,"html_url":"https://github.com/jarif87/Vehicle-Detection-App","commit_stats":null,"previous_names":["jarif87/vehicle-detection-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarif87%2FVehicle-Detection-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarif87%2FVehicle-Detection-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarif87%2FVehicle-Detection-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarif87%2FVehicle-Detection-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarif87","download_url":"https://codeload.github.com/jarif87/Vehicle-Detection-App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarif87%2FVehicle-Detection-App/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259123923,"owners_count":22808876,"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":["bus","cars","harcascades","image","opencv-python","python"],"created_at":"2025-05-19T03:13:00.145Z","updated_at":"2026-04-21T10:03:22.713Z","avatar_url":"https://github.com/jarif87.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vehicle Detection \u0026 Classification App\r\n\r\nA Flask-based web application that detects and counts cars and buses in uploaded images using OpenCV Haar cascades. The app features a modern, responsive UI with image previews, animated cards, and a vibrant design powered by Materialize CSS.\r\n\r\n## Features\r\n- Upload images (PNG, JPG, JPEG, WebP) to detect vehicles.\r\n- Detects both cars (red rectangles) and buses (green rectangles) together.\r\n- Displays processed images with vehicle counts (e.g., \"3 cars and 2 buses found\").\r\n- Attractive UI with gradient backgrounds, hover animations, and a loading spinner.\r\n- Responsive design for mobile, tablet, and desktop.\r\n- Error handling for invalid files or processing issues.\r\n- Image preview before processing.\r\n\r\n## Prerequisites\r\n- Python 3.8+\r\n- pip for installing dependencies\r\n- Git (optional, for cloning)\r\n\r\n## Installation\r\n\r\n1. **Clone the Repository** (or download the project files):\r\n   ```bash\r\n   git clone \u003crepository-url\u003e\r\n   cd vehicle-detection-app\r\n\r\n2. **Create a Virtual Environment (recommended):**\r\n\r\n```\r\npython -m venv venv\r\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\r\n```\r\n\r\n3. **Install Dependencies:**\r\n#### Ensure requirements.txt is in the project root:\r\n\r\n\r\n```pip install -r requirements.txt```\r\n\r\n\r\n4. **Contents of requirements.txt:**\r\n```\r\nflask\r\nopencv-python\r\nnumpy\r\npillow\r\nwerkzeug\r\n```\r\n\r\n5. **Set Up Directories:**\r\n### Create the uploads directory:\r\n```\r\nmkdir -p static/uploads\r\n```\r\n\r\n6. **Ensure the following files are in place:**\r\n```\r\nstatic/cascade/cars.xml\r\n\r\nstatic/cascade/Bus_front.xml\r\n\r\nstatic/images/white_bg.jpg\r\n```\r\n7. **Project Structure**\r\n```\r\nvehicle-detection-app/\r\n├── static/\r\n│   ├── cascade/\r\n│   │   ├── cars.xml           # Haar cascade for cars\r\n│   │   ├── Bus_front.xml      # Haar cascade for buses\r\n│   ├── uploads/               # Processed images\r\n│   ├── images/\r\n│   │   ├── white_bg.jpg       # Default image\r\n│   ├── style.css              # Custom styles\r\n├── templates/\r\n│   ├── index.html             # Main HTML template\r\n├── app.py                     # Flask application\r\n├── requirements.txt           # Dependencies\r\n├── README.md                  # This file\r\n```\r\n\r\n# Usage\r\n1. Run the Application:\r\n\r\n```\r\npython app.py\r\nThe app will start in debug mode at http://127.0.0.1:5000.\r\n\r\n\r\n```\r\n# **Access the App:**\r\n```\r\nOpen a browser and navigate to http://127.0.0.1:5000.\r\n```\r\n\r\n# **Upload an Image:**\r\n- Click \"Browse\" to select an image (PNG, JPG, JPEG, or WebP).\r\n\r\n- View the image preview.\r\n\r\n- Click \"Process\" to detect vehicles.\r\n\r\n- The result card will show the processed image with red (cars) and green (buses) rectangles, plus a count (e.g., \"2 cars and 1 buses found\").\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarif87%2Fvehicle-detection-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarif87%2Fvehicle-detection-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarif87%2Fvehicle-detection-app/lists"}