It’s still relatively rare for artificial intelligence to deliver a crushing victory over human physicians in a head-to-head test of medical expertise. But a deep neural network approach managed to beat 42 dermatology experts in diagnosing a common nail fungus that affects about 35 million Americans each year.

The latest successful demonstration of AI’s capabilities in the medical field relied heavily upon a team of South Korean researchers putting together a huge dataset of almost 50,000 images of toenails and fingernails.

That large amount of data used to train the deep neural networks on recognizing cases of onychomycosis—a common fungal infection that can make nails discolored and brittle—provided the crucial edge that enabled deep learning to outperform medical experts.