The remove grain script is present in utils.py but needs to be inserted into the utils.apeer_convert ideally before the molecules are numbered. Otherwise images will contain incorrectly labeled data.
Although, can try this with and without to see if there is a difference.