Skip to content

Exporting Crowd Estimation data

How to Export the output image using RTSP

This guide walks you through the process of setting up a Crowd Estimation instance to export the output buffer (with points and people counter) as an RTSP stream. We'll be using the Crowd Estimation/video playlist 720p instance as an example.

  1. Create a copy of the instance by saving it in the user instances:

    Save as

    Save instance

  2. Access the Setup windows of the new instance.

    Cog icon

  3. Go to the Export tab and click on the Add Custom Export Options button.

    Add export option

  4. Configure the output to use the right data type and format

  5. Click "Ok" and save the changes.

  6. Start the instance

  7. Confirm that the output is being streamed to rtsp://127.0.0.1:8554/demo. Here's how to do it using VLC

How to Export people count using MQTT

This guide walks you through the process of setting up a Crowd Estimation instance to export the total number of people in the image using MQTT.

  1. If the instance is running, stop it.

  2. Go to the export settings, and add a new export option.

  3. Configure the output to use the right data type and format

  4. Click Ok and save the changes

  5. Download and run the following Python script:

    mqtt_listen_people_count.py

    python mqtt_listen_people_count.py
    

    Note

    The script requires python 3.7+ and paho-mqtt which can be installed by running pip install paho-mqtt

  6. Start the My Instances/video playlist 720p instance. You should be seeing the number of people in the console. Each line represents a frame in the input source.