I believe it's inaccurate to lump the iMessage and iCloud scanning together. The iMessage scanning tries to classify images as sexually explicit. The iCloud scanning tries to identify images that exist in the CSAM database, accounting for recompression and cropping.