A man secretly filmed schoolgirls in uniform using a camera hidden in a bag for almost nine years.
Gary McGorm was ordered to perform 300 hours of unpaid work and placed on the sex offenders’ register for three years.
Glasgow Sheriff Court was told McGorm had used a camera hidden in a bag to record 51 videos of young girls.
The 52-year-old filmed them in restaurants, on public transport and while they were walking along the street.
None of his victims knew they were being filmed.
Police found a diary detailing his crimes, as well as a mannequin dressed like a schoolgirl at his home in Dumbarton.
McGorm pleaded guilty to a breach of the peace as well as acting in a threatening manner.
The charges spanned between June 2011 and February this year.
Sheriff Reid, who sentenced McGorm, told him the community service was a direct alternative to custody as he had already spent the equivalent of a 12-month sentence on remand.
McGorm was initially caught after staff at a Taco Bell restaurant in Glasgow’s Sauchiehall Street became suspicious of him.
McGorm had a bag with a square cut out as a camera lens tracked two girls sitting nearby.
He then followed the pair out before staff alerted police.
Prosecutor Mark Allan said: “Officers observed a silver camera contained within an open shoebox inside the green carrier bag.
“The camera had 51 videos which featured female pupils being covertly filmed on streets, in fast food restaurants and on public transport.
“Those filmed were all school children in uniform.”
Mr Allan added: “At his home further 11 images of a mannequin dressed in a white shirt, grey skirt and a variation of socks or tights were recovered from a digital camera as was the mannequin itself.”
A diary, with what appeared to be a school motto on the front, revealed details of other similar incidents involving schoolgirls at Glasgow Central Station, on a train to Edinburgh and at a Subway restaurant.
Judith Reid, defending, said: “He accepts there was a significant sexual element.
“It is accepted his behaviour was strange and concerning and there is no doubt about that.
“He recognises that he has a problem and an addiction and needs help.”
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country