Two labelers judge the same 200 images:
They agree on 50+110=160 of the 200 images, 80%. That raw agreement flatters them, because some of it is chance.
Cohen's kappa corrects agreement for chance. The scikit-learn documentation describes it as a score for the level of agreement between two annotators on a classification problem:
κ=1−pepo−pepo is the share of items the two labelers agree on. pe is the agreement you'd expect if each one answered at random at their own yes-rate.
Here, po=0.80. A says yes on 75 of the 200 images, and B on 65. Two labelers agree by chance when both say yes or both say no. So pe is the product of their yes-rates plus the product of their no-rates. Work it out in the editor, and kappa comes to 0.56.
Eighty percent agreement sounds solid. A kappa of 0.56 says a good share of it is chance.
In the editor, write yes_rates(table) and chance_agreement(yes_a, yes_b). table holds A and B's 200 images as a 2 by 2 list, with A's answers as rows and B's as columns.