Use ImageMagick to compare Images

The problem is with the colorspace gray part of the command. This option checks only difference between gray colour of the images.

So the correct command should be

convert image1 image2 -compose Difference -composite  -format '%[fx:mean*100]' info:

This should give you more appropriate answer.