A Japanese security firm has developed a system using artificial intelligence to detect thefts of cash contributions from shrines' offertory boxes and notify parishioners of incidents in real time.

Nagoya-based Trinity Inc. hopes the new system to be launched this summer will lead to catching thieves red-handed at shrines, which are open 24 hours a day and often left unstaffed for long periods of time.

Supplied photo shows Takuya Kanematsu, president of Trinity Inc. (Kyodo)

Many visitors to Japan's shrines leave cash offerings inside offertory boxes typically installed in front of the shrine's main building.

The system is able to detect suspicious behavior captured by security cameras such as peering into an offertory box or going behind a box, and sends still images to registered users via free messaging app Line.

As many shrines are run by multiple parishioners, the service will allow any number of people to register, according to the firm.

The firm started developing the system around two years ago, when it was approached by a shrine operator troubled by thefts of cash contributions. It also separately heard that syringes and contraceptives had been found in the grounds of another shrine.

"We went through numerous tests to aim for creating a low-cost AI system that is also compatible with other firms' cameras," said Takuya Kanematsu, 44, president of the company.

A shrine in Nagoya's Minato Ward is considering introducing the system after suffering offertory box thefts three times in the past.

"It takes time before noticing the thefts because (the box) is unattended. We hope the system will deliver us information in real time," said Masao Banno, 77-year-old representative of parishioners at Nanashima Shinmeisha.

The firm says it has received numerous inquiries from shrines ahead of the service's launch, while it is already making progress with developing a new fire detection system that can be used outdoors.

"There are many parishioners who are concerned about fires," Kanematsu said, referring to many events held at shrines involving the use of open flames, such as fire festivals and memorial ceremonies.

"We'd like to make shrines a safe environment," he said.