www.bsc.es URBAN SCALE CROWD DATA ANALYSIS, SIMULATION, AND VISUALIZATION Isaac Rudomin May 2017
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. 2
INTRO Why Crowd simulation? • One of many massive agent based simulations. • Many applications: • Videogames, • Special events or Emergency simulations, • Vehicular traffic , • Health • What we learn here can be used in other examples of largescale simulation and visualization 3
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 4
BLOCK STRUCTURE
PW: BEHAVIOR • Effective search of neighbours, • Collision avoidance • Boids (Reynolds), • Social Forces (Helbing), • Reciprocal Velocity Obstacles, • Synthetic Vision
PW: BEHAVIOR Physical, Psychological and cultural characteristics of agents, Optimal navigation 7
PW: VISION, LEARNING Have used standard vision techniques • will use • deep reinforcement learning • montecarlo tree search • to train from trajectories and/or real and simulated video. Using trajectories and spiking neural networks to teach agent to avoid colissions. Work with with Israel Tabarez will continue.
PW: GOD GOD: Generate Animate
GENERAL DIAGRAM GOD ANIMATE Simulation Simulation Simulation Simulation World & Learning Models LOD DATA Render STREAM Simulation Render Simulation Render Simulation 2D MAP GO-A-L Render DATA Render Display IMAGE Display STREAM NEIGHBOR Composition Composition Display Composition Composition 3D Map Compression Composition HETEROGENEOUS Camera AVOID INPUT-OUTPUT: CLUSTER COLLISION BROWSER, UNITY, Mapbox NAVIGATE HETEROGENEOUS CLUSTER or PC
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
XML FILES: GOD, PBR, H-LOD Templates for XML Definition Texture driven variety generation 12
XML FILES: GOD, PBR, H-LOD 13
XML FILES: GOD, PBR, H-LOD Surface splatting Geometry reduction • Animations are transferable between polygons and point samples for any given level of detail. 14
XML FILES: GOD, PBR, H-LOD This structure is used to generate characters • varied • animated • viewable from any camera angle • for any given LOD 15
XML FILES: GOD, PBR, H-LOD
XML FILES: GOD, PBR, H-LOD A tiling system is built on top of a quadtree allowing 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. 17
XML FILES: GOD, PBR, H-LOD 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. 18
SYSTEM ARCHITECTURE 19
IN DEVELOPMENT SERVER WEB BROWSER CLIENT (SIMULATION ENGINE) webGL output OSM 3D MAP CROWD SIMULATION (2D TILE LEVEL POSITIONS) OUTPUT DATA OUTPUT DATA ● COLOR TEXTURE (screen). DEPTH TEXTURE. ● Data capture VIRTUAL CAMERA ● WEB SOCKETS Script PARAMETERS AND WORLD CLIENT CAMERA SETTINGS POSITION AND DATA CROWD 3D RENDER OUTPUT RENDER PRESENTATION SCREEN COMPOSITION WEB SOCKETS OUTPUT RENDER
SIMPLE BEHAVIOR: 1 GPU World: 2D grid of cells – empty or – occupied by an agent. 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 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. 21
MPI, OMPSS, CUDA Parallel crowd simulation requires dividing the problem in 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 Double tiling technique • tiles and subtiles manage their own agents Four levels of parallelism • interchange of agents at borders
CLUSTER VISUALIZATION in situ streaming web
DATA Data preparation collected from different sources Data Collection Clean and Extraction Data Storage BLOBs NoSQ L Crowd GPS and Video Data Data Analysis and Visualization 24
DATA Urban environments OpenStreetMap 25
DATA Trajectory Dataset OpenPaths project: “Crowds Simulation” - 848,000 GPX files - 2.6 Trillion GPX points - and 260GB of GPS data 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
DATA Heatmap Query the data by: day and hour / zone / type of vehicle, / etc... 27
DEEP Neural network architecture . . . . . . . . . Input ReLu FC ReLu FC Output 3 * 20 150 150 3 28
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 29
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 clusters with 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
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
MORE INFO • Isaac Rudomin (BSC) isaac.rudomin@bsc.es • Hugo Perez (UPC-BSC) hugo.perez@bsc.es • Leonel Toledo (BSC) leonel.toledo1@bsc.es • Jorge Eduardo Ramirez (BSC) jorge.ramirez@bsc.es 32
Recommend
More recommend