Work is to be carried out to make level crossings safer after 33 people had near misses as pedestrians or motorists and two crashes in Wales in the past year.
Network Rail will be building footbridges, adding new barriers and using more modern technology.
It is also closing some level crossings and appointing managers at nine.
Around the UK, nine people were killed at level crossings, although none were in Wales.
Insp Mike Edwards, of British Transport Police (BTP) in Cardiff, said most accidents at level crossings were down to impatience and a desire to "beat the train".
"It is incredible that, despite some highly publicised incidents, some people are still putting their lives on the line by ignoring warning lights and sirens," he said.
"This is hugely irresponsible and dangerous. For the sake of 60 seconds, a little patience can prevent lives being ruined."
Network Rail said the surest way to prevent any accidents was to close level crossings.
It said there were about 1,165 level crossings in Wales, and 175 have been closed or downgraded over the past five years.
Network Rail has allocated £1.8m for level crossing schemes from 2009-2013, although it said it was difficult to calculate the exact amount spent.
But an estimated total of £6m has gone into improvement projects in south and west Wales which have included level crossing works, and over the next months there will be a series of "risk reduction" programmes, including upgrading existing level crossings, red light CCTV safety cameras and level crossing closures.
'Prevention and education'
Since 2009, 700 have closed around the UK and the company hopes to shut another 50 by next year.
"Where a road or footpath meets the railway there will always be a risk - tragically, for a few people every year, this results in injury or loss of life," said Tracey Young, Network Rail's community safety manager for Wales.
"We want to reduce the chances of this happening as much as possible."
The company says at those crossings it cannot close, it intends to boost safety by building footbridges, adding new barriers and using new technology.
Across the UK it is investing £130m on the improvements, although the company said it was unable to say how much of that would be spent in Wales, where there are about 1,200 level crossings.
Network Rail has also been holding safety awareness days at level crossings, advising people how to use them safely, along with BTP and Arriva Trains Wales.
Insp Edwards added: "The key thing for us is not prosecution, but prevention and education.
"We want to change the behaviour of motorists and pedestrians who misuse crossings."