通道校验 保持三通道

This commit is contained in:
zcr
2025-12-23 10:51:20 +08:00
parent caa3abc21d
commit a77362a50a
3 changed files with 3237 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ class InferencePipeline(ls.LitAPI):
'img_path': path
})
dest_img = oss_get_image(oss_client=minio_client, path=request.input_face, data_type="cv2")
if dest_img.shape[2] == 4:
dest_img = cv2.cvtColor(dest_img, cv2.COLOR_RGBA2RGB)
faces_config = [
{
'origin': None,
@@ -67,4 +69,4 @@ class InferencePipeline(ls.LitAPI):
if __name__ == '__main__':
api = InferencePipeline()
server = ls.LitServer(api, accelerator="auto")
server.run(port=8000)
server.run(port=8111)

26
pyproject.toml Normal file
View File

@@ -0,0 +1,26 @@
[project]
name = "lc-neorefacer"
version = "0.1.0"
description = "Add your description here"
requires-python = ">=3.11"
dependencies = [
"ffmpeg-python>=0.2.0",
"gdown>=5.2.0",
"gradio>=6.2.0",
"imageio[ffmpeg]>=2.37.2",
"insightface>=0.7.3",
"litserve>=0.2.16",
"lpips>=0.1.4",
"minio>=7.2.20",
"ngrok>=1.4.0",
"onnx>=1.20.0",
"onnxruntime>=1.23.2",
"opencv-contrib-python>=4.12.0.88",
"pillow>=12.0.0",
"pyfiglet>=1.0.4",
"requests>=2.32.5",
"scikit-image>=0.26.0",
"torch>=2.9.1",
"torchvision>=0.24.1",
"tqdm>=4.67.1",
]

3208
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff