CVIU-CSU / M2MRF-Lesion-Segmentation

M2MRF: Automated Lesion Segmentation in Fundus Images with Many-to-Many Reassembly of Features
MIT License
27 stars 9 forks source link

How to train a multi-task model based on your code? #3

Closed o0t1ng0o closed 2 years ago

o0t1ng0o commented 2 years ago

Hi, @haotianliu001 May I ask how to train a multi-task model based on your code?

haotianll commented 2 years ago

Hi, does "multi-task" mean multiple segmentation tasks? If so, I think it's fessible, but you need to modify the code.

This code follows the stardard structure of MMSegmentation. I think you need to determain a suitable label encoding format and write code to load it. It's also necessary to rewrite the loss computation procedure based on this, the testing pipeline here, and the evaluation function here.

o0t1ng0o commented 2 years ago

Thank you for your prompt reply.

My multi-task model may include a segmentation task and a classification task. So I may need to modify the dataset part and add new modules for this. It seems that it is a little bit complicated to modify on your code that is based on mmcv. Could you recommend a multi-lesion segmentation repository that does not based on mmcv?

haotianll commented 2 years ago

It's true. The mmcv framework is a bit complicated to use.

Coincidencely, for the multi-lesion segmentation task, I also have a simpler implementation here, which is based on HRNet-Semantic-Segmentation. This repository is unofficial, but you may try it. And I think it's not hard to add a new classification branch in it.

Besides, you can also find many popular segmentation networks in segmentation_models.pytorch.

o0t1ng0o commented 2 years ago

Thank you very much!!! Your repository is very useful! May I ask can it reach the on-par performance of HRNet that is reported in your paper?

haotianll commented 2 years ago

You are welcome! Yes. They can almost achieve the equal performance.

o0t1ng0o commented 2 years ago

That is goooooood! 😄

haotianll commented 2 years ago

👌