There is multiple ways to achieve that depending on your needs, but in our case we use the Modified Hausdorff Distance. You can find a working matlab code on filexchange here. It is fairly easy to use. The function takes the 2 point sets and returns a distance.
Another method, faster but a less robust is the quotient of similarity defined as 2*pixels included in both object, over the addition of the total number of pixels in each object.
2*N(a,b) / ( N(a)+N(b) )
where N is the number of pixels.
EDIT for graphical comparison:
We use the fileexchange rendering function sc. You can easily create a mask with 2 binary images. You can create a new image by adding your objects over your ground truth. You can apply the mask with a different color, so the differences will stand out.