EnYa32 commited on
Commit
7f3146d
Β·
verified Β·
1 Parent(s): 7e99265

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -5
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: ObjectDetection
3
- emoji: πŸš€
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
@@ -12,9 +12,37 @@ short_description: Detect and count cars/trucks in images (cvlib + OpenCV).
12
  license: mit
13
  ---
14
 
15
- # Welcome to Streamlit!
16
 
17
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
 
18
 
19
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: ObjectDetection
3
+ emoji: πŸš—
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
 
12
  license: mit
13
  ---
14
 
15
+ # πŸš— Vehicle Counter – Object Detection App
16
 
17
+ This project uses computer vision to detect and count vehicles in an image.
18
+ A pre-trained object detection model from **cvlib** (YOLO) is used to identify cars and trucks.
19
 
20
+ The results are saved as:
21
+ - an output image with bounding boxes (`detected.jpg`)
22
+ - a JSON file with the object counts (`results.json`)
23
+
24
+ ---
25
+
26
+ ## πŸ” Features
27
+ - Upload an image (JPG / PNG / WEBP)
28
+ - Detect vehicles using cvlib and OpenCV
29
+ - Count cars and trucks automatically
30
+ - Save results as JSON
31
+ - Display detected image in a Streamlit app
32
+
33
+ ---
34
+
35
+ ## 🧠 How it works
36
+ 1. The user uploads an image
37
+ 2. Objects are detected using `cvlib.detect_common_objects`
38
+ 3. Bounding boxes are drawn on the image
39
+ 4. The number of cars and trucks is counted
40
+ 5. Results are saved to `src/results.json` and `src/detected.jpg`
41
+
42
+ ---
43
+
44
+ ## ▢️ Run locally
45
+
46
+ ```bash
47
+ pip install -r requirements.txt
48
+ streamlit run app.py