NKI-AI / ahcore

Ahcore is the AI for Oncology core computational pathology toolkit
Apache License 2.0
15 stars 1 forks source link

PreTransform and Metric Factories #24

Open EricMarcus-ai opened 9 months ago

EricMarcus-ai commented 9 months ago

Is your feature request related to a problem? Please describe. A clear modularity in the code is advantageous for user flexibility. Currently, we have factory structures implemented for augmentations and losses. The user can prescribe the precise augmentations and/or losses in the YAMLs, and the code automatically takes care of instantiating them. The PreTransform and Metric factories currently have hardcoded metrics dependent on a class method. This makes adding or changing the used pre-transforms and metrics a hassle, as it would involve changing the hardcoded options instead of configs.

Describe the solution you'd like Similar factory structures for the pretransforms and metrics as those which are implemented for augmentations and losses.