Scotland's deficit fell to £13.3 billion for 2016/17 amid an increase in oil and gas revenues, according to new figures.
Police Camera System Uses Mugshots
Mugshots of convicted criminals have been fed into a police computer designed to identify faces on surveillance cameras, Police Scotland has confirmed.
Police Scotland uploads custody photos to the UK Police National Database, which is equipped with a facial searching functionality.
The computer then matches the mugshots to faces on CCTV of recent crimes, which are then used to identify suspects for further formal identification.
Photos of everyone charged with a crime are uploaded to the PND but Police Scotland said the system only retains images of convicts.
Suspects who are not convicted are "weeded'' - removed from the PND - once Police Scotland reports that the case has been dropped, it added.
There have been 601,837 mugshots of 334,594 Scots uploaded to the PND, which has been used by Police Scotland 440 times for facial recognition, according to police figures obtained by the Scottish Liberal Democrats.
The Lib Dems said the technology could be a useful crimefighting tool but has called for more safeguards to prevent police conducting mass surveillance of political protests or large spectator events on the ``unregulated'' software.
Detective Chief Inspector Russell Penman, of Police Scotland's specialist crime division, said: "Police Scotland have been using facial-searching functionality on the Police National Database (PND) since 2014.
"Facial search is an intelligence tool that can be used for intelligence development purposes.
"It is not used for formal photographic identification procedures, although it does provide intelligence around the suspected identity of an individual whose image has been taken and searched. ''
Police Scotland records images on its own database - the Criminal History System - which are subsequently fed into the UK PND, he said.
He added: "Where charges are not proceeded with, resulted by an alternative to prosecution or a non-finding of guilt, the image weeding process will be initiated.
"The weeding of the record and image is then carried out by records managers based on administrative reports generated by CHS.
"The following day the image is weeded from PND. Police Scotland do not retain images indefinitely of people who were never subsequently charged with and convicted of an offence.''
Lib Dem justice spokeswoman Alison McInnes said: "The combination of this database with the new facial recognition software has triggered concerns about the protection of our civil liberties.
"It has already been condemned by the High Court, a parliamentary committee and the independent Biometrics Commissioner.
"Without adequate legal safeguards, there is nothing to stop the police from using this technology for mass surveillance.
"It could be used to identify protesters at political events or football fans, stifling freedom of speech. I also have real concerns that the privacy of innocent people could be comprised and they could be exposed to the risk of false identification.
"Facial recognition technology has the potential to be a useful policing tool in detecting crime and making our communities safer.
"But, like other biometric identification technologies such as fingerprinting and DNA profiling, it is essential that this intrusive software is properly regulated.
"It appears it isn't currently the subject of a robust legal framework or clear reporting processes.
"SNP ministers need to urgently clarify how they are ensuring our civil liberties are protected and this technology is used appropriately.''
A man has been arrested after a teenager was allegedly seriously sexually assaulted in a vehicle which she got into thinking it was a taxi.
Emergency services were called to the scene in Renton Road in Dumbarton following the crash which happened at about 8.40am.
The NSPCC helpline in Scotland made 905 referrals to the police and social services in 2016/17.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred station:
Now playing: The best feel good music
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.