The official implementation for "ImageDoctor: Diagnosing Text-to-Image Generation via Grounded Image Reasoning"