1 Reply
      Latest reply on Aug 16, 2018 3:10 PM by demoMonkey
      dmendels Level 1 Level 1 (0 points)

        I am currently exploring createML and the MLImageClassifier. I suppose the documentation is not complete, which is hampering my "discovering" of the proper way of adding MLImageClassifier.ModelParameters. I can manage the maxIterations, but not the augmentationOptions... What is the proper way to declare and use that instance variable? And what are the ranges, units, and significance of MLImageClassifier.ImageAugmentationOptions.blur, exposure, flip, noise, rotation and shear?


        Many thanks in advance for enlightening me,



        • Re: createML image augmentation
          demoMonkey Apple Staff Apple Staff (10 points)

          Hi David,


          The ImageAugmentation options conform to the OptionSet protocol. You should be able to specify them like so:


                  let augmentationOptions = MLImageClassifier.ImageAugmentationOptions.crop

                  let parameters = MLImageClassifier.ModelParameters(maxIterations: 5,

                                                                                                         augmentationOptions: augmentationOptions)




                  let parameters = MLImageClassifier.ModelParameters(augmentationOptions: [.crop, .exposure])