For 2,000 years, mariners and engineers have had Ancient Greek genius Archimedes to thank for coming up with a method to weigh ships and, crucially, make sure they don’t topple over.

The mathematician and scientist’s lightbulb moment is said to have struck while he enjoyed a bath, and realised that the water level rose when he submerged himself, and that the water pushed him up.

But while the Archimedes’ Principle has been used ever since as the basis of how to measure the weight and stability of shipping vessels, a collaborative team of Scottish researchers have now had their very own ‘Eureka!’ moment.

Using new artificial intelligence (AI) technology, the consortium of researchers has created a machine vision tool, powered by deep learning, that will automate and more accurately carry out the tricky task.

It means that instead of using age-old methods involving time-consuming checks – barely changed since the days of Archimedes himself - the job could soon be carried out instantly, using smartphones and drones.

Read more: Scientists bid to unlock the darkest secret of whisky’s unique taste

Accurate draught readings are critical for ensuring a ship’s stability, indicating how much cargo it is carrying and what depths it can safely navigate. The readings are also checked by port authorities to ensure vessels meet with local limits and regulations.  

Currently draught marks – numbers marked in increments on the side of vessels to indicate how much of the ship is submerged – are measured and recorded by eye from the quay or a boat - similar to the way they have been for more than two millennia.

However, the measurements are often open to interpretation – waves, faded markings, lighting, and marine growth are just some of the factors that can lead to different readings being taken from the same vessel.

Mariners also have to check the marks on both sides of a ship, which can take hours, requires a boat, and involves health and safety risks.

Glasgow and Aberdeen based naval architecture firm Tymor Marine and the University of Edinburgh, with support and funding from CENSIS – Scotland’s innovation centre for sensing, imaging, and Internet of Things (IoT) technologies – have now revealed they have hit on technology that will bring the task into the modern age.

The Herald:

The technology uses algorithms applied to video recordings of ships to accurately identify where the water line reaches on a ship’s hull, which it’s hoped can be incorporated into a smartphone app, enabling seafarers to record draught marks and upload them to the cloud for real-time readings.

Rosie Clegg, naval architect at Tymor Marine, said: “We had been trying to develop this technology for some time, but quickly found there was no off-the-shelf software.

“Through CENSIS, we found the expertise we needed at the University of Edinburgh to develop our own technology and bring innovation to what is, broadly speaking, a traditional industry.

“Over the last twelve weeks, we have been able to prove that the concept behind the technology is feasible.

“Now we will focus on its different elements, train it with data we are now capturing with each visit to a vessel, and begin taking it to a commercial level. We are also exploring the possibility of applying it to drones, which would make the process even safer.”

Read more: Why people kill? Ex detective who snared Peter Tobin delves into the truth

Tymor Marine specialises in naval architecture and marine technology, but with just 19 employees it faced a challenge of figuring out how to develop its highly specialised AI-based technology.

A link was forged with Edinburgh University’s experts through CENSIS, the centre of excellence for sensing and imaging systems (SIS) and Internet of Things (IoT) technologies, which helps organisations explore innovation and overcome technology barriers.

Dr. Hakan Bilen, reader in the School of Informatics at the University of Edinburgh, said: “When researchers were developing AI in the early years, they thought it would easily solve visual tasks that we do effortlessly like recognising digits and estimating waterline and struggle with more complex situations, such as playing a game of chess.

“However, the opposite has turned out to be the case and it is the seemingly simple tasks that we are still finessing.

“The algorithm we have created for Tymor Marine has been built on the recent advances in deep neural networks. The model takes in a video showing a ship’s hull and identifies where digits on the side of a vessel intersects the water line in a variety of different scenarios.

Subscribe to The Herald and access the best writing in Scotland

“We are continuing to build the database by introducing more manual annotations for training and also to improve various components in the method, which should only make it more accurate in the future.”

Corinne Critchlow-Watton, project manager at CENSIS, said: “This project is a great example of a small Scottish business bringing innovation to solve a global challenge.

“It is incredible to think that the worldwide shipping industry still relies on principles developed in ancient Greece for such an important part of how it operates.

“Machine vision could bring a more accurate, consistent, and safer approach to stability and weight checks for vessels, which can only be hugely positive for the sector.

“It is particularly exciting to see this technology being developed here in Scotland.” 

The Herald:

Water clocks and death rays - the life of Archemedes

Mathematician, scientist, inventor and mechanical engineer, Archimedes was the father of maths and machines, coming up with everything from water clocks to a rather terrifying ‘death ray’.

Born in Syracuse on the island of Sicily in 287BC, he is said to have been so thrilled at cracking his Archimedes Principle while having a bath, that he jumped up and ran naked through the streets shouting ‘Eureka! I have found it!’

His other inventions, such as his screw pump and compound pulleys, have also stood the test of time, while his theories and mathematical explanations behind objects such as the lever led to him being regarded as one of the greatest mathematicians who ever lived.

He is also credited with designing defensive war machines to protect Syracuse from invasion, including the catapult and a ‘death ray’, a mirror system that focused the sun’s rays on invaders boats, igniting them.

Another, known as the Iron Hand and similar to a crane, featured a grappling hook designed to reach over city walls, grab enemy ships and batter them against rocks.

None of which was enough to halt the Roman forces.

Cornered by a Roman invader while deep in contemplation over a maths problem, he refused to leave his work to meet his commander. As his killer struck his fatal blow, the 75-year-old Archimedes’ final thought remained on solving problems. His final words: “Do not disturb my circles”.