luler 一、简介 可以实现智能抠图与背景替换 基于python的flask、rembg库实现 提供在线访问页面,支持API调用 docker一键部署 开源项目:https://github.com/luler/image_background_changer 二、安装 提前安装准备好docker、docker-compose环境 新建docker-compose.yml配置文件,配置内容如下: version: '3' services: image_background_changer: image: ghcr.io/luler/image_background_changer:latest restart: always ports: - 5000:5000 一键启动运行 docker-compose up -d 三、使用 通过页面访问使用,部署完成后,访问:http://127.0.0.1:5000/ 页面如下,选择原图,选择替换背景图,默认提供证件三色的背景图,可以直接选用,也可以上传自己的背景图,然后点击开始处理即可获得智能处理结果图 测试示例 使用接口实现 提供接口:POST:http://127.0.0.1:5000/process 请求参数: 参数类型描述 file表单文件原图 background表单文件替换背景图 postman请求示例 四、演示地址 访问:https://cas.luler.top/?search=674353d62d85a