googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.55k stars 2.92k forks source link

Get the final output #515

Closed gururajKp closed 2 years ago

gururajKp commented 2 years ago

How to get final segmented video from this app ?

bcdj commented 2 years ago

Are you on Android or iOS? Please provide a bit more info using the following template so that we can better help you:

Describe the bug A clear and concise description of what the bug is.

To Reproduce Example Steps to reproduce the behavior in sample app:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

If applicable, please include code snippet and sample input(image, video, text, etc)

Expected behavior A clear and concise description of what you expected to happen.

SDK Info:

Smartphone:

Development Environment: (For Android issue feel free to skip this section)

gururajKp commented 2 years ago

I am on Android

Describe the bug As I am getting the Video on SimpleExoPlayer I want to save that output with segmentation. So how can I save that Segmented video ?

Expected behavior I want to save segmented video for further use.

SDK Info:

'com.google.mlkit:face-detection:16.1.2' Smartphone:

Device/Android API 30 and below Development Environment: (For Android issue feel free to skip this section)

IDE Eversion: Android Studio 4.2 Desktop: Windows 10

ai-plays commented 2 years ago

As shown in the ML Kit vision quickstart app, you can combine the camera input and the segmentation mask to generate a single frame with segmentation. As for how do you combine all the frames and save it to a video file, it is out of the scope of ML Kit SDK. I would suggest to research it via Google search or in places like StackOverflow.