通道校验 保持三通道
This commit is contained in:
@@ -29,6 +29,8 @@ class InferencePipeline(ls.LitAPI):
|
|||||||
'img_path': path
|
'img_path': path
|
||||||
})
|
})
|
||||||
dest_img = oss_get_image(oss_client=minio_client, path=request.input_face, data_type="cv2")
|
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 = [
|
faces_config = [
|
||||||
{
|
{
|
||||||
'origin': None,
|
'origin': None,
|
||||||
@@ -67,4 +69,4 @@ class InferencePipeline(ls.LitAPI):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
api = InferencePipeline()
|
api = InferencePipeline()
|
||||||
server = ls.LitServer(api, accelerator="auto")
|
server = ls.LitServer(api, accelerator="auto")
|
||||||
server.run(port=8000)
|
server.run(port=8111)
|
||||||
|
|||||||
26
pyproject.toml
Normal file
26
pyproject.toml
Normal 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",
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user