Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can l finetune this model directly on my MRI dataset ? #43

Open
yellowblue6 opened this issue Dec 21, 2024 · 7 comments
Open

can l finetune this model directly on my MRI dataset ? #43

yellowblue6 opened this issue Dec 21, 2024 · 7 comments

Comments

@yellowblue6
Copy link

can l finetune this model directly on my MRI dataset ? because my dataset is so small ,can you give some advice?
thanks

@baifanxxx
Copy link
Collaborator

Thank you for your question. Yes, you can fine-tune the model directly on your MRI dataset. However, if your dataset is small, prolonged fine-tuning may lead to overfitting, where the model becomes too specialized on the MRI data. While the performance on the MRI test set could still be good, the model's performance on other tasks (like CT scans) might suffer significantly or even fail, depending on what you expect the model to achieve.

@yellowblue6
Copy link
Author

Thank you for your question. Yes, you can fine-tune the model directly on your MRI dataset. However, if your dataset is small, prolonged fine-tuning may lead to overfitting, where the model becomes too specialized on the MRI data. While the performance on the MRI test set could still be good, the model's performance on other tasks (like CT scans) might suffer significantly or even fail, depending on what you expect the model to achieve.

thank you for your reply
I just want to train a model for breast cancer MRI. However, I only have data of about 1,500 patients. My idea is to use multiple MRI training images to train the image encoder first, and then fine-tune the model with the breast cancer data. Or simply use the breast cancer MRI data to fine-tune the model. Could you give me some suggestions?

@baifanxxx
Copy link
Collaborator

I think you can fine-tune on MRI data directly based on our trained model, there is no need to train the visual encoder first.

@yellowblue6
Copy link
Author

I think you can fine-tune on MRI data directly based on our trained model, there is no need to train the visual encoder first.
Can I directly use the script you provided to fine tune Lora?

@baifanxxx
Copy link
Collaborator

Sure, please make sure your visual encoder and mm_projector are also trainable.

@yellowblue6
Copy link
Author

Sure, please make sure your visual encoder and mm_projector are also trainable.
sorry ,I am a beginner .How can I train a visual encoder and mm_projector on my small dataset? Fine tune M3D-clip? and How should I train this mm_projector? l have no idea. could you give me some advice?

@baifanxxx
Copy link
Collaborator

You don't need to fine-tune M3D-CLIP, you can fine-tune the entire model directly. Under lora fine-tuning, the visual encoder and mm_projector are trained by default, here. I think you can directly fine-tue your model following here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants