通道校验 保持三通道

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)