Dai and his colleagues decided to demonstrate that trash counting can be done by laser—specifically, by light detection and ranging (LIDAR). This method bounces laser pulses off objects and uses the echoes to map an environment. It’s often used to survey landforms, forests, or archaeological sites. The dense, three-dimensional rendering that results is called a “point cloud.”

The researchers wanted a system that could take a LIDAR image of a beach, then use that image to count and classify trash on its own—no tedious hand-counting required. First they had to train the computer algorithm that would do the classification. They carried a big heap of trash to a beach called Nanhui, which, thanks to wind patterns, was nice and clean until they got there. The collection of 87 items included plastic, metal, cloth, and paper. They scattered the trash around the beach and set up a laser scanner on a tripod 100 meters away, pointed at the garbage. 13 minutes later, the scanner had collected a cloud of about 96 million points.

As the researchers filtered, smoothed and otherwise processed that set of points, ghostly outlines solidified into 3-D representations of soda cans and cardboard boxes. Different materials reflect laser light in distinct ways, and the scientists used these signatures to teach their algorithm how to sort the litter into plastic, paper, cloth, and metal.

Then it was time for the test. The researchers brought their system to a beach called Beihai. The site is popular with tourists, and holds what the authors call a “vast amount of debris” either dropped by visitors or swept ashore by waves. They scanned the beach on three different days, letting the scanner collect points for about 20 minutes each time. To check how well the scanner and sorting algorithm performed, they also manually counted trash in the scan area. (Their findings included cans, plastic bags, Styrofoam takeout containers, and at least three shoes.)

The LIDAR scanning and sorting method was about 75 percent accurate, the researchers reported in Nature. It was totally unable to spot glass debris—maybe because glass and sand are so chemically similar, the scientists say. Plastic, though, is the biggest threat to ocean ecosystems, and the system found more plastic debris (as well as paper, cloth, metal, and plant material) than researchers did in their hand counts. Larger objects came out the most clearly in the 3-D modeling, and regular shapes (say, a cardboard box) looked more realistic than irregular ones like foam pieces or crumpled clothing.

The main advantage of LIDAR scanning was time. It took just 20 minutes to capture enough data to make a detailed 3-D model of the trash on a beach. But when the researchers scoured the same beach and counted the trash manually, it took between two and a half and three hours.