At first glance, Kamiyama looks like any other rural town in Japan: shuttered stores on the main street, a petrol station unencumbered by customers, hunched-over old ladies tending rice fields.

But on closer inspection, this mountain village on Shikoku, the smallest of Japan’s four main islands, also has many highly unusual attributes, such as wood-fired pizza, tech start-ups and young people.

As rural Japan battles the twin afflictions of a population that is getting smaller almost as quickly as it’s getting older, Kamiyama is one of a handful of towns bucking the trend. It’s practising “creative depopulation” – trying to make sure it gets younger and more innovative, even as it shrinks, by attracting youthful newcomers weary of big-city life to work in new rural industries.

There’s a French bistro run by a former Apple employee, a handmade-shoe atelier, an organic coffee roaster, long-haired guys in “no nukes” T-shirts and a bunch of techie types opting out of the rat race. Think of it as Japan’s answer to Portland, Oregon.

“For me, it’s simple. I can have my work and my hobbies co-existing here,” says Kiyoharu Hirose, the director of a web-design company who moved here with his family a year ago from Osaka, Japan’s second-largest city. His sons are in fourth and sixth grade, and his wife works as a florist.

“Here, I can go fishing in the morning before I come to work,” said Mr Hirose, 42, sitting on a camping chair outside his office, in jeans and sneakers. “Even though it’s still May, my boys come home wet after playing by the river.” His office is an open-plan kominka, a traditional wooden building, with big computer screens inside and racks of fishing rods outside. The only skyscrapers are cedar trees and the only noise pollution comes from birds.

About 10 steps away is his home, an old kominka, several times larger than the house they had in Osaka. “My designer friends said there would be no work for me if I came somewhere so rural, but my work is client-oriented, so this is a great chance to try to create my own work and jobs.”

That is exactly what Shinya Ominami, Stanford engineering graduate and Kamiyama native, had in mind when he started thinking about creating a “Green Valley” here: “There is no way to stop the depopulation trend, so we wanted to concentrate on the quality of the population by bringing in young people and diverse working styles.”

It’s also an example of what Prime Minister Shinzo Abe’s government in Tokyo has in mind as it tries to staunch migration to metropolises. The Japan Policy Council think-tank predicted last year that a third of Japan’s 1,800 municipalities were in danger of vanishing, with the number of women of childbearing age dropping precipitously in half of them.

Meanwhile, greater Tokyo has a population approaching 38 million. People commute long distances from tiny apartments on packed trains – at rush hour, there are even white-gloved attendants to pack people into the carriages – to work 12-hour-plus days.

But an increasing, though still tiny, number of people are opting out of this daily grind. They are moving to Kamiyama and a handful of other towns across Japan that want to attract young people who will create jobs and have children there.

Kamiyama’s population has fallen from 21,000 in 1955 to 6,000 or so now. But in 2011, the year when Japan’s population began to decline, Kamiyama’s numbers grew – if only by 12.

Two things have helped Kamiyama’s metamorphosis: high-speed broadband, and its location on an island famed for its Buddhist temple pilgrimage, which means people are used to welcoming outsiders.

“There are so many shops here that closed down, so it’s good to see new businesses opening up,” said Masakazu Kitai, who has run Kitai Dry Cleaning since the 1960s. His son, Junji, added: “The people who moved here are more fashionable, so they’re more likely to get their clothes cleaned.”