It followed problems on previous trips with reports of people on the tracks.
The force said it had dealt with only eight people on its tour of the Borders Railway and the Fife Circle.
Four were found on the line between South Gyle and Dalmeny stations at about 20:15 on Sunday and a further four near Glenrothes a little later.
Ch Supt John McBride said: "The return of the Flying Scotsman was a true spectacle and I want to thank all those people who lined the route and stations to see it as it passed.
"In the main our earlier advice and warnings about not straying on the line to view it were heeded.
"Our officers worked tirelessly with our rail industry partners to ensure the day's events passed without any real incident of note.
"It was a truly memorable day for many and I look forward to its return in the future."
British Transport Police have praised the public for heeding safety warnings about trespassing on the line during the Flying Scotsman's visit.