URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and...
Transcript of URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and...
![Page 1: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/1.jpg)
www.bsc.es
URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND VISUALIZATION
Isaac Rudomin
May 2017
![Page 2: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/2.jpg)
2
ABSTRACT
We'll dive deep into how we use heterogeneous clusters with GPUs for accelerating urban-scale crowd data analysis, simulation, and visualization. Our main contributions are the development of new behavior models that conform to real data, the ability to scale the system by adding computing resources as needed without making programming modifications and the combination of analysis, simulation, and visualization techniques that help us achieve large-scale crowd simulations with realistic behavior.
![Page 3: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/3.jpg)
3
INTROWhy Crowd simulation?
• One of many massiveagent based simulations.
• Many applications:• Videogames, • Special events or
Emergency simulations, • Vehicular traffic , • Health
• What we learn here can be used in other examplesof largescale simulationand visualization
![Page 4: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/4.jpg)
4
INTRO
We have developed methods for realtime crowd simulation and visualization• Using several algorithms for collision avoidance and other behaviors• Developing methods for generating varied animatable characters (GOD)• Using shader based LOD techniques for rendering large crowds
For large scale problems we have parallelized• simulation using MPI + OmpSs and/or CUDA in heterogeneous clusters• visualization by using MPI and composition
Work in progress in• using XML for specifying GOD for point based hierarchical LOD• integrating map applications such as Cesium, Tangram, Mapbox and 3D scenery
generated by them• integrating real data such as GPS traces to be used to influence simulation• using deep learning for modifying behavior
![Page 5: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/5.jpg)
BLOCK STRUCTURE
![Page 6: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/6.jpg)
PW: BEHAVIOR• Effective search of neighbours, • Collision avoidance
• Boids (Reynolds), • Social Forces (Helbing),• Reciprocal Velocity
Obstacles, • Synthetic Vision
![Page 7: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/7.jpg)
7
PW: BEHAVIOR
Physical, Psychological and cultural characteristics of agents,Optimal navigation
![Page 8: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/8.jpg)
Using trajectories and spikingneural networks to teach agent to avoid colissions. Work with withIsrael Tabarez will continue.
Have usedstandard vision techniques
• will use • deep reinforcement learning• montecarlo tree search• to train from trajectories and/or
real and simulated video.
PW: VISION, LEARNING
![Page 9: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/9.jpg)
PW: GOD
GOD: Generate Animate
![Page 10: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/10.jpg)
HETEROGENEOUS CLUSTER
HETEROGENEOUS CLUSTER or PC
SimulationSimulation
Learning
RenderRender
GO-A-L
CompositionComposition
Composition
Display
SimulationSimulation
Simulation
CompositionComposition
Compression
SimulationSimulationWorld &
Models
2D MAP DATA
DisplayDisplay
3D MapCamera
ANIMATE
LOD
NEIGHBOR
AVOID COLLISION
NAVIGATE
INPUT-OUTPUT:BROWSER, UNITY, Mapbox
Render
GOD
RenderRender
IMAGE STREAM
DATA
STREAM
GENERAL DIAGRAM
![Page 11: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/11.jpg)
XML FILES: GOD, PBR, H-LOD
• Used for parameter definition and behavior
• Geometric attributes
• Distribution
• Variety Generation
• World Distribution
• Group Definitions
• Environment Definition and Actors
![Page 12: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/12.jpg)
12
Templates for XML Definition
Texture driven variety generation
XML FILES: GOD, PBR, H-LOD
![Page 13: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/13.jpg)
13
XML FILES: GOD, PBR, H-LOD
![Page 14: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/14.jpg)
14
Geometry reduction Surface splatting
• Animations are transferablebetween polygonsand pointsamples for anygiven level of detail.
XML FILES: GOD, PBR, H-LOD
![Page 15: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/15.jpg)
15
This structure is usedto generatecharacters
• varied• animated• viewable from any
camera angle• for any given LOD
XML FILES: GOD, PBR, H-LOD
![Page 16: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/16.jpg)
XML FILES: GOD, PBR, H-LOD
![Page 17: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/17.jpg)
17
A tiling system is built on top of a quadtreeallowing us to combine geometry from different agents and objects.
Each tile is indexed using the quadtree. Characters are indexed as well, knowing at all times in which tile they are currently at.
XML FILES: GOD, PBR, H-LOD
![Page 18: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/18.jpg)
18
By combining both hierarchical structures, (octree skeleton and quadtree environment) it is possible to create crowds composed by hundreds of thousands of animated characters.
Depending on the location of each character LOD is assigned dynamically to reduce computation bottlenecks.
XML FILES: GOD, PBR, H-LOD
![Page 19: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/19.jpg)
19
SYSTEM ARCHITECTURE
![Page 20: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/20.jpg)
WEB BROWSER CLIENT SERVER
(SIMULATION ENGINE)
webGL outputOSM 3D MAP
Data capture Script
OUTPUT DATA● COLOR TEXTURE (screen).● DEPTH TEXTURE.● VIRTUAL CAMERA
PARAMETERS AND WORLD POSITION
OUTPUT DATA
WEB SOCKETS
CROWD SIMULATION(2D TILE LEVEL POSITIONS)
CLIENT CAMERA SETTINGSAND DATA
CROWD 3D RENDER
SCREEN COMPOSITION
OUTPUT RENDER
OUTPUT RENDER
WEB SOCKETSPRESENTATION
IN DEVELOPMENT
![Page 21: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/21.jpg)
21
SIMPLE BEHAVIOR: 1 GPU
World: 2D grid of cells – empty or – occupied by an agent.
main computation is agent and world updates: with a single GPU once data is in GPU updating & rendering happens on the GPU without data transfers speedup is significant.
Collision Avoidance:• simple gather method • checks 8 directions with
radius 5• if another agent in path has
same direction its cell is considered a free cell
![Page 22: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/22.jpg)
MPI, OMPSS, CUDAParallel crowd simulation requires dividing the problemin blocks, and for MPI, for OMPSS the idea is the same
• subdivide world into equal sized (2D) tiles• we assign each tile to a node for MPI• we assign each subtile, within a node to the CPU or
GPU core using OmPSS• within the GPUs we use CUDA• tiles and subtiles manage their own agents• interchange of agents at borders
Double tiling technique
Four levels of parallelism
![Page 23: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/23.jpg)
CLUSTER VISUALIZATION
streaming in situ
web
![Page 24: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/24.jpg)
24
DATAData preparation collected from different sources
NoSQL
BLOBs
Data Collection
Crowd
Clean and Extraction Data Storage
Data Analysis and Visualization
GPS and Video Data
![Page 25: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/25.jpg)
25
Urban environments
OpenStreetMap
DATA
![Page 26: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/26.jpg)
T-Drive trajectory dataset- GPS trajectories of 10,357 taxis within Beijing. - 15 million of points - and the total distance of 9 million kilometers
26
Trajectory Dataset
OpenPaths project: “Crowds Simulation”- 848,000 GPX files- 2.6 Trillion GPX points- and 260GB of GPS data
DATA
![Page 27: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/27.jpg)
27
Heatmap
Query the data by: day and hour / zone / type of vehicle, / etc...
DATA
![Page 28: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/28.jpg)
28
Neural network architecture
.
.
.
.
.
.
Input3 * 20
.
.
.
ReLu FC150
ReLu FC150
Output3
DEEP
![Page 29: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/29.jpg)
29
SCENERY
In both systems 2e can import scenery, generate scenery, and we can also compose with the zbuffer generated by other systems, such as the Mapbox Unity plugin or Tangram
![Page 30: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/30.jpg)
CONCLUSIONS
We have a scalable multi agent system architecture
• Supports the simulation of hundreds of thousands of autonomous agents
• The crowd rendering engine enables geometrical, visual and animation diversity while maintaining memory requirements low.
• We have used GLSL/CUDA for data parallelism for systems with one GPU
• Large scale simulations taking advantage of heterogeneous computing clusterswith multiple CPUs and GPUs
• real-time simulation on clusters using CUDA MPI, OmPSS• streaming and in-situ+composition visualization of the results
• Working on Using real maps and trajectories
![Page 31: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/31.jpg)
ACKNOWLEDGEMENTS
This work is supported • by the Spanish Government through Programa Severo Ochoa (SEV-2015-0493) • by the Spanish Ministry of Science and Technology (project TIN2015-65316-P).• by CONACyT, Mexico through the Barcelona Supercomputing Center – Centro
Nacional de Supercomputación – Consejo Nacional de Ciencia y Tecnología Convocatoria 2016 para Estancias Posdoctorales
• by CONACyT, Mexico PhD Scholarship program
![Page 32: URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND … · 2017. 5. 5. · simulation, and visualization. Our main contributions are the development of new behavior models that conform](https://reader036.fdocuments.us/reader036/viewer/2022071609/61482e2acee6357ef9252fbb/html5/thumbnails/32.jpg)
32
• Isaac Rudomin (BSC)
• Hugo Perez (UPC-BSC)
• Leonel Toledo (BSC)
• Jorge Eduardo Ramirez (BSC)
MORE INFO