一、简介
- 可以实现智能抠图与背景替换
- 基于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请求示例
四、演示地址
访问: 我这个咩应用