File size: 2,078 Bytes
22ba58d
 
 
 
 
 
637f281
22ba58d
 
 
 
 
2704b9b
d1424b3
2704b9b
 
db6a21b
d1424b3
 
 
 
 
2704b9b
 
 
 
 
 
d1424b3
2704b9b
d1424b3
2704b9b
 
 
 
 
d1424b3
2704b9b
d1424b3
2704b9b
 
 
 
 
d1424b3
2704b9b
d1424b3
2704b9b
 
 
 
d1424b3
2704b9b
d1424b3
2704b9b
 
 
 
d1424b3
2704b9b
d1424b3
2704b9b
 
 
637f281
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: Store Entry People Counter
emoji: 🏪
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.23.0
app_file: app.py
pinned: false
license: apache-2.0
---

# Store Entry People Counter

This Hugging Face Space provides an interface to count the number of people entering through a line in a video (e.g., store entrance). It uses YOLOv8 for person detection and tracking.

[![Open In Spaces](https://huggingface.co/front/assets/huggingface_logo.svg)](https://huggingface.co/spaces/asvs/store-entry-counter)

## Features

- Real-time person detection using YOLOv8
- Object tracking to count unique entries
- Visual feedback:
  - Green line: Counting threshold
  - Blue boxes: Detected people
  - Yellow dots: Tracking points
  - Red circles: Entry indicators
  - Live counter with background

## How to Use

1. Open the Space in your browser
2. Upload a video file showing people entering (supports most video formats)
3. Wait for processing (time depends on video length)
4. View the processed video with counting visualization
5. See the final count in the results box

## Understanding the Output

- **Green Line**: This is the counting threshold. When people cross this line from top to bottom, they are counted
- **Blue Boxes**: Shows detected people in each frame
- **Yellow Dots**: Tracks the position of each person
- **Red Circles**: Appears when someone crosses the line and is counted
- **Counter**: Shows the running total of people who have entered

## Technical Details

- Uses YOLOv8 for accurate person detection
- Implements object tracking to maintain person identity across frames
- Counts unique crossings to avoid double-counting
- Processes video frames sequentially with progress indication

## Limitations

- Best results with clear, unobstructed view of people
- May not work well in extremely crowded scenes
- Video quality affects detection accuracy
- Processing time depends on video length and resolution

## Credits

Built using:
- [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics)
- [Gradio](https://gradio.app/)
- OpenCV