I assume you already have the extracted text for the dataset.
It might be a good idea to use some detection model (deep learning or not) to find the text box in the first step and extract the text using these extracted text boxes.
Do you have the coordinates of the text boxes?
Also, could you post an image of a cow with the corresponding text?
I’m curious where the cows have some kind of text on their heads.