apple / apple/coremltools

Is there any way to allow alpha channel for CoreML image output?

Open
#344 1 comment 3 reactions 0 assignees View on GitHub
feature request
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

I'd like my CoreML model image output to allow 'RGBA' color space.
But I couldn't find the way how to do it directly, except converting from MLMultiArray to 'RGBA' colorspace image.

I found that ImageFeatureType colorspace doesn't have 'RGBA' value yet.
https://github.com/apple/coremltools/blob/master/coremltools/proto/FeatureTypes_pb2.py#L27

Is there any way to achieve it?
Or could you add the feature to allow 'RGBA' image type output?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ImageFeatureType definition in coremltools/proto/FeatureTypes_pb2.py and the surrounding Core ML image output handling. Determine whether RGBA output can be supported there and identify any validation or conversion paths that constrain image color spaces. Done means CoreML image outputs can represent RGBA without requiring manual MLMultiArray conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.