Published:
Author: Brennen Jensen
Category:
Students hold a wooden baseball bat up in front of a green screen
Xiaojian (Jason) Sun (left) and Kevin Wu created an AI-powered computer vision system that can turn a photo of a bat into an exacting set of measurements in minutes.

On the opening weekend of the 2025 Major League Baseball season last month, the New York Yankees turned heads by hitting a record-setting nine home runs in a game against the Milwaukee Brewers. The first three pitches thrown to Yankees batters were all promptly deposited over the outfield wall.

Of particular interest to the baseball community was the science behind the slugging. Some Yankees hitters are using what are known as torpedo bats, a bat that is slightly tapered at the end with the thickest part of the bat at the barrel, where the hitter typically makes contact with the ball. Also known as “bowling pin bats,” the bats—designed for the Yankees by an MIT-educated physicist—are meant to maximize speed and power through the hitting zone. Players on least nine other MLB teams have since started using torpedo bats, looking for even the slightest edge in a game that is increasingly informed by data and analysis.

Where might science-fueled bat design go next? Thanks to the contributions of a pair of Johns Hopkins students, the Yankees’ American League East rival Baltimore Orioles might be the team to ask. Last year, as part of the process of potentially creating new bat designs of their own, the Orioles asked the Hopkins students to develop a high-tech solution to the laborious process of measuring hundreds if not thousands of team bats. And the pair delivered. Kevin Wu, in the third year of a combined bachelor’s and master’s program in computer science, and Xiaojian (Jason) Sun, a robotics graduate student, created an AI-powered computer vision system that can turn a photo of a bat into an exacting set of measurements in minutes.

The project falls under the umbrella of the 10-year-old Johns Hopkins University Sports Analytics Research Group at the university’s Whiting School of Engineering, where student-driven projects bring cutting-edge analytics and data science methodologies to the world of sports. They will present their project on April 29 at the Whiting School’s Design Day, an annual event showcasing students’ innovation and ability to translate theoretical knowledge into real-world solutions.

“Subtle differences in handle diameter and contour can affect a batter’s comfort, control, and confidence at the plate,” the student researchers wrote in a project description. “For professional players who are closely attached to their bats, even minor variations in the handle can significantly influence performance. That’s why analyzing the full profile of a bat, from knob to barrel, is essential.”

Traditionally, if you wanted a precise profile of a bat, you manually made numerous measurements using calipers and other hand tools, a process little changed since Babe Ruth’s heyday a century ago.

“It’s a tedious task that takes a lot of time, and if you were just measuring bats all day, you’d probably have many errors,” Sun says.

To show off their computerized solution, Wu and Sun recently demoed their system in an empty Malone Hall classroom. A bat to be measured is suspended by fishing line in front of a matte LCD screen projecting an even green color (not unlike the green screen technique used in TV and film). Once they can capture a clear, shadow-free image, they snap a photo with an iPhone and feed the image into their program, which utilizes computer vision—a field of artificial intelligence that enables computers to interpret and process visual information. Using such image processing techniques allows them to extract and calculate the diameter at precise one-inch intervals along the bat’s entire length. Most MLB players use bats that are 32-34 inches in length.

The goal, the students say, is to allow the Orioles to make better, data-driven decisions and tailor bats more effectively to players’ needs while staying in compliance with league regulations governing the size of bats.

A team of Hopkins students that first attempted this project a few years ago achieved 80% accuracy in their resulting measurements. The Orioles had asked for 99.7% accuracy; the technique developed by Wu and Sun achieved 99.8% accuracy.

“Kevin and Jason did great work,” says Orioles assistant general manager Sig Mejdal, a former NASA engineer who oversees the team’s analytics operations. “They solved a problem that others had failed at. Their computer vision work has streamlined the measurements of bats for us.”

As part of their work, Wu and Sun made numerous trips to Oriole Park at Camden Yards, where the Orioles are now setting up a dedicated room to deploy their bat measurement system.

“The Baltimore Orioles are clearly looking ahead by sponsoring a project like this well before the torpedo bats showed up,” Wu says. “So I’m sure they’re cooking up something good on their own.”

Both students feel this type of real-world, hands-on project was an invaluable addition to their classroom work. And the system they developed can be used to measure objects beside bats, opening it up to applications beyond the ballpark.

Wu goes so far to say the project has changed him in another significant way. “I’m from Boston and grew up watching the Red Sox,” he says. “But I’m so thankful for the opportunity that the Orioles have given me. I would have to say my baseball allegiance is going to them now.”