Skip to content

Smart City: Stadium Scenario

yimm0815 edited this page Jan 20, 2020 · 10 revisions

The smart stadium scenario focuses on different counting techniques, including entrance people counting, service-point queue counting, and stadium seating zone crowd counting. Each use case implemented different GVA plugin (Gstreamer Video Analytics plugin), IR models from OpenVino Pre-Trained Models and custom transform to suit for different counting requirement. We will compare them below.

Use Case Configuration

Please refer to CMake Options for detailed instructions on how to set up each use case.

People Counting

People counting calculates how many people pass through the entrance in the past 5 secs.

  • gvadetect plus person-vehicle-bike-detection-crossroad-0078 are used as the first step to detect people in the frame as bounding box;
  • gvaclassify plus person-reidentification-retail-0079 are used to extract people's feature for next step usage;
  • gvapython plus custom transform do the post processing for people counting with a sliding-window algorithm: the feature vector are saved in a pool with timestamp attached to each person. For each new frame, we compare the recently detected people with the people in the pool. If the person's feature is saved before, we just update his timestamp; otherwise, we push the new people's feature into the pool. At the end of each frame update, we loop around the pool, anyone disappears for more than 5 sec, we remove him out of the pool to keep the size small.
cd build
cmake -DPLATFORM=Xeon -DSCENARIO=stadium -DNOFFICES=1 -DNCAMERAS=8,0,0 -DNANALYTICS=8,0,0 FRAMEWORK=gst ..

Crowd Counting

Crowd counting calculates how many people seat in each seating zone in the stadium. We separate the stadium into 8 zones, East Wing, North East Wing, North Wing, North West Wing, West Wing, South West Wing, South Wing and South East Wing. Each zone is currently surveilled by one camera, but one camera can be expanded to surveil multiple zones by configuration.

  • gvainference plus CSRNet model are used as the first step to detect total crowd number in the frame;
  • gvapython plus custom transform do the post processing for crowd counting with a bitmask algorithm: a list of zone number and its polygons that covered by the camera are sending to the cumstom transform along with the crowd counting result on the whole frame. We make a bitmask for each zone, and count crowd number only inside the bitmask;
  • to adjust bitmask for your own fixed camera, go sensor-info.json to add your own defined polygon;
  • to define your own zonemap, go zonemap-37.39856d-121.94866.json to add polygons for each zone.
cd build
cmake -DPLATFORM=Xeon -DSCENARIO=stadium -DNOFFICES=1 -DNCAMERAS=0,8,0 -DNANALYTICS=0,8,0 FRAMEWORK=gst ..
Bitmask Sample 1 Bitmask Sample 2

Queue Counting

Queue counting calculates how many people are in the restaurant, meeting room, phone booth or elevator etc.

cd build
cmake -DPLATFORM=Xeon -DSCENARIO=stadium -DNOFFICES=1 -DNCAMERAS=0,0,8 -DNANALYTICS=0,0,8 FRAMEWORK=gst ..

Combined Use Cases

All three use cases can be combined together. Below is an example of 2 people counting, 2 crowd counting and 2 queue counting running together. You can move around real-time camera display screen, track the statistic window and look into each analytics result. Feel free to explore more.

cd build
cmake -DPLATFORM=Xeon -DSCENARIO=stadium -DNOFFICES=1 -DNCAMERAS=2,2,2 -DNANALYTICS=2,2,2 FRAMEWORK=gst ..
  • Smart Stadium main UI page

  • Smart Stadium Camera Surveillance page (input the sensor id or set sensor=* for all, drag video into the main window)

  • Smart Stadium VA analysis page (click the zoom-in icon and drag video into the main window to enter the VA analysis page, click the zoom-out icon to get back to camera surveillance page)