How artificial intelligence can help curb traffic accidents in cities