diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8b48a2..33f105e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Helm: Empty password for Redis () +- Fixed HRNet serverless function runtime error on images with alpha channel () - Preview & chunk cache settings are ignored () ### Security diff --git a/serverless/pytorch/saic-vul/hrnet/nuclio/main.py b/serverless/pytorch/saic-vul/hrnet/nuclio/main.py index 3ac93ae5..2968ccf7 100644 --- a/serverless/pytorch/saic-vul/hrnet/nuclio/main.py +++ b/serverless/pytorch/saic-vul/hrnet/nuclio/main.py @@ -24,7 +24,7 @@ def handler(context, event): neg_points = data["neg_points"] threshold = data.get("threshold", 0.5) buf = io.BytesIO(base64.b64decode(data["image"])) - image = Image.open(buf) + image = Image.open(buf).convert('RGB') mask, polygon = context.user_data.model.handle(image, pos_points, neg_points, threshold)