All Categories Telraam S2 Speed measurements with Telraam S2

Speed measurements with Telraam S2

How does Telraam S2 measure speed 

Telraam S2 - just like our original sensor, the Raspberry Pi-based Telraam V1 - cannot measure speed directly like a typical police speed gun (which is a small Doppler radar), so it needs to use an indirect method to derive velocities. In an ideal world, if we knew the distance between the camera and each passing object, or the length of the road covered by the field of view of each individual Telraam S2 unit, then we could calculate speeds from measured travel-times. For example speed could be easily calculated from the time it takes a car to travel along a known length on the road.

While this sounds good in theory, it is not practicable in reality for reasons that were already discussed using the example of Telraam V1 in “Speed measurement and unrealistic speed data”. 

To make our measurements distance independent, we keep using the solution that we came up with for Telraam V1: Telraam S2 measures the time it takes a car to travel its own length - which does not depend on the distance from which the car is perceived - and assuming the car has the length of a typical car (a value we calculated from the most popular cars sold in recent years in Belgium), it can calculate its speed. Since Telraam S2 uses a slightly different method (AI) to find objects than Telraam V1 (OpenCV) - and to measure their length - we had to do some tests to make sure the results were still accurate.

How are the speed measurements of Telraam S2 calibrated and validated  

Validating speeds is a much more challenging task than validating counts, as measuring the speed of a car for an outside observer is much more difficult than simply including it in a vehicle count. Since we do not have access to Doppler radars, we created a test environment mimicking the average speed measurement zones that are more and more common on highways. The principle is the following: if we can measure the time it takes for cars to travel from a known point A to point B, where we know the exact distance between these two points, then from the elapsed time and the distance we can calculate the exact speed, which will be viewed as the ground truth. If we can actually record the cars between point A and B and then we can feed this video recording to the Telraam S2 in our testing environment, then we can also get the speeds that are measured by the Telraam. By comparing the ground truth speed to the speed measured by Telraam S2, we can 1) compare how well these measurements match and 2) we can calculate an internal correction factor to make them match as closely as possible.

In our test setup (showcased above) point A and B were 8 metres apart, meaning that in a 60 FPS recording it took a car moving with 40 km/h 43 frames to travel between them (which translates into a measurement accuracy of around 1 km/h). We have taken a 3 minute long recording of free flowing traffic and measured each object's speed by noting the timestamps when they crossed the first and last line spaced by one metre each. Lines could be drawn and measurements could be taken with high precision thanks to the measured curb stone length along the edge of the road surface being exactly one metre, and the video’s 4K resolution and 60 FPS frame rate.

In total 56 car’s speed was measured in this way, before running the video through the debugging tool. In order to cover a broader speed range and test the performance of Telraam S2 at higher speeds too, we also created a sped-up version of the video (at twice the original speed), and fed that also through the debugging tool (assuming twice the original ground speeds for each object). This process provided us with a correction factor that had to be introduced to the AI chip’s firmware (with FW version 327940), after which we got the following speed validation figure:

It is visible that the speeds measured by Telraam S2 are in an overall one-to-one agreement with the ground truth measurements, with some unavoidable scatter, which originates mostly from not every car having the same length, and that cars’ length closer or further from the Telraam S2 might be slightly differently measured by the AI.

The V85 (85th percentile speed) in the full ground truth sample is 74.6 km/h while in the Telraam S2 data it is 71.6 km/h (96% accuracy). When looking only at the original (not-sped-up) sample, the ground truth V85 is 40.9 km/h while the one measured by Telraam S2 is 39.6 km/h, which is 97% accurate. This is the accuracy we expect in urban conditions.


Reasons why the speed data of your Telraam S2 might be inaccurate

There are various factors that influence the accuracy of the speed data. 

Most important of these is local deviations in the fleet composition from our calibration sample. Since our speed derivation assumes that each car has the length of a typical Belgian car (or more precisely the average length of the 56 cars in our calibration sample), if the local fleet is very different in length from this then speeds will become more and more inaccurate as the deviation gets larger. Speeds will be underestimated for places where cars are larger (longer), and underestimated where cars are smaller (shorter).

The second factor to mention is traffic being uncharacteristically far from (or in less likely cases, close to) the Telraam S2 device. While we have not conducted tests to study these cases, from our understanding of how the AI works we can assume that if cars appear very small or very large in the field of view of the Telraam S2, then the perceived length of these objects for the AI might differ to some extent from what is deemed typical, and this would have a similar effect on the speed measurements as actual vehicle size deviations from the typical. These risks can be minimised by correct Region of Interest (ROI) selection, and not trusting speed measurements coming from Telraam S2 devices that are placed along extremely wide roads where the closest and furthest traffic lane are large distances apart (e.g., roads with 3 lanes in each direction).

Finally, since we have to calculate the V85 from speed data that has been binned to 5 km/h wide bins, V85 values given by Telraam might show a deviation of up to 2.5 km/h from the real V85, with the true deviation depending on the traffic volume, the absolute value of the V85, and the uniformity of individual speeds.

Telraam S2 is expected to have much less object misclassifications or spurious objects compared to Telraam V1, therefore this should not be a significant source of error anymore.

Was this article helpful?

Thanks for your feedback!