Giter VIP home page Giter VIP logo

bazilinskyy / text-crowdsourced Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 111.91 MB

This project defines a framework for the analysis of crossing behaviour in the interaction between a pedestrian and an automated vehicle with a textual eHMI using a crowdsourcing approach.

JavaScript 1.64% CSS 1.36% HTML 16.59% Python 40.37% MATLAB 40.05%
python ehmi pedestrian automated-driving textual matlab crowdsourcing human-factors

text-crowdsourced's Introduction

Analysing pedestrian's willingness to cross in front of an automated car with a textual external Human-Machine Interface (eHMI)

This project defines a framework for the analysis of crossing behaviour in the interaction between a pedestrian and an automated vehicle with a textual eHMI using a crowdsourcing approach. The jsPsych framework is used to for the frontend. In the description below, it is assumed that the repo is stored in the folder text-crowdsourced. Terminal commands lower assume macOS.

Citation

If you use the framework for academic work please cite the following paper.

Bazilinskyy, P., Dodou, D., & De Winter, J. C. F. (2022). Crowdsourced assessment of the suitability of 227 textual eHMIs for a crossing scenario. Proceedings of AHFE 2022. Available at TBC.

Setup

Code for creation of stimuli and QA is written in Python. The project is tested with Python 3.8.5. To setup the environment run these two commands in a parent folder of the downloaded repository (replace / with \ and possibly add --user if on Windows:

  • pip install -e text-crowdsourced will setup the project as a package accessible in the environment.
  • pip install -r text-crowdsourced/requirements.txt will install required packages.

For QA, the API key of appen needs to be placed in file text-crowdsourced/secret. The file needs to be formatted as text-crowdsourced/default.secret.

Analysis

Code for analysis is written in MATLAB. No configuration is needed. To run the analysis code, a config file needs to be created (as described lower) and file text-crowdsourced/analysis/analysis.m need to be run. The project was tested with MATLAB 2021b. A number of CSV files used data processing are saved in text-crowdsourced/_output. Visualisations of all data are saved in text-crowdsourced/_output/figures/.

Implementation on heroku

We use heroku to host the node.js implementation. The demo of the implementation may be viewed here.

Crowdsourcing job on appen

We use appen to run a crowdsourcing job. You need to create a client account to be able to create a launch crowdsourcing job. Preview of the appen job used in this experiment is available here.

Filtering of appen data

Data from appen is filtered based on the following criteria:

  1. People who did not read instructions.
  2. People who are younger than 18 years of age.
  3. People who completed the study in under 300 s.
  4. People who completed the study from the same IP more than once (the 1st data entry is retained).
  5. People who used the same worker_code multiple times. One of the disadvantages of crowdsourcing is having to deal with workers that accept and do crowdsourcing jobs just for money (i.e., cheaters). The framework offers filtering mechanisms to remove data from such people from the dataset used for the analysis. Cheaters can be reported from the textehmi.analysis.QA class. It also rejects rows of data from cheaters in appen data and triggers appen to acquire more data to replace the filtered rows.

Anonymisation of data

Data from appen is anonymised in the following way:

  1. IP addresses are assigned to a mask starting from 0.0.0.0 and incrementing by 1 for each unique IP address (e.g., the 257th IP address would be masked as 0.0.0.256).
  2. IDs are anonymised by subtracting the given ID from config.mask_id.

Output

Figures are saved in text-crowdsourced/_output/figures.

mean willingness to cross on multiple columns Mean willingness to cross.

median willingness to sd willingness to cross Median willingness to cross over SD of willingness to cross of eHMIs in English. Colours denote the type of eHMIs: green=egocentric, black=allocentric, red=egocentric and allocentric.

ehmis in english and spanish Mean willingness to cross for eHMIs presented in both English and Spanish.

median willingness to cross Median willingness to cross. Colours show stimuli that were presented in both English and Spanish.

mean willingness to cross Mean willingness to cross. Colours show stimuli that were presented in both English and Spanish.

sd willingness to cross Standard deviation of willingness to cross. Colours show stimuli that were presented in both English and Spanish.

compellingness score smaller than 5% eHMIs with a compellingness score smaller than 5%. Colours denote the type of eHMIs: green=egocentric, black=allocentric, red=egocentric and allocentric.

response willingness to cross for en and es Median response time for participants with browser language set to English and Spanish.

learning curve of response time Learning curve of response time.

response willingness over number of characters Median willingness related to the length of the eHMI.

correlation plot Correlation plot.

CSV files with eHMIs sorted by median/mean/SD willingness to cross are saved in text-crowdsourced/_output.

Configuration of analysis

Configuration of analysis needs to be defined in text-crowdsourced/config. Please use the default.config file for the required structure of the file. If no custom config file is provided, default.config is used. The config file has the following parameters:

  • appen_job: ID of the appen job.
  • mask_id: number for masking worker IDs in appen data.
  • file_cheaters: CSV file with cheaters for flagging.
  • file_heroku: file with data from heroku.
  • file_appen: file with data from appen.
  • path_stimuli: path with stimuli.
  • mapping: CSV file with mapping of stimuli.
  • path_output: path for output (figures, CSV files).
  • path_figures_readme: path for outputting figures in the JPG format.
  • save_figures: flag for saving figures as EPS and JPG files.

text-crowdsourced's People

Contributors

bazilinskyy avatar joostdewinter avatar

Watchers

 avatar  avatar

text-crowdsourced's Issues

Correlations with language skills

  • People who score low in language, do they respond as 'I don't cross' (because i don't know) or more in the middle. (i.e., average response vs. language skill).
  • Subgroup analysis about the interpretation of signs that were offered in two languages as a function of language proficiency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.