Lots of countries have speed cameras which are fairly automated. In the UK they tend to be placed in areas of frequent accidents (where speeding is definitely dangerous) and trigger at around 10% over the speed limit.
Rather than use algorithms to assess the general traffic speed, why not just have sensible speed limits?