Spaces:
Sleeping
Sleeping
|
Download README.md from EnYa32/ObjectDetection: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/EnYa32/ObjectDetection/resolve/main/README.md
- Command line
-
hf download hf://spaces/EnYa32/ObjectDetection/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnYa32/ObjectDetection/resolve/main/README.md
1.37 kB
| title: ObjectDetection | |
| emoji: π | |
| colorFrom: red | |
| colorTo: red | |
| sdk: streamlit | |
| app_file: src/streamlit_app.py | |
| pinned: false | |
| short_description: Detect and count cars/trucks in images (cvlib + OpenCV). | |
| license: mit | |
| # π Vehicle Counter β Object Detection App | |
| This project uses computer vision to detect and count vehicles in an image. | |
| A pre-trained object detection model from **cvlib** (YOLO) is used to identify cars and trucks. | |
| The results are saved as: | |
| - an output image with bounding boxes (`detected.jpg`) | |
| - a JSON file with the object counts (`results.json`) | |
| --- | |
| ## π Features | |
| - Upload an image (JPG / PNG / WEBP) | |
| - Detect vehicles using cvlib and OpenCV | |
| - Count cars and trucks automatically | |
| - Save results as JSON | |
| - Display detected image in a Streamlit app | |
| --- | |
| ## π§ How it works | |
| 1. The user uploads an image | |
| 2. Objects are detected using `cvlib.detect_common_objects` | |
| 3. Bounding boxes are drawn on the image | |
| 4. The number of cars and trucks is counted | |
| 5. Results are saved to `src/results.json` and `src/detected.jpg` | |
| --- | |
| ## βΆοΈ Run locally | |
| ```bash | |
| pip install -r requirements.txt | |
| streamlit run app.py | |
| π Project Structure | |
| . | |
| βββ app.py | |
| βββ requirements.txt | |
| βββ README.md | |
| βββ src/ | |
| βββ results.json | |
| βββ detected.jpg | |
| π Output Example | |
| { | |
| "cars": 11, | |
| "trucks": 3 | |
| } | |
| Author | |
| Enes Yamac |