catsim: Binary and Categorical Image Similarity Index
Computes a structural similarity metric (after the style of MS-SSIM for images) for binary and categorical 2D and 3D images. Can be based on accuracy (simple matching), Cohen’s kappa, Rand index, adjusted Rand index, Jaccard index, Dice index, normalized mutual information, or adjusted mutual information. In addition, has fast computation of Cohen’s kappa, the Rand indices, and the two mutual informations.
https://cran.r-project.org/web/packages/catsim/vignettes/two-dimensional-example.html