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
A newer version of the Streamlit SDK is available: 1.67.0
metadata
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
- The user uploads an image
- Objects are detected using
cvlib.detect_common_objects - Bounding boxes are drawn on the image
- The number of cars and trucks is counted
- Results are saved to
src/results.jsonandsrc/detected.jpg
βΆοΈ Run locally
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