Depending on how deep these caverns are, and the composition of the earth above them, detecting such caverns could be done in many ways, several in our current technological state and some with more archaic means.
Let's assume they're only a few metres (10-15m, ~30-45ft) deep, and the earth above them is comprised of granite, or another solid stone. In such circumstances, caverns can be detected by our modern technology in the form of ground-penetrating radar, often used for archaeology or other low-depth scanning. Said technology was recently used for mapping the ground around Stonehenge, with surprising success. If modern humans were using this technology, they could stumble across underground caverns, and don't forget that humans are curious , especially scientists. They might want to check out those caverns, leading to a great discovery.
Let's Go Deeper
What if people were mining in a region? Mines can be deep, the deepest reaching multiple kilometres down. Humans have been mining for thousands of years, with ever-increasing scale and depth. Occasionally, a mine could be built that would intersect one of your caverns. Or what if a mine collapsed, or a cavern near a mine collapsed during blasting, revealing the cavern nearby? People will potentially find it and, being people, want to check it out.
Lately, we've also been doing an awful lot of drilling (for oil, natural gas, etc.). Maybe a drill-well could intersect a cavern and, if science was curious enough, they'd want to check out this massive cave network they found (probably during the initial surveying of the drill site).
And what about something as simple as a spelunker going down a new cave entrance that no one else had ever explored? Earth's caves are big, and some are interconnected in strange ways! New passages can open all the time as the ground shifts or erodes. Eventually, a hole may open somewhere and humans could find their way in. Spelunking is a modern hobby, as far as I can tell, but it has still been practiced for decades. One does not need much tech to find an inhabited cavern completely by accident. Let's hope it doesn't turn out like it does in some of the movies, however.
There is also the possibility of deeper scanning, as noted here, which could easily spot a large cavern given time to refine the process.