Project-MONAI / Project-MONAI/MONAILabel
Consistent label specification in App interface
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 891
- Forks
- 269
- Avg merge
- 15h 41m
- Merged PRs (30d)
- 1
Description
Currently the field "labels" in the rest interface are not populated consistently. Some just provide a list with label names (e.g. deepgrow_2d), some use a dict (key is the label name, value is the pixel value). This makes it unnecessarily hard to complicate to parse and interpret.
{
"name": "MONAILabel - Radiology (0.8.5)",
"version": "0.8.5",
"labels": [
"background",
"spleen",
"right kidney",
"left kidney„, …
]
"deepgrow_2d": {
"type": "deepgrow",
"labels": [
"spleen",
"right kidney",
"left kidney",
"liver",
"stomach",
"aorta",
"inferior vena cava"
],
"dimension": 2,
}
"segmentation_spleen": {
"type": "segmentation",
"labels": {
"spleen": 1
},
"dimension": 3,
"description": "A pre-trained model“
}
One should specify one form for the content of the labels field and ensure that all models the support the new version of the API adhere to that.
Additionally, the relevance of the labels field outside models is unclear. Perhaps, this entry can be used to describe all labels the model can generate and their semantics/naming for host app. Models can then simply refer to label ids of their respective labels specification when the return results. That could also directly factor in the semantics work of #1868.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the App REST interface and the model responses shown in the issue, comparing the list and dictionary forms of the labels field. Resolve the intended single representation and how labels should be referenced or described across models. Done means the API convention is defined and all models supporting the new API version follow it.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100