post_process_panoptic_segmentation() got an unexpected keyword argument 'target_sizes'

#1
by naveed3797 - opened

I am running this model and while calling the post_process_panoptic_segmentation function, I get an error that target_sizes is an unexpected keyword argument. However, in the documentation, target_size is a valid name for the argument. What is causing the problem?

result = feature_extractor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]

TypeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_9140\1666018226.py in
----> 1 result = feature_extractor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]

TypeError: post_process_panoptic_segmentation() got an unexpected keyword argument 'target_sizes'

Sign up or log in to comment