Reality cheque: we taught AI to spot the most used props this election. Here’s what it found | Australian election 2022

The novelty cheque has long been a mainstay of the political “photo op.” Still, a Guardian Australia analysis of photos posted during the 2022 and 2019 election campaigns suggests giant cheques are on the way out, while hi-vis workwear and pictures of dogs are on the rise.

While our work building the automated systems behind the pork-o-meter, which tracks election campaign pork barrelling as it occurs, the Guardian’s data team found ourselves asking an important question. Could we teach a robot to spot photos of novelty cheques?

We already used machine learning to flag text from politicians’ Facebook posts as likely grant announcements and election promises. However, having another model in place to find big cheques and certificates in photos might pick up things we’d missed in the text.

Giant cheques had made news in previous years – in 2019 when the former Liberal candidate for Mayo, Georgina Downer, presented a grant to a bowling club despite this practice usually being the domain of the sitting MP. A novelty cheque again made headlines in 2020 when Senator Pauline Hanson announced a $23m grant for Rockhampton stadium.

With this in mind, we trained an object recognition model to spot giant cheques. And from there, it was a short step further to look at other common tropes of election campaign photo ops: hi-vis workwear and hardhats, cute dogs, and footballs.

We chose these as they were either already available in pre-trained models such as Coco or had publicly available image datasets for model training.

Then we collated every photo posted by a major party candidate, MP, or senator to Facebook in the 2022 and 2019 election periods using the Facebook API and ran our object detection models on these images.

Safety first: Anthony Albanese speaks to the media at a Toll warehouse. Photograph: Facebook

So what did we find?

First, some important caveats about our method.

While many images constitute pictures from photo ops, many photos are just things politicians share on their pages. For the prime ministerial candidates, the Facebook photo dataset also doesn’t include every photo op they’ve done on the campaign trail – we were able to cross-check this thanks to AAP’s comprehensive election coverage.

So the dataset is not necessarily all the photos the politicians want to go on the news, but the ones they want to share with voters on social media.

Australian election

We also checked each image for the presence of a person before running the object detection. This excludes photos that only had a dog, for example. Our method also can’t tell if the politician is wearing the hi-vis, so it will be counted if a politician shares a photo of someone else in workwear.

These detection methods also don’t have 100% accuracy, so it’s best to treat the following numbers as a minimum count.

Here’s the total number of all photos featuring each thing, along with the proportion of all images in that campaign year:

Photo ops summary

It suggests that politicians are leaning even more heavily into the hi-vis photo opportunity and leveraging the broad appeal of the cute dog. Novelty cheques are relatively scarce in this campaign period, and footballs and other sports balls are down in 2019.

Now let’s look only at the photos posted by the leaders of the major parties – the prime minister, Scott Morrison, and the Labor leader, Anthony Albanese. For this one, we checked against their Facebook feed for any photos our models had missed.

2022 leaders

Both leaders have had a few campaign moments with dogs, so there are no surprises.

But Morrison has a higher hi-vis count than Albanese, despite Labor being more usually associated with blue-collar workers.

Albanese may be missed days on the campaign trail due to Covid-19 account for this. However, is Albanese’s makeover and relatively lower hi-vis count – new suits, glasses, and so on – part of a strategy to make the Labor leader more appealing to business leaders? And could it be the reverse for Morrison – is the party of business creating a visual appeal to voters outside their traditional base? This is only speculation, but it’s something to consider.

Scott Morrison speaks to staff TEi Services in Townsville in matching hi-vis. Photograph: Facebook

These types of photo opportunities are an inexpensive way to get voters’ attention and communicate a politician’s position on an issue, according to Luke Mansilo, a Ph.D. candidate in political science at the University of Sydney.

“‘Dog licks politician’ is a very low-cost way of getting attention, as opposed to paying for advertisements,” he said.

“And going to a factory that makes you wear a hi-vis vest does make a quick, visual short cue for someone who’s not always paying attention to the news to think, ‘This party is representing the interests of people like me’.”

Anthony Albanese is leveraging the universal love of dogs on the campaign trail. Photograph: Facebook

Finally, here are the top 10 politicians ranked by the number of hi-vis and hardhat photos posted during this election campaign:

top 10 leaderboard

In the lead is the Liberal candidate for Paterson, Brooke Vitnell, who has posted photos from several factory visits in the New South Wales electorate where she’s campaigning.

Notes and methods

Facebook photos for all Labor and Coalition MPs, candidates, and senators were scraped for the 2019 and 2022 campaign periods. In 2022 this included photos posted up to 10 May for everyone except party leaders, who we have updated to 18 May. Several assumptions have been made in comparing 2019 and 2022, such as that people haven’t deleted and shared similar pictures in both years.

For the object detection machine learning process, we used the ImageAI Python library based on TensorFlow. For each of the categories of hi-vis workwear, hardhats, and novelty cheques, we trained a custom YOLOv3 object detection model. Hi-vis was based on a publicly available dataset of 800 photos, while hardhat detection was based on a publicly available dataset of 1,500 photos. We collated and labeled 310 images of giant cheques to train the cheque-detection model. A RetinaNet model pre-trained on the Coco dataset detected dogs, sports balls, and people.

Detection thresholds for the key photo-op objects were set deliberately low to increase the chance of finding lost things, with false positives removed by visually inspecting the output.

Bella E. McMahon
I am a freelance writer who started blogging in college. I am fascinated by human nature, politics, culture, technology, and pop culture. In addition to my writing, I enjoy exploring new places, trying out new things, and engaging in conversations with new people. Some of my favorite hobbies are reading, playing music, making crafts, writing, traveling, and spending time with my family.