One of the problems with depression is the fact that detecting its onset can be difficult. As a result, people can be depressed for years, without even knowing what their problem is. A new computer program could help, however – it can detect depression in peoples' Instagram photos, even before the condition is diagnosed.

The program was created by a team led by Dr. Christopher Danforth of the University of Vermont, and Dr. Andrew Reece of Harvard University. They recruited 166 Instagram users, 71 of which had a clinical diagnosis of depression within the past three years. A total of 43,950 photos were analyzed.

What the scientists found was that even before depressed users were officially diagnosed, they tended to have a preference for posting images that were grayer/bluer in color – and darker – than those of healthy users. Depressed users also didn't use color filters as much, but when they did, they tended to use one that converted color images to black-and-white. By contrast, healthy users had a preference for filters that warmed up and brightened the colors.

Using a face detection algorithm, it was also found that the number of faces in depressed users' shots was lower. This makes sense, as depression typically leads to a reduction in social engagement. That said, depressed users did post photos more often than their healthy counterparts – perhaps a sort of cry for help?

So far, the program is approximately 70 percent accurate at detecting depression based on peoples' photos.

"With an increasing share of our social interactions happening online, the potential for algorithmic identification of early-warning signs for a host of mental and physical illnesses is enormous," says Danforth. "Imagine an app you can install on your phone that pings your doctor for a check-up when your behavior changes for the worse, potentially before you even realize there is a problem."

A paper on the research was recently published in the journal EPJ Data Science.