frankkramer-lab / aucmedi

a framework for Automated Classification of Medical Images
https://frankkramer-lab.github.io/aucmedi/
GNU General Public License v3.0
38 stars 12 forks source link

Regression? #215

Closed krekiehn closed 7 months ago

krekiehn commented 7 months ago

Hi!

Is Image-Regression some how supported?

So Image to continues number.

Greetings Krekiehn

muellerdo commented 7 months ago

Heyho @krekiehn,

thank you for your interest in using AUCMEDI!

We are currently exploring this in a project about predicting glioblastoma patient survival based on brain MRI scans measured as the number of days of survival after treatment (int).

Theoretically what we are aimed right now are the following simple modifications:

1) Loading the labels/outcome manually with pandas and converting the y variable (labels) to a NumPy array. 2) Setting the n_labels=1, activation_output="linear", and the loss="mean_squared_error" in the NeuralNetwork class.

Be aware that the sampling and evaluation functions provided will not work as they are intended for classification purposes. To overcome this issue for stratified sampling our data and obtaining class weights, we clustered our outcome numbers.

You can also try out any of the following loss functions: https://keras.io/api/losses/regression_losses/

If you have further questions or want to exchange ideas/approaches, we are always open to collaborations! Furthermore, you can contact me on email if you are interested on our exact approach/updates if we encounter issues & solutions.

Hope I was able to help!

Best Regards, Dominik

krekiehn commented 7 months ago

Hi Dominik, thanks for your fast and detailed answer!

The technical workflow you suggested is also my first option.

Thanks for the advice on how to select the settings, the possible losses and the warning regarding evaluation. If you implement methods for sampling and evaluation, I would be very interested.

And thank you for the offer to exchange ideas. I will gladly take you up on that!

For our image regression problem, I'm looking for frameworks that do as much work for us as possible :)

Apart from your framework, I have found AutoKeras and Image Classification Framework from DKFZ. Perhaps they are also of interest to you.

Greetings Nicolai