TOKYO—McDonald’s in Japan used to display on its menu: “Cost of a Smile: 0 Yen”—but new facial recognition software could cost some employees their jobs, especially in service industries, if the algorithm discovers they’re not smiling enough.

This is just the latest wrinkle in a nation where karoshi (death by overwork) is a constant problem, and new labor laws are squeezing people even more. One employee recently was humiliated publicly for taking three extra minutes to order lunch during work hours. So what seems like a benign innovation, smile recognition software, could easily become another instrument of torture.

On June 14, information technology developer E-ComeTrue announced it had launched a company work-log and attendance system that uses facial recognition to check when workers started and left work at the office. The innovative part of the system is that it also measures whether they are smiling, and to what degree they are smiling, in order for them to clock in or out.

“ The ‘smiley-face’ points are displayed, and if the points are too low, the display will inform the user, ‘Your smiley-face is below standard.’ ”

It works like this. The employee, when he or she arrives at the office, presumably at 9 a.m. sharp, must input his or her ID into a tablet with the system installed. The tablet then starts up, takes a picture of their face, and matches it with records to make sure it is the registered user. At the same time, by measuring whether the corners of the mouth are upturned, and to what degree, as well as whether these are the dimensions of a cheerful expression, it assigns a value to the “smiley-face” level of the user.

The “smiley-face” points are displayed, and if the points are too low, the display will inform the user, “Your smiley-face is below standard.” Depending on the setting, the user may be unable to log in for work. The company in its press release explains: “Because the system demands that the employee make a proper smile in front of the camera [before starting work], it is recommended for bars, restaurants and other service industries.”

The workers could also be assessed on the state of their smiles when logging out. Of course, there are some problems with that system. For instance, companies could set it up so that gloomy workers can’t even log into work, which would make them absent. Or if they couldn’t summon up a smile in time, they could be late for work and docked pay. And if, after a long day on the job, if you really can’t muster an appropriate grin, does that mean you can’t leave? Even if you turn your frown upside down by taking the photo while hanging from the ceiling or doing an inverse position on a pole, it seems you can’t seem to fool the system.

The Daily Beast wrote and called the company to ask a few questions, but as of press time the firm had not yet formally replied to our inquiries. In an interview with the evening newspaper Nikkan Gendai, however, the president of the company was quoted as saying, “Well, anyway you look at in the service industry a smiling face is necessary, right? You can set the [required] value freely, so it’s really up to the company how to implement it.”

In fact, the lack of a smile already can keep you from getting work in Japan. There have even been cases in which companies have rescinded promises of employment because they decided the candidate they promised to hire wasn’t cheerful enough.

“ The Japanese government is pushing forward a package of bills called by some the ‘Death By Overwork Approval Act.’ ”

There could be a legal issue for the companies, although the precedent is an old one. It’s very hard to deny someone work or fire them without good reason in Japan. A common employment practice in Japan is for companies to hire large batches of fresh college graduates all at once, and those hired sign an agreement not to apply anywhere else. This agreement is called a naitei and has some legal standing.

In the 1970s, when Dai Nippon Printing Co., Ltd broke its promise to one graduate, he took his case all the way to supreme court. The company’s defense for reneging on the contract was that it felt “the [student] seemed to have a gloomy personality.” The court ruled in July of 1979 that “a gloomy impression” was not sufficient grounds to rescind the offer and forced the company to instate the graduate. But he was lucky, the exception rather than the rule.

If Johnny Paycheck was going to rewrite his classic song, “Take This Job And Shove It” for modern Japan, he’d have to rework the karaoke version to read, “Take This Job And Love It... Or You Ain’t Working Here No More.” And this in a country where many companies are easy to hate.

Logging out at a Japanese company, doesn’t always mean that you’re done with work. Many companies, known as “burakku kigyo”, aka “dark companies” or “evil corporations” force their workers to log off at 5 p.m. so that no records are left for the labor inspectors—and then they are forced to work until the last train, with no compensation, in a practice called “service overtime.” It’s bad enough knowing that you’re being forced to work without pay but it’s going to be even worse when you have to smile about it.

If you’re not cheerful enough or compliant enough in the office, you might end up with your unhappy face on the equivalent of a WANTED poster within the workplace, publicly humiliated and punished. This is what happened to one man at a notoriously unpleasant moving and logistics company. The firm was selected as the winner for “Most Evil Corporation of The Year” last December.

(Yes, in Japan, there is actually such an award, chosen by a panel of labor experts and journalists, and the candidates are often companies listed on the stock exchange. Dentsu, one of the largest advertising firms in the world, has twice been sanctioned by the Ministry of Health, Labor and Welfare for overworking employees to the point where they committed suicide, was the winner in 2016.)

Last year, the moving company in question, decided to get rid of an employee who wasn’t toeing the line, and had the audacity to join a union, by assigning him to be in charge of shredding documents and then firing him. In addition, they printed out the reasons for his firing on a handout that looked like a fake rap sheet, detailing his “crimes,” along with a picture of his face and posted it in branches of the company all over Japan. He wasn’t smiling for his “mugshot,” either. If that wasn't enough, they made sure to put the same information in a company newsletter and sent it to all the employees.

In August of last year, the Tokyo Government Labor Committee condemned the firm and labelled its actions as illegal. The committee also recognized the posters as retaliatory moves to discourage others from joining a labor union and to encourage other workers to leave the union.

Yes, life as a Japanese worker often provides little to smile about. This week the Kobe City Waterworks Bureau held a press conference to announce it was punishing a 64-year-old city worker for sneaking out during work to order a boxed-lunch during office hours. The city estimated that he took three minutes to do so, and had repeated this terrible crime at least 26 times. He was docked half-a-day’s pay. Even in work-crazy Japan, the overwhelming public reaction was that this might be going too far.

Meanwhile, in the current legislative session of the Diet, the Japanese government is pushing forward a package of bills, called by some the “Death By Overwork Approval Act,” that will legalize 100 hours of overtime a month, 20 hours more than what the Ministry of Health, Labor and Welfare deems dangerous. It also completely eliminates overtime pay for many white-collar jobs. That’s really nothing to cheer about either.

“ One in four employees (27 percent) admitted they had thought about literally killing their boss. ”

Japan has never really been a workers’ paradise but it is on its way to becoming a worker’s hell on earth, a situation depicted in the award-winning darkly humorous family drama, Shoplifters, a film that Prime Minister Shinzo Abe and his cohorts responsible for the new labor laws don’t find amusing at all.

Let’s face it, it’s hard to smile when you have a lousy job or crappy working conditions.

However, on the lighter side there may be a workaround for getting past the smiley-face barrier. According to a survey conducted by Sirabee, an online news site in Japan, of 1,005 Japanese workers between 20 and 70 years of age, one in four employees (27 percent) admitted they had thought about literally killing their boss. One imagines they might have had a wicked smile when they answered that pollster’s question.