Skip to main content

Interpretable AI for Pedestrian Intention Prediction: A Data-Driven Visualisation Approach

Date

In partnership with SYSTRA UK & Ireland 

As vehicles move towards full autonomy, AI models are increasingly trusted to predict pedestrian behaviour and make split-second safety decisions. Yet the black-box nature of these models makes failure cases hard to diagnose, where one wrong prediction separates a safe stop from a possible collision. This project demonstrates how visual analytics can be applied to explain such critical decisions made by complex AI models.  

Pedestrian Intention Prediction (PIP) is one of the most safety-critical tasks in autonomous vehicle (AV) development [1]. PIP models aim to predict whether a pedestrian will cross in front of a vehicle using real-world data, capturing pedestrian behaviour (moving trajectory, pose), traffic context (vehicle speed, crosswalks, signals) and environmental noise such as occlusion. Getting these predictions wrong carries direct human consequences where a missed crossing prediction, particularly at speed, may not leave enough time to brake.  

Recent models have improved prediction accuracy by incorporating increasingly diverse features [2], but their growing complexity creates a new problem which makes it difficult to explain why a model succeeds or fails in specific road situations. This interpretability gap is what impedes researchers from understanding failure modes and refining PIP models responsibly. Existing PIP research has addressed this through computational improvements rather than visual investigation, leaving a clear methodological gap.  

This project, titled ‘Interpretable AI for Pedestrian Intention Prediction: A Data-Driven Visualisation Approach’, addresses that gap [3] by developing a scalable, interactive visualisation dashboard to make PIP model behaviour more transparent. Built with expert consultation from PIP and XAI researchers at the University of Leeds, it targets three established research questions:  

  1. How can the most relevant PIP input features be visualised with sufficient data? 
  2. How can each feature's contribution to prediction accuracy be evaluated? 
  3. How can PIP failure cases be explained through visualisation?  

Using an open-source dataset and D3.js [4], the project produces an interactive tool for researchers and developers to explore how visual features, annotations, and model predictions interact in complex road scenarios, where pedestrian crossing intention is much more complicated to interpret in dense traffic contexts, with the long-term aim of supporting transparent, evidence-backed AV safety improvements. 

Data and methods  

A) Data source  

The project uses the Pedestrian Intention Estimation (PIE) dataset [5]: six hours of 30 FPS dashcam footage recorded in Toronto across various traffic scenarios, with rich spatial and behavioural annotations for pedestrians and road elements. With approximately 300,000 labelled frames and 1,842 pedestrian samples, PIE is the largest publicly available dataset for pedestrian behaviour in traffic which can help in transferring the learnings to the UK and other countries. One of the six 10-minute collection chunks was reserved as a validation set representing data the model never saw during training which allows for a transparent evaluation of real-world performance.  

[Figure-1] PIP Single Event Prediction and Confusion Matrix on validation set  

[Figure-1] PIP Single Event Prediction and Confusion Matrix on validation set  

Timeline chart showing a single PIP sequence (critical & crossing point) along with the Confusion Matrix results on validation set.

B) PIP task and model performance  

As can be seen in Figure-1, PIP model gathers 16–32 frames (under one second) of data and predicts, at a critical point, whether a crossing event will occur in the next few seconds. Tested on the validation set, the model achieved 91.4% accuracy, with 60 incorrect predictions. Of those, 30 were false negatives which are cases where a pedestrian did cross but the model predicted no crossing. These are the highest-risk failures: a vehicle moving at speed, incorrectly assuming no crossing, has reduced time to stop.  

C) Visualisation approach  

Rather than tuning the model computationally, this project takes a feature-driven visual analytics approach. Features were ranked by influence through expert consultation and categorised into three categories: most influential (bounding box, local context, ego-vehicle speed) [6], conditionally influential (body pose estimation), and least influential (semantic segmentation, optical flow, categorical depth). Individual features were then matched to visualisation designs through an iterative process involving PIP domain experts, producing charts that build from each other to form a cohesive dashboard.  

1. Interactive Timeline Chart  

To analyse pedestrians’ temporal behaviours and visibility (e.g., walking vs. standing and the presence of occlusion), we designed a Gantt-style timeline chart (as shown in Figure-2) that visualises how a pedestrian’s state changes over time. This design clearly encodes discrete state intervals (e.g., partial/full occlusion) as contiguous segments, making duration, onset time, and temporal overlap immediately perceptible across multiple instances.   

The bounding box, which represents four-pixel coordinates defining the pedestrian's spatial location, was identified as the most influential feature. Combined with occlusion and behaviour annotations, the feature is studied through a collection of frame-level visualisations built in D3.js.  

The interactive Gantt-style heatmap visualises, for the 30 most occluded instances in each confusion matrix subset, how pedestrian visibility changes frame-by-frame. Sequences are sorted by occlusion level and colour-coded by visibility state. The right part of the figure shows how entire subsets can be visualised within the chart alongside sets of specific pedestrians. 

