Skip to content

ML Kit Selfie segmentation model #2

@alvaroschipper

Description

@alvaroschipper

Hi @Volcomix, I am really impressed with your work here! I have been following the work that has been done by multiple parties on this topic but have gotten stuck on the licensing issue surrounding the Google Meet model, until I came across this:
https://developers.google.com/ml-kit/vision/selfie-segmentation

This seems very similar to Google Meet's model at first glance, and when taking a look at the model card, it actually is licensed under Apache 2.0!

Doing some further digging I was able to extract the .tflite file from the Android package without issue:
selfiesegmentation_mlkit-256x256-2021_01_19-v1215.f16.tflite.zip

After that I did an inspection of both the Google Meet model you have in the repo and this new one using https://netron.app/:
Google Meet
segm_full_v679 tflite

ML Kit Selfie segmentation
selfiesegmentation_mlkit-256x256-2021_01_19-v1215 f16 tflite

As you can see their structures are practically identical, the only difference I see is the input and output sizes, the new model using 256x256.

I have tried cloning your repo and loading this model with it by putting it in the public folder with the other models and changing the path used to load it, it seems to load correctly but there is no output visible except a very faint, perhaps stretched outline of the person detected. This leads me to believe using this model with your implementation should be possible, perhaps requiring some adjustment due to the different input/output resolutions (memory offset?), curious to hear your thoughts on this 😄.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions