This method uses pre-trained AI models for instance segmentation to detect grain boundaries and determine grain sizes automatically. Note that you need the software Docker Desktop running on your computer to be able to use the models. You also need to download your models to have them available, see Downloading AI Models.