赞
踩
python代码数字人生成,python还是有点意思的,挺强大。感兴趣的朋友可以一起交流,高配的电脑才能跑起来,直接接口调用,以下有视频和截图效果
qq:766607800
或者关注微信公众号里有高清视频案例
视频效果
- base_image = Image.open(base_image).convert('RGB')
- fore_image = Image.open(fore_image).resize(base_image.size)
-
-
- scope_map = np.array(fore_image)[:,:,-1] / 255
- scope_map = scope_map[:,:,np.newaxis]
- scope_map = np.repeat(scope_map, repeats=3, axis=2)
- res_image = np.multiply(scope_map, np.array(fore_image)[:,:,:3]) + np.multiply((1-scope_map), np.array(base_image))
-
-
- res_image = Image.fromarray(np.uint8(res_image))
- res_image.save(save_image)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。