Getting error when creating segmentation model

As I’m trying to instantiate the model
private lazy var visionModel = FritzVisionPeopleSegmentationModelFast()
I keep getting the error
Cannot invoke initializer for type 'FritzVisionPeopleSegmentationModelFast' with no arguments
as it seems to FritzVisionPeopleSegmentationModelFast.init needs a parameter “model”, but I can’t find any of this in the doc.

I am using Fritz 5.3.4, Xcode 11.4.1 targeting iOS 13.0

  • The version of the Fritz SDK, testing device, iOS version, and Xcode version. (e.g Fritz v5.3.1, iPhone 11 on iOS 13.4, Xcode 11.4):

Hi Laurent,

Can you include the contents of your podfile? You may need to include the people fast model:
https://docs.fritz.ai/develop/vision/image-segmentation/ios.html#include-pre-trained-image-segmentation-models-in-your-app-bundle

Thanks,
Chris

Hi there,

this is the content of my Podfile.

# Uncomment the next line to define a global platform for your project
# platform :ios, '13.0'

target 'XXX' do
	# Comment the next line if you don't want to use dynamic frameworks
	use_frameworks!

	# Pods for XXX
	pod 'Fritz'
	pod 'Fritz/VisionSegmentationModel/People/Fast'
end

The model is already included.
I noticed the errors goes away if I rely to the 5.3.0 version

Thanks

Hmm it’s strange that the errors go away on version 5.3.0.

A couple next steps to try:

  1. Clear your derived data folder, clean your build folder, and then run build again.
  2. run pod deintegrate and then pod install again.
1 Like