Griffin98 / Segmentation_based_Semantic_Matting

10 stars 2 forks source link

Running on Mobile Phone? #2

Open InternetMaster1 opened 4 years ago

InternetMaster1 commented 4 years ago

Good to hear that you plan to continue work on this project. When do you envision to complete the ToDo list?

Can this project be run on Android. If yes, how?

Griffin98 commented 4 years ago

I have planned to complete my todo list before mid may.

Answer to your second question is Yes as well as No. Well this project in its exact shape can't be run on android. But yes you can definitely implement this for mobile with a little bit effort. I will only give overview of the process, rest you need to figure it out yourself.

1) Get the segmentation mask using TFLite Object Segmentation Model Link. It uses DeepLab architecture so it will compensate the accuracy loss in case of mobile.

2) Use Deep Image Matting mobile having MobileNet Architecture to predict alpha matte. Here is a good one Link. This one is in pytorch you need to port it for tflite.

3) In your JNI Android Application, just call OpenCV Erode and Dilate, and Image Matting in Loop Just like i did you will get your desired result.

InternetMaster1 commented 4 years ago

Thank you do much got the detailed answer, truly appreciated. I will pursue this path.

The link you provided in step 2 for https://github.com/foamliu/Mobile-Image-Matting shows in their table a SAD score of around 127. A higher score means lower accuracy? Do you think it would be possible to improve upon this?

Sorry for the newbie question...