# datong **Repository Path**: colornix/datong ## Basic Information - **Project Name**: datong - **Description**: 这是一个基于Python的Web项目,主要功能是抠图,界面框架使用gradio库,去除背景的使用rembg库。 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-05-14 - **Last Updated**: 2024-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 1. 简介 这是一个基于Python的Web项目,主要功能是抠图,界面框架使用[`gradio`](https://gradio.app/)库,去除背景的使用[`rembg`](https://github.com/danielgatis/rembg)库。 ## 2. Git仓库 [Gitee仓库](https://gitee.com/zyw/rebg) [Github仓库](https://github.com/zyw/rebg) ## 2. 二次开发 如果需要二次开发,可以参考以下步骤: 1. 安装依赖库: ``` pip install -r requirements.txt ``` 2. 运行项目: ``` python main.py ``` 3. 打开浏览器,访问`http://localhost:7860/`,即可看到项目的界面。 4. 注意事项: 本项目依赖https://onnxruntime.ai/库,如果报这个库相关的错误,请查看官网。 ## 3. 项目图 ![项目图](./imgs/1714140827227.png) ## 4. 如果电脑显卡性能够,可以使用rembg库的SD插件版本,有更多功能。 https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg ## 5. 打包方法 https://blog.csdn.net/m0_74259636/article/details/135487933 1 创建虚拟环境matting pip install -r requirements.txt pip install pyinstaller 2 在conda下,使用matting虚拟节点, pyi-makespec --collect-data=gradio_client --collect-data=gradio main.py 3 在main.spec中添加 module_collection_mode={ 'gradio': 'py',} 4 删除build目录 构建 pyinstaller main.spec 5 在dist/main下 建立.u2net/目录 目录内放入 u2net.onnx