The howbusyistoon.com online tool.

Howbusyistoon.com: Challenges around technology, data and privacy

Local Digital
Local Digital
Published in
5 min readOct 5, 2020

--

Blog 2: Citizen focused data sharing to encourage economic renewal aka ‘How Busy is Toon

In this guest blog post, Luke Smith, Deputy Director of the Urban Observatory, shares his insights into the challenges of monitoring and managing public spaces in a post-COVID-19 world and the technology available.

COVID-19 has brought new challenges to the way we manage our public spaces in order to allow people to safely distance themselves while continuing to socialise and shop. One way to help people make their own decisions about whether to head out — reflecting their own perceptions of how busy is too busy, risk profile, and prevalence of the virus — is to publish live data. Many bus and rail companies now provide this service and the Office for National Statistics provides indicators for footfall on a weekly basis. Applying machine learning with CCTV cameras is now a common approach to quantifying footfall.

Many high streets already have CCTV cameras and the necessary power and data infrastructure. These might be operated by shopping centres, local authorities or the police for public safety and crime prevention. Most modern cameras produce a constant video stream and transmit it to a control room, where an operator can direct the camera, or to a recording device if it’s not continuously monitored. Most of these systems are digital, making it easy to stream the images into other software if the system supports standards like RTSP and ONVIF.

Privacy and the law

Operating a camera in a public space that views pedestrians and their activity will involve processing personal data, and you’ll need to comply with the Data Protection Act 2018. The Information Commissioner’s Office offers guidance on the steps you need to take to comply with the legislation.

You’re likely to need a Data Protection Impact Assessment (DPIA). Consider if it’s feasible to count pedestrians using other technologies: an area of low footfall might be suitable for radar-based counting, or mobile operator data might be a suitable proxy for an estimate of people in an entire region. Our experience is that camera-based counting is most suitable only for busy streets, wide open spaces such as squares, and where there’s a high vantage point.

How good is good enough?

CCTV cameras fall into two broad categories: fixed cameras that always look in the same direction, and pan-tilt-zoom cameras that an operator can direct and control. A camera that’s constantly spinning in different directions isn’t going to produce any meaningful statistics, so fixed cameras are ideal.

Computer vision models, a type of machine learning, can be trained to detect almost anything. It’s possible to achieve high detection accuracy on cameras positioned at a high level (such as on a lighting column) when models are trained to recognise the shape of a pedestrian. We try to avoid any processing that picks up on facial features — we’re not interested in who they are, and we don’t try to match anyone from one camera to the next.

No model is perfect. Training can be a laborious and repetitive process — largely consisting of drawing boxes around people on a computer screen — but there are open source and pretrained models. A pretrained model might not perform as well as a carefully crafted bespoke model when applied in a different environment, so if the training dataset was captured in sunny California then it might be rubbish at detecting an umbrella-wielding British public.

With limited accuracy, it’s important to consider what you’re going to do with the data and whether it’s fit for that purpose. For ‘How Busy Is Toon’, we know the accuracy isn’t perfect: we assume it’s almost always an underestimate (false positives do happen), and we acknowledge that some people will block the camera’s view of those behind (known as occlusion). But crucially, it’s good enough to give us an indication of how busy the streets are.

From detection to counts

We need to ensure the detection is quick enough to alert people when the high street is busy, and to convert the detections into meaningful statistics such as pedestrians-per-minute in each direction.

A sophisticated open source model such as Microsoft Research’s FairMOT can do this processing in real time by offloading some of the processing from your PC’s main processor (your CPU) to graphics hardware (a GPU using CUDA) while simpler models can run on a mobile phone. It does mean that if you want to count pedestrians across a large number of cameras, you might raise a few eyebrows in your IT department when you ask for a hundred high-specification gaming PCs. Commercial options involving specialised hardware that perform the counting within the camera unit or nearby (a form of edge processing) are available.

In Newcastle, we track how each detection moves from one frame to the next, giving us a trail for each pedestrian. We then count the number of times each trail crosses a detection line, and the direction it crossed in. The advantage of this approach is a single camera can be used with multiple detection lines. Using two detection lines we can see the effect of the one-way system introduced to allow social distancing.

These graphs analyse the pedestrian count data obtained from a small number of CCTV cameras in the centre of Newcastle, processed in real-time using computer vision to count pedestrians that cross lines.

Once we have counts in each direction, we apply some basic thresholds to describe how busy it is and try to take an average over a few cameras and the last few readings. It’s not uncommon for birds and parked vehicles to block the camera’s view for a while.

What next for howbusyistoon.com

As you can see the technology is available, it’s just a case of finding the most effective solution and tying it in with a user-friendly app.

A prototype of How Busy Is Toon is now live and we’re focussing on building a 2.0 version of the tool. We’re also currently looking at the data aspects, such as what data could be used to supplement the tool and what could be useful for our users.

Keep up to date and follow their progress

Thanks for reading! Be sure to follow @LDgovUK on Twitter for all the latest #LocalDigitalC19Challenge news and updates.

--

--

Local Digital
Local Digital

The Local Digital team is part of the UK Department for Levelling Up, Housing & Communities. Read more about our work: https://www.localdigital.gov.uk.