<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex Bell on Medium]]></title>
        <description><![CDATA[Stories by Alex Bell on Medium]]></description>
        <link>https://medium.com/@alex.morgan.bell?source=rss-24e51c466895------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*uyzCFl2-KBcT8wXs.</url>
            <title>Stories by Alex Bell on Medium</title>
            <link>https://medium.com/@alex.morgan.bell?source=rss-24e51c466895------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 23:05:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alex.morgan.bell/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cameras as Traffic Cops]]></title>
            <link>https://medium.com/hackernoon/cameras-as-traffic-cops-99a85513e1e0?source=rss-24e51c466895------2</link>
            <guid isPermaLink="false">https://medium.com/p/99a85513e1e0</guid>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[civic-engagement]]></category>
            <category><![CDATA[bicycles]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Alex Bell]]></dc:creator>
            <pubDate>Thu, 15 Mar 2018 16:16:29 GMT</pubDate>
            <atom:updated>2019-04-27T10:49:06.568Z</atom:updated>
            <content:encoded><![CDATA[<p>A <a href="https://hackernoon.com/tagged/machine-learning">machine learning</a> <a href="https://hackernoon.com/tagged/algorithm">algorithm</a> using image data from the New York City Department of Transportation showed that during a 10 day period in December 2017, on one street in Harlem, New York City, the</p><p><strong>bus stop was blocked 57% of the time (55% weekdays 7am to 7pm)</strong></p><p><strong>bike lane was blocked 40% of the time (57% weekdays 7am to 7pm)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*MYS95vc2-z3XnYEEc8mZTQ.gif" /><figcaption>Left: Computer Identified Vehicles Right: Computer Identified Violators</figcaption></figure><p>The press is really excited about self driving cars and the automation of driving jobs. Less attention is paid to how the same advancements in computer vision will be superior to humans at jobs such as parking enforcement where the basic requirement is detecting a vehicle’s location, determining if the location is legal, and taking appropriate action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*U1i6obsq8cXcR59ZuNrraQ.jpeg" /><figcaption>Autonomous Vehicle View Source:Bosch</figcaption></figure><p>There are <a href="http://www.nytimes.com/2013/11/29/nyregion/bangladeshis-build-careers-in-new-york-traffic.html">three thousand traffic enforcement officers in NYC</a>; here is how video cameras and computers can do the same job with higher enforcement levels, less cost and greater equality.</p><h3>Prototype</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gh3jhG86sY2CopdOQ6QS3Q.jpeg" /><figcaption>NYC DOT Traffic Camera Source: invisibleboxes.info</figcaption></figure><p>The New York City Department of Transportation (NYC DOT) maintains several hundred cameras throughout the city that post images in realtime to <a href="http://dotsignals.org/">http://dotsignals.org/</a>. To test the possible benefits of robo traffic cops I built a system which highlights parking violations at the corner of <a href="https://www.google.com/maps/place/W+145th+St+%26+St+Nicholas+Ave,+New+York,+NY+10031/@40.8240437,-73.9469563,17z/data=!3m1!4b1!4m5!3m4!1s0x89c2f67c7dfaf285:0xdf5c9890fd51c22b!8m2!3d40.8240437!4d-73.9447676">Saint Nicholas Ave and 145 street</a>. <strong>For a quick prototype its results are pretty interesting.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*phdcHWAa0VR10n1YQUg9qg.png" /><figcaption>green = bike lanes, blue = bus stop, red = cars on sidewalk</figcaption></figure><p>The avenue has unprotected bikes lane in both directions highlighted in green. Throughout the city, unprotected bike lanes are often <a href="http://www.nyc.gov/html/dot/downloads/pdf/bikelaneparking.pdf">illegally</a> blocked by cars, trucks and especially <a href="https://www.dnainfo.com/new-york/20151002/central-harlem/harlem-bicyclist-sues-ups-for-routinely-parking-trucks-bike-lanes">UPS TRUCKS</a>. On the right of the image in blue is a bus stop but instead functions as a parking spot. <a href="http://busturnaround.nyc/">NYC public buses crawl at dismal speeds because of blocked bus lanes and stops</a>.</p><p>The url for the camera at 145th and Saint Nicholas Avenue is <a href="http://dotsignals.org/google_popup.php?cid=532">http://dotsignals.org/google_popup.php?cid=532</a>. The machine learning algorithm code is available <a href="https://github.com/Bellspringsteen/OurCamera">here</a>. In short, a pre-trained <a href="https://www.tensorflow.org/">Tensorflow</a> model was re-trained on <a href="https://github.com/Bellspringsteen/OurCamera/tree/master/data/images">~2000 pre-classified images</a>. Then the model was used to classify the vehicles on the road and where they are stopped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*MYS95vc2-z3XnYEEc8mZTQ.gif" /></figure><p><strong>The Results</strong></p><p>During a 10 day period in December 2017,</p><p><strong>bike lane was blocked 40% of the time (57% weekdays 7am to 7pm)</strong></p><p><strong>bus stop was blocked 57% of the time (55% weekdays 7am to 7pm)</strong></p><p>Keep in mind this is just one average block. This means if you are riding in a bike lane you are swerving blind in and out of the bike lane every other block. And if you are on a bus your commute just got longer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*h_mF6Qud7Aj6EW9ekTNbXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*9iDxCT0yNafhjoTFzs4lIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*1Yv9BCWz8NitFiuzp6OLnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*KcCcykmbCepRtS3XPX2HnQ.png" /></figure><h3>Current Solution: Traffic Cops</h3><p>In NYC there are <a href="http://www.nytimes.com/2013/11/29/nyregion/bangladeshis-build-careers-in-new-york-traffic.html">~3000 traffic police officers</a>, who make from <a href="https://www1.nyc.gov/site/nypd/careers/civilians/traffic-enforcement-agents-benefits.page">$30k-$45k per year</a> (let’s estimate $48k-$72k <a href="https://www.bls.gov/news.release/ecec.nr0.htm">including benefits, health, retirement</a>) and gave <a href="https://data.cityofnewyork.us/City-Government/Parking-Violations-Issued-Fiscal-Year-2016/kiv2-tbus/data#SaveAs">seven million tickets</a>(filter by issuer T) which is <a href="http://bfy.tw/Ggoe">~1 ticket per agent per working day hour</a> in 2014.</p><p>If the block at 145th and Saint Nicholas is indicative of other blocks in the city than we can assume that the number of tickets being given represents less than .0001% of infractions. So ~150 million in pay &amp; benefits for traffic cops yielded NYC .0001% of enforcement.</p><h3>Future Solution:Camera Traffic Cops</h3><h4>Higher Enforcement Levels</h4><p>If NYC DOT put four cameras at each intersection there would be near complete and total coverage throughout the city 24x7. There is simply no way that deploying police officers could match this level of enforcement.</p><h4>Less Cost</h4><p>According to the DOT there are <a href="http://www.nyc.gov/html/dot/html/infrastructure/signals.shtml">12,460 traffic intersections in NYC.</a> If we assume that we need 4 cameras per intersection let’s round up and say we need 50,000 traffic cameras. The hypothetical robo traffic cop could be setup for either onboard processing or central processing. For onboard processing the cameras would include a computer vision system and a cellular connection to report video proof of infractions. For central processing the cameras would be connected by fiber back to a central server for group processing. Onboard processing would have higher per camera cost but less installation cost with central processing the opposite tradeoff.</p><ul><li>No matter which system, in order to be less expensive than current traffic enforcement each camera could cost $3,000 per year and NYC would get complete coverage of every street! $48k to $72k per officer * 3,000 officers / 50,000 cameras = $2.8k to $4.3k</li><li><strong>All the camera systems discussed above would be much cheaper than the human officers who cover a tiny fraction of the city.</strong> This article does not even attempt to address the huge issues of US labor productivity stagnation, unequal unemployment, public agency labor relations, and income inequality.</li></ul><h4>Equality</h4><p>All laws are not equally enforced. Currently police officers decide on whom to enforce the law leading to inequality in enforcement often based on race and income. That said, <a href="https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing">algorithms can be just as biased as police</a>. They are not perfect and can potentially be more biased than people. For instance a computer vision traffic enforcement system might erroneously single out certain groups for extra ticketing based on some visual characteristic of the vehicles. But as long as the data and algorithms are open for scrutiny we can work to eliminate bias to an extent not possible with police officer enforcement.</p><h3>Suggestions</h3><p>NYC DOT should evaluate installing four cameras at each intersection in NYC. The camera feeds should be higher quality but <strong>blur faces onboard the camera before transmitting to the internet</strong>. The feeds should be open to all. The NYC DOT should not require NY State approval to install the cameras. The NYPD should contract out to an external company to build and maintain an open source<strong> </strong>system to process the video feeds using machine learning to identify all moving and parking violations. The system should present each violation to NYPD officers behind a computer screen who could review the footage and issue the ticket. This system, if implemented reasonable well, would be more effective, lower cost, and more equal than the current system.</p><h4>Dear NYC, I am interested in working on this. DOT, NYPD, NYCGov how can I help you evaluate and create this system?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuzYQfrYAnM0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuzYQfrYAnM0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuzYQfrYAnM0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c36abfe8c1b0fa53f60d7d3bec67571/href">https://medium.com/media/8c36abfe8c1b0fa53f60d7d3bec67571/href</a></iframe><h3>Appendix</h3><h4>What would Richard Stallman say? What if I already have a big brother? What is the price of privacy?</h4><p>Richard Stallman (<a href="https://en.wikipedia.org/wiki/Richard_Stallman">rms</a>) would probably say cameras on each NYC block <a href="https://www.gnu.org/philosophy/surveillance-vs-democracy.en.html">imperils</a> <a href="https://www.youtube.com/watch?v=Q4b26gnsI24">democracy</a>. Sometimes I agree that increased surveillance is bad for society and will make it easier for our government and companies to prey upon society. But I also think that the current methods of enforcement (i.e. police) already prey on society, it’s just the poor and people of color who are most harmed. They are harmed by uneven enforcement of some laws and a lack of enforcement of others. I hope a system of video surveillance might improve this. At this point I think any change from the status quo would get us better results or at the least highlight the problems in the current system. I vote bring the cameras and surveillance to the streets but make the video feeds <strong>open to all</strong> and let’s see what happens.</p><p>Tactically, I suggest a few things which should alleviate some privacy concerns and potentially introduce other issues. Firstly, the camera systems should blur all faces onboard the camera before transmitting to the internet. Secondly, the feeds should be open to all. Open to all? But then terrorists, stalkers, spousal abusers etc will have access to the cameras. Yes, but these people could already go down and view the street. By making the camera system open it also means that researchers, investigative journalists and lawyers could evaluate and monitor the performance of the data collection and algorithms to search and report on bias and inequality in enforcement. <strong>This should be a bigger conversation, not enough people are discussing the pros and cons.</strong></p><h3>Questions</h3><ul><li>People hate speed cameras/red light cameras, this is just bad.</li></ul><p>People who speed and go through red lights hate those cameras.</p><ul><li>Bicyclists and buses suck</li></ul><p>Ok</p><ul><li>How would you get license plates?</li></ul><p>The current DOT cameras are connected via Stealth Communication Inc which feeds fiber optics to each camera. The cameras installed are already capable of sufficient video resolution to detect license plates, the DOT has just decided not to broadcast higher resolution video.</p><ul><li>In the video why aren’t the detection boxes around all the cars? Why didn’t cars on the sidewalk get boxes?</li></ul><p>The algorithm isn’t perfect and was a quick first attempt. So there is a lot of improvement to further identify other types of vehicles. The training data was only vehicles front and backs, so the algorithms isn’t trained to identify the sides of vehicles.</p><ul><li>In the video there is a scene when rain covers the lens and the algorithm thinks there are cars all over the road</li></ul><p>See above, the algorithm is only a first implementation. But this is a real world concern and something to think about for a solution at scale. If the camera can’t see than the system doesn’t work. For the data represented here the time when the image was covered in rain represented a small portion of the total time and doesn’t significantly affect the results.</p><ul><li>Doesn’t NYC need NY State to install traffic cameras? If so, is this whole idea dead in the water?</li></ul><p>NY State sets out the traffic law for the state. So yes, in order to give automated tickets New York State has to approve certain installations. However, the DOT can install as many cameras as it wants. And I believe that the NYPD can, within the current law, issue tickets to motorists for violations they witness through cameras. So I think the system can be architected so as to not require NY State approval.</p><ul><li>Why not just build protected bike lanes and protected bus lanes and stops?</li></ul><p>Yes. We should do that. But that infrastructure might be even more expensive. And cars still find ways to block protected bike lanes and block protected bus stops.</p><ul><li>Why is the data for only 10 days? Why is this only one camera?</li></ul><p>For the 10 days of video my computer recorded over 800,000 images.</p><p>It took Amazon AWS p2.xlarge instances running the model take .3 seconds per image. This means it took days and approximately $65 to process the 10 days worth of images. However, the cost is not linear so a greater number of cameras would be cheaper per camera to process.</p><p>In short, while it is much cheaper than employing thousands of police officers, it still costs some money to run the algorithms and collect the data.</p><ul><li>Don’t these cameras already exist?</li></ul><p>There are already some <a href="https://patch.com/new-york/queens/bus-lane-camera-violations-active-q52-q53-routes-dot">bus lane</a> <a href="https://cityroom.blogs.nytimes.com/2010/11/22/smile-youre-on-bus-lane-camera/?mtrref=www.google.com">cameras</a>. There are also some red light and speed cameras. They are few and far between. They are also entirely closed. I.e. we the people have no way of determining their number, their algorithms, their efficacy, their equality etc.</p><p>If these cameras are on 145th and Saint Nicholas then they are not working. That much should be obvious.</p><ul><li>What other violations could this setup catch? What other things could you do?</li></ul><p>Count traffic, vehicle speed, pedestrians, bicyclists etc.</p><p>Trucks over 53’ <a href="https://twitter.com/illegal53NYC">https://twitter.com/illegal53NYC</a></p><p>Are building owners or store owners shoveling the sidewalks? In time?</p><p>Should we send out snow trucks to every street? Or deploy them to streets that video can verify have snow blocking them. Same for street cleaning. Should street cleaning happen even if the streets are clean? Trash pickup?</p><p>Congestion pricing requires determining where vehicles are in the city and at what time in order to apply surcharges.</p><p>TLC violations. The taxi and limousine commission has a great program, <a href="http://www.nyc.gov/html/tlc/html/passenger/sub_consumer_compl.shtml">http://www.nyc.gov/html/tlc/html/passenger/sub_consumer_compl.shtml</a>, in which you can submit a picture of a offending vehicle, say a taxi in a bike lane, and the TLC will after a process fine the driver. Why shouldn’t this exist citywide for all vehicles?</p><h3>Technical</h3><p>The github <a href="https://github.com/Bellspringsteen/OurCamera">page</a> has all the code.</p><p>Some general things learned.</p><ol><li>The cameras are low resolution 352x240 CIF CTV and update at a framerate of ~1 fps.</li><li>My Intel Core i7–4770K took about 24 hours to retrain the last layer of the model. I thought it would take longer and I would need to use cloud GPU’s.</li><li><a href="https://www.tensorflow.org/">Tensorflow</a> was really easy to get started using. I had taken some Machine Learning classes 8 years ago and things are getting easier and easier to get started.</li><li>I had 800,000 images to process with the model to look for vehicle positions. Each 352x240 image took 5 seconds to analyze on my Intel Core i7–4770K CPU only. I thought it would be faster. I ended up using Amazon AWS p2.xlarge with 1 Nvidia K80 and it took .3 seconds per image. I also thought that would be faster. <strong>Side note: I tried to use google cloud but their response time in authorizing my account for ML usage was 2 days. I gave up after 12 hour and switched to Amazon who approved my GPU usage after 10 minutes.</strong></li><li>As you can see in the code the determining of whether or not the vehicle is in breach of the traffic law was not done with machine learning. Instead I just drew a simple polygon representing bus and bike lanes and counted a vehicle as blocking if it was the correct type of vehicle, i.e. not a bus, and whether the center of the vehicle was in the lane.</li><li>I considered training the algorithm to try to spot bike lanes and bus stops and do its own determination. But I was concerned that with the street markings barely visible it would be very difficult. So instead, I just drew the lanes because I could visit the street and determine the actual markings. If this was to be used at scale there might have to be a manual portion of drawing or determining the lanes/stops and mapping that to pixels.</li><li>I want to take a look at using YOLO for object detection.</li><li>Specific semantics for certain vehicles- I tried annotating the images with identifiers for further subsets of vehicles such as taxis, ups trucks, or police cars with less impressive results.<a href="https://youtu.be/LSX3qdy0dFg?t=2452"> I will have to use embeddings to further classify the types of vehicles.</a></li><li>I purchased a Movidius Tensor Compute stick and want to experiment running the detection in realtime on board a low power system suitable for mounting to a street pole and running off solar.</li></ol><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99a85513e1e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/cameras-as-traffic-cops-99a85513e1e0">Cameras as Traffic Cops</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Drivers Are Breaking the Law, Slowing Commutes and Endangering Lives. I Can Prove It — And Fix It.]]></title>
            <link>https://medium.com/a-r-g-o/drivers-are-breaking-the-law-slowing-commutes-and-endangering-lives-i-can-prove-it-and-fix-it-9fe1f9a101b9?source=rss-24e51c466895------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fe1f9a101b9</guid>
            <category><![CDATA[nyc]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[urban-planning]]></category>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Alex Bell]]></dc:creator>
            <pubDate>Thu, 15 Mar 2018 16:03:27 GMT</pubDate>
            <atom:updated>2018-03-15T16:03:27.871Z</atom:updated>
            <content:encoded><![CDATA[<p>New Yorkers who take the bus or ride a bicycle know that one of the most infuriating and dangerous aspects of their trip is cars and trucks parked in a designated bicycle- or bus-only lane. These illegally-parked vehicles slow commute times and contribute to congestion by forcing buses to stop and merge into another traffic lane and force bicycle riders into traffic, jeopardizing their safety and antagonizing drivers.</p><p>Every day, hundreds of thousands of commuters are slowed and inconvenienced so that a small minority of drivers can walk a little less. It’s unfair and unsafe.</p><p>We must — and can — do better.</p><p>I built a machine learning algorithm, using publicly-available image data from the New York City Department of Transportation, to study bus- and bicycle-lane blockage in New York. The results prove the severity of New York’s traffic enforcement crisis, and offer meaningful insights into how we can quickly, affordably, and equitably get traffic moving again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*CdFpKLzIp8xlsiBUPLENiQ.gif" /></figure><p><strong><em>A Test</em></strong></p><p>While there’s plenty of anecdotal evidence detailing how little bus- and bicycle-lanes are enforced, I wanted to examine the problem with a more rigorous approach. The New York City Department of Transportation (NYC DOT) maintains several hundred traffic cameras throughout the city, which post images in real time to <a href="http://dotsignals.org/">dotsignals.org</a>.</p><p>To pick just one example, I took a look at the <a href="http://dotsignals.org/google_popup.php?cid=532">camera on the corner of 145th Street and St. Nicholas Avenue</a> in Manhattan. St. Nicholas Avenue has unprotected bike lanes in both directions, features a bus stop, and is near a police station. (Images from this camera are available <a href="http://207.251.86.238/cctv476.jpg?math=0.9784751083558216">here</a>.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*EQyLz6_ElQR6Q5rV9tJppA.png" /></figure><p>I then wrote a computer algorithm using machine learning, available <a href="https://github.com/Bellspringsteen/OurCamera">here</a> (in short, a pre-trained Tensorflow model was re-trained on approximately 2000 pre-classified images) to study the video for ten days in December 2017, and classify the vehicles on the road and where they parked.</p><p><strong><em>The Results</em></strong></p><p>From 7 a.m. to 7 p.m. on weekdays during the period of study, <strong>the bicycle lane in front of the traffic camera was blocked 57 percent of the time, and the bus stop was blocked 55 percent of the time</strong>. Across the full ten-day period, 24 hours a day, the bicycle lane was blocked 40 percent of the time, and the bus stop was blocked 57 percent of the time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*vcLRxz5OW-IDV_eND228Cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*JeKn1BW840VKOog3wVge4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2VrwVb0TqkezNm53jguDFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*iad2e0lYhXGSBLQLyUKX3Q.png" /></figure><p>This is just a one-block snapshot of a problem that spans all five boroughs. Bicyclists frequently have to swerve into traffic to get around vehicles. More often than not, buses have to park far from the curb, blocking traffic and forcing riders into traffic. Disabled bus riders can’t safely board, and the bus is slowed down as passengers have to thread between parked cars to get on and off the bus.</p><p><strong><em>What’s Next?</em></strong></p><p>This investigation definitively shows that a small number of drivers are wreaking havoc on New York City streets. But this system also offers the city a tool to equitably enforce its existing traffic laws, reduce congestion, and increase safety for drivers, bicyclists, pedestrians, and public transit riders. The City should build off of this research and evaluate the feasibility of installing four cameras at every intersection in the city. The camera feeds should be higher quality but <strong>blur faces onboard the camera to preserve privacy</strong>, and the city should build and maintain an open source<strong> </strong>system to process the video feeds using machine learning to identify moving and parking violations.</p><p>Such a system, if implemented well, would cost less and be more effective — and more equitable — than the current system. Once the problem is wholly quantified, the City should look at expanding the program to read license plates and ticket lane-blockers after a certain, reasonable amount of time.</p><p>This setup could also potentially provide a number of research, policy, and enforcement resources for the city. Researchers may be able to use the open camera system to quantify how blocked bus lanes slow traffic and bus speed; determine best practices for snow plow and emergency vehicles; study bicyclist behavior; and count traffic, vehicle speed, pedestrian density, and bicyclists. This program could also be used to quantify and enforce 53-foot truck violations, parking placard violations, and taxi and livery violations.</p><p><strong><em>Technical Footnotes:</em></strong></p><p>The github <a href="https://github.com/Bellspringsteen/OurCamera">page</a> has all the code.</p><p>Some general things learned.</p><ol><li>My Intel Core i7–4770K took about 24 hours to retrain the last layer of the model. I thought it would take longer and I would need to use cloud GPU’s.</li><li><a href="https://www.tensorflow.org/">Tensorflow</a> was really easy to get started using. I had taken some Machine Learning classes 8 years ago and things are getting easier and easier to get started.</li><li>I had 800,000 images to process with the model to look for vehicle positions. Each 352x240 image took 5 seconds to analyze on my Intel Core i7–4770K CPU only. I thought it would be faster. I ended up using Amazon AWS p2.xlarge with 1 Nvidia K80 and it took .3 seconds per image. I also thought that would be faster.</li><li>As you can see in the code the determining of whether or not the vehicle is in breach of the traffic law was not done with machine learning. Instead I just drew a simple polygon representing bus and bike lanes and counted a vehicle as blocking if it was the correct type of vehicle, i.e. not a bus, and whether the center of the vehicle was in the lane.</li><li>I considered training the algorithm to try to spot bike lanes and bus stops and do its own determination. But I was concerned that with the street markings barely visible it would be very difficult. So instead, I just drew the lanes because I could visit the street and determine the actual markings. If this was to be used at scale there might have to be a manual portion of drawing or determining the lanes/stops and mapping that to pixels.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fe1f9a101b9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-r-g-o/drivers-are-breaking-the-law-slowing-commutes-and-endangering-lives-i-can-prove-it-and-fix-it-9fe1f9a101b9">Drivers Are Breaking the Law, Slowing Commutes and Endangering Lives. I Can Prove It — And Fix It.</a> was originally published in <a href="https://medium.com/a-r-g-o">A.R.G.O.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>