mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

TypeError: ImageSegmenterOptions.__init__() got an unexpected keyword argument 'output_category_mask'

Open saboorniazi opened this issue 1 month ago • 0 comments

import mediapipe as mp from mediapipe.tasks import python from mediapipe.tasks.python import vision import os model_path = 'data_gen/utils/mp_feature_extractors/selfie_multiclass_256x256.tflite' if not os.path.exists(model_path): os.makedirs(os.path.dirname(model_path), exist_ok=True) print("downloading segmenter model from mediapipe...") os.system(f"wget https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_multiclass_256x256/float32/latest/selfie_multiclass_256x256.tflite") os.system(f"mv selfie_multiclass_256x256.tflite {model_path}") print("download success") base_options = python.BaseOptions(model_asset_path=model_path)

options = vision.ImageSegmenterOptions(base_options=base_options,running_mode=vision.RunningMode.IMAGE,output_category_mask=True)

saboorniazi avatar May 09 '24 11:05 saboorniazi