When Devaki Raj, the founder of the San Francisco-based deep learning startup CrowdAI, and an Inc. 30 under 30 alum, learned that an artificial intelligence engineer she was trying to recruit was in the hospital, she didn't think twice about what she did next: Raj showed up at the hospital with flowers and balloons. She wanted to make sure the candidate got the message that her startup would be a very different atmosphere than what he'd get at a larger company.

There's a talent war brewing between startups and big companies as both scramble to find top-notch artificial intelligence experts in a relatively small labor pool. 

"There's just not enough talent out there," Raj says.

The number of experts in this field is not clear--Montreal startup Element AI, which helps businesses build machine learning teams, estimates there are some 20,000 PhD-level computer scientists around the world capable of building AI systems. These are the experts who are needed to develop autonomous cars, facial recognition technology, virtual assistants, and more. What is clear is that tech giants are trying to lure them by offering exorbitant salaries that can start at $300,000 a year, according to Bloomberg

The struggle to find AI talent is hard felt for startups that can't throw around cash as easily as companies like Google, Amazon, or Facebook. According to a McKinsey report, tech giants invested $20 billion to $30 billion in AI in 2016. Startups that need to staff up in AI face the additional hurdle of finding talent that is unique enough to solve the specific challenge they're working on.

With AI still a relatively new field, tech companies often look to recruit experts from universities who are working on the cutting-edge of technology and steeped in high-level mathematics and statistics. For instance, in 2015, Uber hired 40 people from Carnegie Mellon to work on its self-driving car project. But such recruits don't always transfer so neatly to a startup environment.

CrowdAI maps out infrastructure changes such as roads and buildings on a global scale, and counts among its clients Udacity, Planet Labs, and Cruise Automation. Because the startup collects data on satellite and aerial imagery, particularly in areas not well-mapped in the world, CrowdAI works with a lot of messy data, which may be an unfamiliar challenge for experts in academia. Raj says she wades through hundreds of resumes in a week and often notices applicants will have the deep learning background needed but not necessarily the startup experience to "actually implement these things in a clear structure."

"At a startup, everything is fairly ad hoc--you have to be able to work with certain types of uncertainty," she says. Raj added that she's essentially "looking for a unicorn" who has the academic experience but also capabilities of doing production-ready work.

The other problem startups face is seeing their recruits snatched up before they even have time to make an offer. Once candidates learn of higher salaries elsewhere, they often don't wait around for an offer, says Sameer Maskey, founder of New York-based FuseMachines. He's experienced that scenario more than once. Founded in 2013, his startup develops automated sales and customer service platforms. "Many candidates have gone just because we could not afford it," he says. (His offering salary starts at $120,000.)

So Maskey started looking elsewhere. Also a machine learning professor at Columbia University, Maskey said he started sourcing from around the world to address the talent shortage. After four-and-a-half years, he built a team of almost 100 remote AI engineers from Nepal, Canada, and the Dominican Republic. Maskey says he realized there is a lot of undiscovered talent in developing countries--they just might not have spent 10 or so years earning a PhD degree. 

Seeing the model worked for his team, Maskey created a fellowship program within his startup last year that sources and trains remote AI engineers for other companies in need of this talent. 

Companies outside of technology, telecom, and finance face even bigger hurdles when trying to recruit AI engineers. The expertise hasn't really trickled down to other industries yet, according to the McKinsey report.

"In the medical field, you wouldn't even be able to recruit someone with medical device experience and AI experience. That would be a true unicorn because AI hasn't been applied to that area," says Peter Verrillo, founder of Enhatch, a New Jersey-based medical device technology company that builds planning and logistics software for surgeons to plan in advance of the procedure. His team is 20 employees, eight of which are dedicated to working on AI, and Verrillo is looking to hire more AI engineers in the future. 

When he does, he might want to bring balloons and flowers--the engineer CrowdAI's Raj wooed in the hospital joined her team in February.