When Swupnil Sahai started creating SwingVision, he had no app-building experience — but he’d played a lot of tennis.
“The initial idea was, ‘Maybe we can use the accelerometer and gyroscope on Apple Watch to figure out how fast I’m swinging, and maybe we can use the [Apple Watch] screen to keep score,’” says Sahai from his workspace in the Bay Area. “That was really it.”
The app was a true passion project for Sahai, who jumped into SwingVision pretty much cold. “Although I’d programmed in other languages, Swift seemed much more approachable, so I thought ‘Maybe I can pick this up on my own.’” He not only picked it up, he found the learning curve so speedy and enjoyable that he was staying up later and later to plunge into SwingVision and Swift. “I was building in Xcode on day one,” he says. “I don’t think I’ve ever had so much fun working.”
Today, SwingVision has become the definitive tennis app, and an incredible example of the combined power of cameras, machine learning, and the concept of filling a need. It’s beautifully and exclusively designed for iOS, with an easy-to-navigate UI that makes it accessible to both officially sanctioned matches and people practicing on the weekends.
I was building in Xcode on day one. I don’t think I’ve ever had so much fun working.
Swupnil Sahai, SwingVision founder
It’s also become an integral part of the tennis community. SwingVision is now used for line calling, the definitive say on whether a ball is in or out — a call that’s still left to players themselves. “It’s rare to have judges on the court in tennis,” says Sahai. “In baseball, you have umpires. Even middle-school basketball has referees. Somehow in tennis you have to do everything yourself.”
Founded in 2015 by Sahai, along with close friend and current CTO Richard Hsu, the app couldn’t be simpler. Point your iPhone or iPad camera at the court and SwingVision tells you how fast you’re serving, the consistency of your shots, and how to shape up your posture and footwork. It does so by using advanced machine learning to track shots (a pretty intensive process). “It allows you to call lines more accurately than you could with your own eyes. But if you don’t record at 60 fps, you won’t even see the ball bounce — it just moves too fast,” he says. “Of course, 1080p video is very, very high resolution. It’s something like 2 million pixels that all have to be processed 60 times a second. We had to innovate a lot to make these models as lean as possible. This app is basically not possible without Neural Engine.”
SwingVision, now powered by a team of 23, has evolved quite a bit. Players can now stream matches live — both the video and the on-screen data — and afterward, the app creates an easily shareable highlight reel. One of its latest features sets up “target zones” on the court to help players practice their serves — a great example of how the video-centric app integrates tightly with Apple Watch. “Serving is traditionally the most boring thing to practice,” laughs Sahai. “So we gamified it with different sound effects and a progress monitor on Apple Watch. Even with all our video, Apple Watch is still critical because it elevates the experience.”
In addition to driving the success of his app, Sahai shares his development expertise by continuing to teach a UC Berkeley course called Data 8: Foundations of Data Science — currently the largest class on campus. He’s known as “the SwingVision guy.” “Sometimes I’ll see a post from a student that says, ‘Wait, you made that?’” he laughs. “The community there is very supportive.”
Behind the Design is a series that explores design practices and philosophies from each of the winners of the Apple Design Awards. In each story, we go behind the screens with the developers and designers of these award-winning apps and games to discover how they brought their remarkable creations to life.