A towering machine rumbles through the fields of Julio Rinco's farm in the Brazilian state of Sao Paulo, engulfing whole coffee trees and shaking free beans that are collected by conveyor belts in its depths.
This automatic harvester is one of several innovations that have cut Rinco's production costs to a level that few who use traditional, labour-intensive methods can match.
With increasing use of mechanisation and other new technologies, the world's top two coffee producers, Brazil and Vietnam, are achieving productivity growth that outstrips rivals in places such as Colombia, Central America and Africa.
They are set to tighten their grip.
A plunge in global coffee prices in recent months, to their lowest levels in 13 years, has begun to trigger a massive shake-out in the market in which only the most efficient producers will thrive, according to coffee traders and analysts.
Rival producers elsewhere in the world are increasingly likely to be driven to the margins, unable to make money from a crop they have grown for generations. Some are already turning to alternative crops while others are abandoning their farms completely.
Such shifts are almost irreversible for perennial crops like coffee, as the decision to abandon or cut down trees can hit production for several years.
"Brazil and Vietnam have had consistent increases in productivity, other countries have not," said Jeffrey Sachs, director of the Centre for Sustainable Development at Columbia University, citing advances in mechanisation, selective crop breeding techniques and irrigation technology.
In Colombia and Central America, coffee is typically grown on hillsides where mechanisation is more difficult, and hand-picking cherries has kept production costs relatively high.
The African sector, meanwhile, is dominated by small-scale farmers often unable to raise the capital needed for new techniques.
Rinco bought his harvesting machine for around 600,000 reais (€134,214.80) and is paying the agricultural supplies company with coffee, delivering 400 bags a year over four years. This kind of bartering is common in Brazilian farming.
One such machine in Brazil replaces dozens of people in the field. Even with financing and fuel bills, farmers and machine manufacturers say there is a reduction of 40% to 60% on harvesting costs.
"Beyond the lower costs, it made my life less complicated," said Rinco, relieved at no longer having the gruelling task of hiring suitable pickers every year for the harvest at his farm in the Sao Joao da Boa Vista area.
"People don't want to pick coffee anymore, they go to town to find something else to do."
Clear Sign Of Increased Efficiency
Brazil and Vietnam now produce more than half the world's coffee, up from less than a third 20 years ago, and the proportion is rising, US department of agriculture estimates show.
Leading producer Brazil alone accounts for over a third of global supply. In a clear sign of increased efficiency, it reported a record crop of 62 million bags last year and is expected to produce another record in 2020, the next on-year in the country's biennial production cycle - despite the fact the coffee-planting area has been falling for the last six years.
Vietnam is also regularly setting production records while, by contrast, in Colombia the largest ever crop was harvested in the early 1990s and in Guatemala nearly two decades ago, USDA data shows.
In countries such as Guatemala and Honduras, growers who are increasingly abandoning farms are swelling the ranks of migrants trying to enter the United States.
Boom In Brazil
Average yields in Brazil have risen sharply over the last decade with figures from the UN Food and Agriculture Organisation showing an increase of more than 40% to about 1.5 tonnes per hectare. Vietnam has also seen yields rise from already strong levels, climbing about 18% to around 2.5 tonnes.
Colombia did show some growth, about 12%, but remains well behind at about 1 tonne per hectare while in Central America there was a decline of around 3% to a meagre 0.6 tonnes.
Businessman Alexandre Gobbi and two partners decided to enter coffee farming in Brazil four years ago. They bought an area in Sao Sebastião do Paraíso, in the main producing belt in Minas Gerais state, and sought out state-of-the-art tech.
Today, his farm has equipment including an underground dripping irrigation system with artificial intelligence, considered the world's most advanced.
"It does almost everything by itself. Reads humidity levels, tells me when to add water and fertiliser and by how much," he told Reuters, pointing to the digital panels in his control room.
With the system, plus other equipment including harvesters, he has doubled average yields to around 60 bags per hectare, and can make a profit even with current low prices.
Arabica coffee futures on ICE Futures US, the most widely used global benchmark for coffee prices, fell in May to 87.60 cents per lb, the weakest level since September 2005.
Prices have since recovered slightly but remain at a level where few producers outside Brazil and Vietnam can make money.
Variety In Vietnam
Arabica beans, which provide a smoother and sweeter taste, constitute nearly two-thirds of the world's coffee. More bitter and stronger robusta beans largely make up the rest of global supply, much of them hailing from Vietnam.
A warehouse owned by Vietnamese coffee exporter Simexco Dak Lak Ltd in the town of Di An, near Ho Chi Minh City, illustrates the scale of Vietnam's coffee operation.
Coffee is stacked in neat piles several metres high, awaiting export to Europe. The warehouse has enough capacity to store 20,000 tonnes during the harvest season.
"At the height of the harvest, having enough space to create an aisle to walk through the warehouse becomes a luxury," said Thai Anh Tuan, who manages one of three warehouses for Simexco, which exports over 80,000 tonnes of robusta a year.
"Every tiny bit of space will be taken up by these little beans," Tuan added. "We have to hire additional warehouses nearby for extra storage."
Innovative Farming Techniques
Tuan also credited the steady increase of Vietnamese coffee exports over the last four to five years to an increase in innovative farming techniques, including intercropping - growing different crops together - and the use of better technology in irrigation and cultivation.
Coffee is still the key cash crop for Dak Lak, Vietnam's largest coffee-producing province, although durians, jack fruit, mangoes and avocado trees have all been intercropped with coffee trees to maximise income in recent years, farmers told Reuters.
Ksor Tung, a coffee grower with a 10-hectare farm, said intercropping coffee with durian trees resulted in better protection from direct sunlight and pests.
"Farmers here have experimented with intercropping for nearly a decade," Tung told Reuters.
"Peppers used to be the most popular tree when it comes to intercropping but for the past three years, with the prices falling, almost all farmers have turned to fruit trees instead," said Tung, adding that farmers who intercrop can triple their income per hectare.
Crisis In Colombia
Farmers in Colombia face a far different future.
Battered by low prices and high costs, some are contemplating switching to other crops or selling up, despite tens of millions of dollars in government aid.
Jose Eliecer Sierra, 53, has farmed coffee for three decades but low prices have forced him to look at alternatives - Hass avocados and cattle among them.
"Avocados are in high demand abroad and it's one of the options," he said, standing amid some of his 41,000 coffee trees on a mist-shrouded mountainside near Pueblorrico, in Antioquia province.
"Another very tempting option that people are thinking about is cattle - knocking down coffee trees and planting grass for cows," said Sierra.
It is not the first time Colombian coffee growers have looked to other crops for a better living. Many in the south - sometimes under pressure from armed groups - abandoned it for the more lucrative coca, the raw ingredient in cocaine, though coffee has since rebounded.
For some growers, even switching crops may not save them.
Uriel Posada, who worked for more than 30 years as a house painter in the United States, dreamed of coming home to Colombia to grow coffee. Now his land is up for sale.
"I'm up to my neck in debt," the 52-year-old said, gazing up the steep hill where his 30,000 coffee trees are planted.
"Brazil has a huge advantage over us - the land is flat and they have machinery," Posada said. "Here I have to pay a human being to go tree by tree, branch by branch and pick the red berries."
Avocados and cattle are good alternatives, Posada said, but require start-up funds and transition time that many local growers do not have.
"I'll sell, pay what I owe and go. End my Colombian dream."