Allow non-image type label in subject
See original GitHub issueIs your feature request related to a problem? Please describe. I am planning on building a classification network, where the network needs to classify multimodality images of tumor into either benign or malignant. For each tumor I have 3 images e.g. T1, T2 and DWI and each tumor has 1 binary label associated to it e.g. [0,1].
At this moment it is only possible to add a ‘label’ of the Class “Image” to a subject. Which in my case does not make sense as this is not a segmentation but a classification task.
Describe the solution you’d like Allow the Subject class to also accept a new Label class, which can contain a string, int, list or something like that.
OR
Another easy to implement option would be to allow setting an optional label attribute to the class in the init. Something in the sense of:
def __init__(self, *images: Image, name: str = '', label: TypeLabel):
self._parse_images(images)
super().__init__(images)
self.name = name
self.label = label
With TypeLabel = Union[str, int, float]
or something similar to that.
Describe alternatives you’ve considered I have considered creating my own labellist, but it makes more sense to integrate the label into an instance of Subject.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Will submit a PR in a moment 😉
Could you please submit a PR for this?