Sydney (AFP) - A pair of Australian swimmers on Thursday became the first people to be rescued in the ocean by a drone when the aerial lifesaver dropped a safety device to distressed teens caught in rough seas.

Australia is leading the use of the technology in surf lifesaving, with dozens of drones being trialled on beaches around the country.

In what is believed to be a world-first drone surf rescue, two boys on Thursday got caught in three-metre (10-foot) swells while swimming off Lennox Head in New South Wales, near the border with Queensland.

Beachgoers onshore raised the alarm to the lifeguards who then alerted the drone pilot, and the aerial lifesaver was deployed in moments.

"I was able to launch it, fly it to the location, and drop the pod all in about one to two minutes," lifeguard supervisor Jai Sheridan told the Gold Coast Bulletin.

"On a normal day that would have taken our lifeguards a few minutes longer to reach the members of the public."

Other than a little weary from their experience the pair were reportedly unharmed.

Along with their ability to spot swimmers in trouble and deliver life saving devices faster than traditional lifesaving techniques, like launching surfboards or rubber dinghies, drones are being used in Australia to spot underwater predators like sharks and jellyfish.

Artificial intelligence is being developed using thousands of images captured by a drone camera to build an algorithm that can identify different ocean objects.

The software can differentiate between sea creatures, like sharks which it can recognise with more than 90 percent accuracy, compared to about 16 percent with the naked eye.

Some beaches in Australia have shark nets, but a government report last year called for their phasing out in favour of exploring a range of alternatives, including sonar technology and aerial patrols.

The inquiry found that nets did not guarantee public safety any more than other deterrents but caused significant damage to marine life.