/UniCrowd

Creative Commons Attribution 4.0 InternationalCC-BY-4.0

πŸšΆβ€β™‚οΈ UniCrowd πŸšΆβ€β™‚οΈ

License: CC BY-NC 4.0

πŸš€ Simulation is a powerful tool to easily generate annotated data, and a highly desirable feature, especially in those domains where learning models need large training datasets. Real-world data, in fact, do not often comply with the needs of machine learning and deep learning solutions, which have proven to be extremely data-hungry. Despite the initial skepticism of a portion of the scientific community, the potential of simulation has been largely confirmed in many application areas, and the recent developments in terms of rendering and virtualization engines, have shown a good ability also in representing complex scenes. This includes environmental factors, such as weather conditions and surface reflectance, as well as human-related events, like human actions and behaviors. We present a human crowd simulator, called UniCrowd, and its associated validation pipeline. We show how the simulator can generate annotated data, suitable for vision-based tasks, as crowd counting, detection, and tracking, as well as behavior-oriented tasks like trajectory prediction and anomaly detection.

banner

πŸ“š UniCrowd Dataset

The UniCrowd dataset comprises 9 scenes recorded in the UniCrowd simulator, developed with Unity. Each scene includes 5 videos, each captured by a different camera. These scenes vary in terms of the time of day they were recorded and the size of the simulated crowd.

banner

πŸ“₯ You can download the UniCrowd dataset HERE. By downloading the dataset, you agree to adhere to the license conditions.

πŸ“¦ What You Will Find

The dataset consists of 9 folders, each identified by a unique name, and a Readme.txt file. Each folder contains:

  • 5 folders, each containing one RGB video recorded by a camera
  • 5 folders, each containing one video representing the semantic segmentation of the corresponding RGB video
  • 1 folder with annotations in JSON files

πŸ“· Extract frames

To extract individual frames from the videos, you need to meet the following requirements:

  • ffmpeg 2020-2022 built with gcc 12.1.0

To extract the frames from a video losslessly execute the following command lines:

  • (for low density simulations): ffmpeg -i $VideoFilename.mp4 -start_number 256 $ImageFilename_%03d.png
  • (for medium density simulations): ffmpeg -i $VideoFilename.mp4 -start_number 636 $ImageFilename_%03d.png
  • (for high density simulations): ffmpeg -i $VideoFilename.mp4 -start_number 952 $ImageFilename_%03d.png

Choose $ImageFilename depending on whether the video you are processing is rgb or segmentation.

πŸ“„ Annotations

The annotations are included in JSON files, falling into two main categories of data:

  • Captures: These contain ground truth information about segmentation, bounding boxes, and pedestrian poses.
  • Metrics: These contain ground truth data related to people counting.

Due to the size of the dataset, there are multiple files for each simulation.

For each CAPTURE file, the structure is as follows:

  • πŸ†” Id: Capture ID
  • πŸ”„ Sequence ID: Sequence identifier
  • πŸ“… Step: Capture step number
  • πŸ•°οΈ Timestamp: Capture timestamp
  • πŸ“· Sensor Data: Camera-related data
    • πŸ†” Id: Sensor ID (e.g., Pro Cam1, Pro Cam2, ...)
    • πŸ†” Ego ID: Ego identifier for the camera
    • πŸ“Έ Modality: Camera modality (always set as "camera")
    • πŸ“ Translation: Sensor position within the simulation world
    • πŸ”„ Rotation: Sensor rotation within the simulation world
    • πŸ“Έ Camera Intrinsic: Intrinsic camera parameters
    • πŸ” Projection: Camera projection type (always set as "perspective")
  • πŸ‘€ Ego: Represents the GameObject to which the sensor is attached (in our case, the camera stands alone, so ego information can be ignored)
    • πŸ†” Id: Ego ID
    • πŸ“ Translation: GameObject position within the simulation world
    • πŸ”„ Rotation: GameObject rotation within the simulation world
    • πŸš€ Velocity: GameObject velocity
    • πŸš€ Acceleration: GameObject acceleration
  • πŸ“¦ Filename: Comprises the parent folder and the image name
  • πŸ“ Format: Image format (always PNG)
  • πŸ“ Annotations: Lists various ground truth data obtained from the capture, including Segmentation image, Bounding Box data, and Pose data
    • πŸ†” Id: Segmentation capture ID
    • πŸ“ Annotation Definition: Annotation information for segmentation capture (usually identical to the ID)
    • πŸ“¦ Filename: Comprises the parent folder and the image name
    • πŸ†” Id: Bounding box ID
    • πŸ“ Annotation Definition: Annotation information for bounding box data (usually identical to the ID)
    • πŸ“ Values: Bounding box values for each pedestrian within the scene
      • πŸ†” Label ID: Pedestrian label ID
      • πŸ†” Label Name: Pedestrian name
      • πŸ†” Instance ID: ID of the pedestrian instance within the simulation
      • ➑️ X: X-coordinate of the bounding box origin
      • ⬇️ Y: Y-coordinate of the bounding box origin
      • ↔️ Width: Width of the bounding box
      • ⬆️ Height: Height of the bounding box
    • πŸ†” Id: Skeleton ID
    • πŸ“ Annotation Definition: Annotation information for skeleton data (usually identical to the ID)
    • πŸ“ Values: Skeleton data for each pedestrian within the scene
      • πŸ†” Label ID: Pedestrian label ID
      • πŸ†” Instance ID: ID of the pedestrian instance within the simulation
      • πŸ†” Template GUID: ID of the skeleton instance
      • 🧍 Pose: Ground truth pose information
      • 🎯 Keypoints: Collection of joint data following the COCO skeleton structure
        • πŸ†” Index: Joint index
        • ➑️ X: X-coordinate of the joint
        • ⬇️ Y: Y-coordinate of the joint
        • 🎯 State: Joint visibility status (0: does not exist, 1: not visible, 2: visible) within the scene

For each METRIC, the structure is as follows:

  • πŸ†” Capture ID: ID of the capture (corresponding to the one in the capture file)
  • πŸ“ Annotation ID: Annotation information about the capture
  • πŸ”„ Sequence ID: Sequence identifier
  • πŸ“… Step: Capture step number
  • πŸ“‹ Metric Definition: Metric definition
  • πŸ“Š Values: People counting ground truth values within the simulation
    • πŸ†” Label ID: Pedestrian label ID
    • πŸ†” Label Name: Pedestrian name
    • πŸ“ˆ Count: Indicates whether the pedestrian is visible in the scene or not

πŸ“œ License

The UniCrowd Dataset is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

πŸ“– Citation

Related paper:

πŸ”œ Soon available

πŸ“‘ Summary

UniCrowd offers a valuable dataset for vision-based tasks and behavior-oriented analysis. Download the dataset, extract frames as needed, and explore the rich annotations to advance your research in crowd analysis and related fields.