[Figure-2] Occlusion Timeline Chart view with Subset Overview mode (True Positives)  

[Figure-2] Occlusion Timeline Chart view with Subset Overview mode (True Positives)  

Occlusion Timeline Chart visualising 32 Frames prior to the critical point in Top 30 Occluded vs. Subset Overview modes (True Positives).

[Figure-3] Behaviour Timeline Chart view showing changes in states (False Positive)  

Caption: Behaviour Timeline Chart visualising change in action for False Positives (looking direction changes from not facing to facing the vehicle in the walking sequence). 

This chart was extended into a behaviour timeline (as shown in Figure-3) visualising pedestrian gaze direction (facing/not facing the vehicle) and action (walking/standing), enabling researchers to track how behaviour states shift during occluded frames. Adding this as an extension allows the researchers to quickly gain an understanding of how occlusion and traffic contexts relate to frame-level behavioural changes.  

2. Frame-level image integration  

[Figure-4] Image interactions showing local context with image types 

[Figure-4] Image interactions showing local context with image types 

Frame-level image interactions showing local context with different visual modes for False Negatives (bounding box, body pose, semantic segmentation, optical flow, categorical depth)

Both timeline views include a clickable image panel (as shown in Figure-4), that renders the local context image of the frame (cropped and squared section showing local pedestrian surrounding) and traffic context labels with toggle for visual overlays such as bounding box, body pose skeleton, semantic segmentation, optical flow and categorical depth. This allows direct visual inspection of any moment in an observation window. 

3. Ego-Vehicle Attributes  

[Figure-5] Violin and box chart showing distribution of ego-vehicle speeds across different motions and subsets 

[Figure-5] Violin and box chart showing distribution of ego-vehicle speeds across different motions and subsets 

Ego-Vehicle Mean Speed distribution across prediction subsets and vehicle motions visualised with Violin and Box plots (showing quantitative metrics such as range, density, and outliers)

Violin and box plots (as shown in Figure-5), visualise ego-vehicle speed distributions across subsets and motion types (accelerating, decelerating, constant, stationary), contextualising pedestrian behaviour within vehicle dynamics. Together these charts form a single-stop dashboard for PIP evaluation and failure case investigation.  

Key findings  

A) What can occlusion tell us?

The occlusion timeline revealed recurring early occlusion patterns, where the target pedestrian is partially or fully occluded in the first few frames of the observation window, along with a handful of mid-sequence occlusions. PIP domain experts confirmed that occlusion-heavy sequences represent the most challenging prediction scenarios, since the model has fewer visible cues to work with during recurrent data-gathering.  

B) What does pedestrian behaviour show?

Across all subsets, pedestrians were not looking at the ego-vehicle for most frames. Crossing subsets (true positives and false negatives) showed notably higher proportions of walking frames, while non-crossing subsets showed more standing. This pattern held when examining the 30 most occluded instances, suggesting that walking behaviour is a consistent signal in crossing cases, even when other cues are obscured.  

C) What do the local context images reveal?

[Figure-6] Local context images of Failure cases showing the shifted body pose estimation caused by occluding pedestrians  

[Figure-6] Local context images of Failure cases showing the shifted body pose estimation caused by occluding pedestrians 

PIP Model estimates body pose for the pedestrian occluding the target (shifts direction, position, cues and ultimately impacting pedestrian intention predictions)

Frame-level image inspection of failure cases uncovered a specific mechanism: in several false negative instances, a nearby occluding pedestrian caused the body pose skeleton to shift onto the wrong person (as shown in failure case instances from Figure-6). The model received skeleton data representing an unrelated pedestrian, potentially one facing the road rather than the target [6]. PIP experts confirmed this can directly impact predictions and suggested a practical fix: suppress pose estimation during fully occluded frames. A common thread across failure cases was the presence of multiple pedestrians in the scene, adding complexity that the model had limited data to resolve.  

D) What does ego-vehicle speed reveal?

False predictions occurred at relatively lower mean speeds than true predictions. Within the false subsets, false negatives representing the highest-risk cases, had higher average speeds across most motion types. True positives showed the highest proportion of stationary frames, while true negatives were predominantly constant speed. These patterns illustrate how vehicle motion correlates with a pedestrian's crossing decision and highlight why speed context is essential to model evaluation. 

Value of the research  

This project delivers a working visualisation dashboard for PIP researchers and practitioners, enabling rapid failure-case investigation grounded in visual evidence rather than computational abstraction. The iterative expert-driven design process, validated with PIP and XAI domain experts, produced charts that have already generated actionable insights: the pose estimation fix identified through the dashboard represents a concrete, testable model refinement.  

