Alex Bell was tired of swerving around vehicles in the bike lane.

The Manhattan-based computer scientist rides from Harlem six miles south to his midtown office every day. He’s one of more than 46,000 daily bike commuters in New York City, a number that doubled between 2005 and 2015. Yet despite the city’s cycling boom—it added almost 100 miles of protected bike lanes in the last decade—Bell still doesn’t feel safe in the saddle.



“At least once a block, I have to leave the bike lane because someone’s parked in it,” he told Bicycling.

Blocked bike lanes are a common problem in New York and many other cities. But they’re a particular point of annoyance for Bell, who in 2015 sued UPS over its delivery drivers stopping their trucks in bike lanes. (The suit was dismissed, although Bell is appealing.) He got tired of logging regular complaints to the city’s 311 line, and even more tired of seeing nothing change.

One reason, he suspected, was that the complaints were anecdotal; neither the city nor anyone else had tried to quantify the problem. “If cities aren’t measuring how often the bus and bike lanes are blocked, they won’t do anything to fix it,” Bell said.

So he decided to do it himself.

The New York City Department of Transportation has a network of traffic cameras whose images are available to the public. Watching them personally would be tedious, so Bell used his programming skills to code a custom Python algorithm to analyze 10 days’ worth of footage from one block of cameras (St. Nicholas Avenue between 145th and 146th streets). The program automatically logged how often vehicles blocked the street’s bike and bus lanes.

Bell’s algorithm in action. On the left, we see his code identifying all vehicles driving on the street. On the right, we see it identifying vehicles blocking the bike lane and bus stop.

Bell used TensorFlow, a machine-learning tool developed by Google, to train the program to identify which types of vehicles blocked the lane. That way, he could differentiate delivery trucks or cabs stopped illegally from, say, buses picking up passengers at a designated stop.

The results were about as expected: The bike lanes were blocked frequently (about 40 percent of the time) and the bus lane even more so (nearly 60 percent of the time). Bell was surprised to find no pattern—the blockages occurred at all times of day. “I expected to see more of a midday lull, but it’s pretty constant,” he said.



Despite a write-up in the New York Times, Bell said he’s heard no response from the city about his findings. (According to the Times, the NYPD issued more than 100,000 tickets last year to drivers illegally blocking bike and bus lanes, but Bell and others say it hasn’t had much effect.) Bicycling has reached out to NYCDOT and will update if we hear back.

This content is imported from YouTube. You may be able to find the same content in another format, or you may be able to find more information, at their web site.

Bell isn’t waiting. He uploaded his source code to GitHub, an open-source software development platform, and is encouraging others to improve and adapt it. “New York City alone has at least 500 public cameras,” he said, noting that anyone can apply his algorithm to the accessible footage. He’s also gotten queries from cyclists in Boston and London, among other cities, about using the code elsewhere.

“There’s a group in Chicago that wants to deploy this,” he said, “and other people were just writing their local government, like, ‘Hey, Phoenix, how can we get in on this?’”

Bell said he feels ambivalent about the use of closed-circuit surveillance, which can raise all sorts of questions about privacy and ethics. But he said opening cameras to civilian access could be a powerful tool for social good. Potholes, deteriorating bike lanes, even data on how often cyclists really do blow red lights—it could all be measured. To that end, Bell and the advocacy group Transportation Alternatives are urging New Yorkers to sign a petition asking the city to make even more cameras accessible to the public.



“If a human can see it,” Bell said, “then we can train computers to understand it.”

This content is created and maintained by a third party, and imported onto this page to help users provide their email addresses. You may be able to find more information about this and similar content at piano.io