Person Background Replacement on Android Based on Image Semantic Segmentation
2020-08-29
192 views
PaddlePaddle
Android
PaddlePaddle
Android
Computer Vision
Semantic Segmentation
Your project has already implemented basic human image recognition and background replacement functions. To further improve and optimize your code, I will provide some improvement suggestions and sample code. ### 1. Improve the processing flow of predicted images During the conversion of prediction results to images, you can consider using the constructor of `Bitmap.createBitmap` to create a bitmap directly from the array, which can reduce the creation of unnecessary temporary objects. Additionally, when drawing a transparent background, you can directly use `Canvas` and `Paint` to set the background transparency.
Read More