-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat: add @capacitor-mlkit/selfie-segmentation
package
#66
Conversation
@robingenz I have just noticed when testing the implementation, that without the |
@trancee Yes, you're right. Do you already have an idea how best to implement it? /**
* @since 5.2.0
*/
export interface ProcessImageOptions {
/**
* The local path to the image file.
*
* @since 5.2.0
*/
path: string;
}
/**
* @since 5.2.0
* @see https://developers.google.com/android/reference/com/google/mlkit/vision/segmentation/SegmentationMask
*/
export interface ProcessImageResult {
/**
* Returns a mask that indicates the foreground and background segmentation.
*
* @since 5.2.0
*/
mask: number[];
/**
* Returns the width of the mask.
*
* @since 5.2.0
*/
width: number;
/**
* Returns the height of the mask.
*
* @since 5.2.0
*/
height: number;
/**
* The path to the generated foreground image file.
*
* @since 5.2.0
*/
foregroundImagePath: string;
/**
* The path to the generated background image file.
*
* @since 5.2.0
*/
backgroundImagePath: string;
}
What do you think? |
Yes, I think that's a good idea. I will try to implement it this way. |
@trancee Is this PR ready for merge? |
I will update the iOS implementation first, then it should be ready. |
* add definition * changed to enableRawSizeMask * feat: add Android implementation * fixed minor issues * feat(ios): add implementation * refactor: return selfie segmented image * feat: added confidence threshold * lint(android) * cleaned up code * feat(ios): add implementation * feat(ios): fixed missing import * refactoring --------- Co-authored-by: Robin Genz <mail@robingenz.dev>
@trancee Can we merge that as well? |
Yes, I am done with the implementation. Good to merge! |
@trancee Thank you again for your contributions! 😉 |
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset
).