Text this: Imperfect Wheat Grain Recognition Combined with an Attention Mechanism and Residual Network