π 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.
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.
π₯ You can download the UniCrowd dataset HERE. By downloading the dataset, you agree to adhere to the license conditions.
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
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
.
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
The UniCrowd Dataset is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Related paper:
π Soon available
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.