Tons of plastic ends up in the ocean every year creating a so-called "sea of plastic," a mass of garbage floating in the water that can stretch for miles. But the Australian-based Seabin Project is trying to stop the water bottles, plastic bags, styrofoam and other debris before they ever make out into the open ocean. Their solution is a floating garbage can called a Seabin that's submerged in the water at marinas, ports, yacht clubs and floating docks.

Stephen Beacham/CNET

We watched as Seabin Project CEO Pete Ceglinski install a Seabin at the Ballena Isle Marina in Alameda, California. He was installing it near a power outlet, though in the future they could be solar-powered.

The Seabin doesn't suck water in like a powerful, continuous vacuum. Instead, an electrical, submersible water pump moves an inner basket up above the water's surface and then down below it, which pulls in the water. Watch this video to see it in action.

Now playing: Watch this: The Seabin Project aims to rid the oceans of plastic

"We pump it out the bottom. And then we filter the debris and the trash and the oil with the filter in the middle of that," Ceglinski explains. "With the current filter we're using, we're catching microplastics to 2mm in size. And we have developed the filter using a finer mesh where we've been catching microfibers. So stuff that you cannot see with the naked eye."

There is also a pad at the bottom of the basket that can soak up oil.

In calm conditions with no wind, the Seabin can bring in debris from about 5 to 15 feet away (roughly 2 to 6 meters), but that means it's not catching garbage that isn't floating in its path. So the harbors and marinas need to be strategic about where they place them to maximize garbage collection. Also, it can't take in certain big pieces of garbage. We watched as a large piece of cardboard floated by and had to be fished out by hand. Though the Seabin did manage to snag a large garbage bag.

Stephen Beacham/CNET

Ceglinski says on average the Seabins catch around 3.3 pounds (1.5 kilograms) per day, which is about a half a ton a year of debris. He says there's no risk to wildlife and only a few small fish have been caught in Seabins.

"We found that the number one item the Seabins are catching is cigarette butts. The number two is plastic particles, and the third one is food wrappers," Ceglinski said. "Plus the oil as well which is always present in a marina."

There are more than a dozen Seabins installed in eight countries, but the company has orders from about 70 different countries and expects to ship out 1,500 Seabins starting in 2018. The cost is about 3,300 euros each -- approximately $4,100, £2,800 or AU$5,000 each.

For marinas and harbors, the Seabins offer a way to collect garbage 24/7.

"So it's an employee 24 hours a day for us and then we just come by periodically. And it also collects a lot of the smaller stuff that we miss," says Michelle Shadow, the general manager for Ballena Isle Marina.

In the next 10 years, the Seabin Project hopes to get the Seabins off the docks and into the open ocean.

Microplastics ban: Scientists warn glitter pollutes oceans.

Rebooting the Reef: CNET's series on the tech trying to save Australia's Great Barrier Reef.