apple / apple/coremltools

Multi output support for ClassifierConfig

Open
#1,110 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

## 🌱 Describe your Feature Request
- A clear and concise description of what the problem is.
I have a trained tf.keras model that has two classifier outputs: A CNN with two heads, each trained simultaneously on a different classification target. I would like to be able to pass two lists of labels to the ClassifierConfig, or even better, pass a list of ClassifierConfig objects corresponding to each output.

- CoreML / iOS version you are using?
coremltools version: 4.1
OS: MacOS 10.15.7 Catalina
python version: 3.6.8
Tensorflow version: 2.3.1

- Are you interested in contributing?
I could be convinced.

## Use cases
- Please describe the use cases
We train multi-output CNNs to save space in mobile model deployments where we run multiple predictions on an image. It would be nice to be able to use the ClassifierConfig to include label metadata directly in the model.

## Describe alternatives you've considered
Currently, the only alternative is to bundle metadata separately (e.g. as a JSON file) and parse it in the iOS app.

Contributor guide

Open the contributing guide

Research direction

The request names ClassifierConfig and coremltools 4.1 but no source files or tests. Start by locating ClassifierConfig and the conversion path for multi-output TensorFlow models; done should mean each classifier output can carry its own label metadata in the converted model.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, python, tensorflow
Domain
machine-learning, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.