Hostname: page-component-77f85d65b8-pztms Total loading time: 0 Render date: 2026-04-20T08:27:04.172Z Has data issue: false hasContentIssue false

Improving Computer Vision Interpretability: Transparent Two-Level Classification for Complex Scenes

Published online by Cambridge University Press:  09 December 2024

Stefan Scholz*
Affiliation:
Center for Image Analysis in the Social Sciences, University of Konstanz, Konstanz, Germany
Nils B. Weidmann
Affiliation:
Center for Image Analysis in the Social Sciences, University of Konstanz, Konstanz, Germany
Zachary C. Steinert-Threlkeld
Affiliation:
Luskin School of Public Affairs, University of California, Los Angeles, Los Angeles, CA, USA
Eda Keremoğlu
Affiliation:
Center for Image Analysis in the Social Sciences, University of Konstanz, Konstanz, Germany
Bastian Goldlücke
Affiliation:
Center for Image Analysis in the Social Sciences, University of Konstanz, Konstanz, Germany
*
Corresponding author: Stefan Scholz; Email: stefan.scholz@uni-konstanz.de
Rights & Permissions [Opens in a new window]

Abstract

Treating images as data has become increasingly popular in political science. While existing classifiers for images reach high levels of accuracy, it is difficult to systematically assess the visual features on which they base their classification. This paper presents a two-level classification method that addresses this transparency problem. At the first stage, an image segmenter detects the objects present in the image and a feature vector is created from those objects. In the second stage, this feature vector is used as input for standard machine learning classifiers to discriminate between images. We apply this method to a new dataset of more than 140,000 images to detect which ones display political protest. This analysis demonstrates three advantages to this paper’s approach. First, identifying objects in images improves transparency by providing human-understandable labels for the objects shown on an image. Second, knowing these objects enables analysis of which distinguish protest images from non-protest ones. Third, comparing the importance of objects across countries reveals how protest behavior varies. These insights are not available using conventional computer vision classifiers and provide new opportunities for comparative research.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of The Society for Political Methodology
Figure 0

Figure 1 Comparison of visual information extracted from protest image with Deconvolution, Grad-CAM, Integrated Gradients, and Attention Rollout.

Figure 1

Figure 2 Instance segmentation applied to an image of a candlelight vigil (left) using COCO vocabulary (center) and LVIS vocabulary (right).

Figure 2

Figure 3 Feature generation from a segmented image (left), with different feature vectors generated from this image (right): binary vector ($v_a$), count-based vector ($v_b$), area-max vector ($v_c$), and area-sum vector ($v_d$).

Figure 3

Figure 4 Out-of-sample evaluation of different methods. The figure displays the F1 score achieved on the test set; LVIS area sum with gradient-boosted trees achieves the best F1 score of 0.7203. The logistic regression obtains low F1 scores with the area-based features, making certain bars invisible. Visualization based on Supplementary Table A3.

Figure 4

Figure 5 Proportion of segments in protest and non-protest images (left) and importance of area-sum aggregated segments (right).

Figure 5

Figure 6 Differences in importance of posters, cars, and candles across different protest episodes. The left column presents the differences in importance of objects. Positive values denote higher importance in relation to the whole sample. The right column shows the examples of protest images: the use of posters in Russia, protest including cars from Argentina, and the use of candles during protest in Lebanon.

Supplementary material: File

Scholz et al. supplementary material

Scholz et al. supplementary material
Download Scholz et al. supplementary material(File)
File 1.4 MB