Core ML iOS 11 not recognizing images properly

Viewed 907

I tried Core ML which was recently introduced in iOS to recognise and classify images. The problem is, it is not giving proper results for the images sent.

If i send an earth image(Globe) it is giving me the class as bubble. Below is the code i used,

            let model = Resnet50()

            let pixelBuffer: CVPixelBuffer =  (modelImg.pixelBuffer())!

            if let prediction = try? model.prediction(image: pixelBuffer) {
                print( "Found it!! It is a/an \(prediction.classLabel)")
            }

Is it possible to train the Model with custom use cases on top of the existing Core ML model?(For ex. Resnet50)

2 Answers
Related