The scripts in this folder allow you to generate synthetic datasets that either:
- Focus on social interactions between pedestrians and exclude human-space interactions
- Comprise human-space interactions in addition to social interactions between pedestrians
![]() |
![]() |
|---|---|
| Weak social interactions between pedestrians | Strong social interactions between pedestrians |
As described in the thesis, we adapt the Social Force Model [1] to generate datasets for which we can freely define the
impact of social interactions on the motion of pedestrians. For this, we specify the magnitude and range of the social forces between pedestrians by modifying the parameters V0 and sigma.
To generate datasets that exclusively focus on the interactions between pedestrians, run the script main/GenPedPedScene.py. A detailed explanation of the possible arguments can be found here. For example, to generate a dataset that simulates pedestrians moving in square from one randomly selected side to another randomly selected side run the script like this:
python main/GenPedPedScene.py --V0 2 --sigma 1.303 --scenario square
The datasets generated are saved in the ./Experiments/datasets folder. Make sure to specify the values of --V0 and --sigma of the repulsive potential between pedestrians for which you want to generate the dataset.
To generate a training, validation and test set on which you can train, validate and test your trajectory prediction models, you just need to set the --run_list argument to True. This also allows you to specify a list of values for V0 and sigma for which these sets will be created. The list of values for V0 and sigma need to be specified in the variables V0_list and sigma_list of the script main/GenPedPedScene.py. Once these values are defined, you can for example run the script like this:
python main/GenPedPedScene.py --run_list True --scenario square
To create an animation of the generated dataset, similar to the animations you can find above, run the script as follows:
python main/GenPedPedScene.py --V0 2 --sigma 1.303 --scenario square --show_animation True --show_potential True
Note that if the argument --show_potential is set to True, the repulsive potential between the pedestrians in a scene will be visualized in the animation. This requires comparable high computational costs.
The animations can be found under docs/videos/PedPedScene/datasetname.
![]() |
![]() |
|---|---|
| Snippet from real-world ZARA1 scenario [2] | Snippet from simulated ZARA1 scenario |
It is possible to generate datasets that take the interactions between pedestrians and surrounding obstacles into account. As described in detail in chapter 4.2.2 of the thesis, this is done by processing a segmented image of a real-world scenario like this in order to obtain the boundaries of obstacles for the dataset that you want to generate.
To generate datasets that take human-space interactions into account, run the script main/GenPedSpaceScene.py. A detailed explanation of the possible arguments can be found here.
For example, to generate a dataset that simulates the ZARA1 scenario, run the script like this:
python main/GenPedSpaceScene.py --V0 2 --sigma 0.8686 --U0 3 --r 0.4343 --scenario zara1
The datasets generated are saved in the ./Experiments/datasets folder. Make sure to specify the values --V0 and --sigma of the repulsive potential between pedestrians and the values --U0 and --r of the repulsive potential between pedestrians and obstacles.
Similar to the generation of datasets that exclusively focus on social interactions, set the --run_list argument to True and specify the values of V0 and sigma in the variables V0_list and sigma_list of the script main/GenPedSpaceScene.py. Once these values are defined, you can for example run the script like this:
python main/GenPedSpaceScene.py --run_list True --U0 3 --r 0.4343 --scenario zara1
To create an animation of the generated datasets run the script as follows:
python main/GenPedSpaceScene.py --V0 2 --sigma 0.8686 --U0 3 --r 0.4343 --scenario zara1 --show_animation True
The animations can be found under docs/videos/PedSpaceScene/datasetname.
[1] D. Helbing and P. Molnár: “Social Force Model for Pedestrian Dynamics”. In: Physical Review 51.5 (1995).
[2] A. Lerner, Y. Chrysanthou and D. Lischinski: “Crowds by Example“. In: Comput. Graph. Forum 26 (2007).