Beyond PIP, the visual analytics approach developed here is transferable to other high-stakes AI domains where interpretability matters: urban mobility modelling, human behaviour analysis in public spaces, and environmental monitoring systems. The codebase is designed for extensibility, with the dashboard and dataset structured for handover, revision, and application in larger-scale studies. 

‘’Pedestrian intention prediction models should not be treated as a niche capability for autonomous vehicles, but as a foundational layer in any shared space or crowding model. Without understanding how individuals anticipate, negotiate, and adapt their movements, we risk designing systems that react to density rather than pedestrian behaviour, overlooking the subtle dynamics that govern safety and flow.  

The results achieved from this project can be highly transferable to other safety issues in highly pedestrianised urban areas where pedestrians interact with other modes of transport, such as e-bikes and e-scooters, and interactions are more fluid, less regulated, and far more sensitive to human intent.”  

- Dr. Patrizia Franco, Data, Modelling and Analysis -Digital, SYSTRA UK & Ireland 

Insights 

  • Evidence-Backed Debugging: The dashboard transforms "black-box" PIP model decisions into visual evidence, allowing developers to pinpoint specific triggers for failure, rather than relying on aggregate accuracy scores.  
  • Diagnostic Discovery: A primary achievement was identifying the "pose-shifting" phenomenon, where the model incorrectly maps a skeleton to an occluding pedestrian. This provides a concrete, testable target for model refinement, such as suppressing pose estimation during full occlusion of the pedestrian.  
  • Resilient Behavioural Cues: Analysis revealed that while pedestrian gaze (looking at the vehicle) is an inconsistent predictor, walking behaviour remains a strong, resilient signal of crossing intent across both true and false predictions.  
  • Safety-Critical Correlations: Visualisations highlighted that False Negatives (missed crossings) are more frequent at higher ego-vehicle speeds, identifying a high-risk gap where the model is most likely to fail when the vehicle requires the most braking distance.  
  • Expert-Validated Scalability: By integrating PIP and XAI expert feedback into an iterative D3.js design, the project established a scalable framework for interpretability that can be transferred to other high-stakes domains like urban mobility and environmental monitoring.  

Team 

  • Piyush Mohan – Data Scientist, LIDA, University of Leeds  
  • Dr. Mahdi Rezaei – Institute of Transport Science, University of Leeds  
  • Prof. Roy Ruddle – School of Computer Science, LIDA, University of Leeds  
  • Mohsen Azarmi – Institute of Transport Science, University of Leeds  
  • DLiqun Liu – School of Computer Science, University of Leeds  
  • Dr. Patrizia Franco – SYSTRA UK & Ireland  

Funder 

The project is part of the MAVIS (Making visualization scalable for explaining machine learning classification models) project (EPSRC EP/X029689/1) which is investigating XAI visualisation and builds on the Hi-Drive European Union's Horizon 2020 project (101006664) which focuses on advancing autonomous mobility through interpretable AI.  

This work has been facilitated by the Leeds Institute for Data Analytics (LIDA) Data Scientist Development Programme, which employs early-career data scientists to deliver real-world data-driven impact in the interests of the public good. 

References 

  1. Azarmi, M., Rezaei, M. and Wang, H., “Pip-net: Pedestrian intention prediction in the wild.,” IEEE Transactions on Intelligent Transportation Systems, 2025, doi: 10.1109/TITS.2025.3570794  
  2. Azarmi, M., Rezaei, M., Wang, H. and Arabian, A., “Feature importance in pedestrian intention prediction: A context-aware review.” arXiv preprint arXiv:2409.07645, 2024, doi: 10.48550/arXiv.2409.07645  
  3. T. Spinner, U. Schlegel, H. Schäfer and M. El-Assady, "explAIner: A Visual Analytics Framework for Interactive and Explainable Machine Learning," in IEEE Transactions on Visualization and Computer Graphics, vol. 26, no. 1, pp. 1064-1074, Jan. 2020, doi: 10.1109/TVCG.2019.2934629  
  4. M. Bostock, V. Ogievetsky and J. Heer, "D³ Data-Driven Documents," in IEEE Transactions on Visualization and Computer Graphics, vol. 17, no. 12, pp. 2301-2309, Dec. 2011, doi: 10.1109/TVCG.2011.185  
  5. A. Rasouli, I. Kotseruba, T. Kunic and J. Tsotsos, "PIE: A Large-Scale Dataset and Models for Pedestrian Intention Estimation and Trajectory Prediction," 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Korea (South), 2019, pp. 6261-6270, doi: 10.1109/ICCV.2019.00636  
  6. B. Yang, W. Zhan, P. Wang, C. Chan, Y. Cai and N. Wang, "Crossing or Not? Context-Based Recognition of Pedestrian Crossing Intention in the Urban Environment," in IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 6, pp. 5338-5349, June 2022, doi: 10.1109/TITS.2021.3053031