Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance and Segmentation Accuracy Issues with SegFormer CoreML Model #34

Open
rouzbeh-abadi opened this issue May 11, 2023 · 1 comment

Comments

@rouzbeh-abadi
Copy link

Hello,

I'm integrating the SegFormer CoreML model into an iOS project for real-time semantic segmentation but I'm facing two major issues:

Performance: The model is slower than expected in real-time settings, which is considerably affecting its usability.

Segmentation Accuracy: The model's outputs seem incorrect in terms of class predictions and their spatial locations. The segmentations do not align with the actual positions of the objects in the input image.

Additionally, while initializing the model, I receive a warning in Xcode: "Sort/TopK layer does not support input tensor's shape along vector dimension > 8." I'm wondering if this could be contributing to the issues with the segmentation output.

Any guidance on addressing these issues would be highly appreciated.

Thank you in advance for your assistance.

@john-rocky
Copy link
Owner

Make sure the input image is cropped correctly.
If you are using VNCoreMLRequest, make sure imageCropAndScaleOption is set to scallFill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants