mazurowski-lab / finetune-SAM

This is an official repo for fine-tuning SAM to customized medical images.
https://arxiv.org/abs/2404.09957
Apache License 2.0
114 stars 17 forks source link

Predict new unseen images without any labels #7

Closed Gnkgo closed 4 months ago

Gnkgo commented 4 months ago

Hi there!

First of all, thanks for posting your code and giving such great instructions. It is easy to follow for a beginner!

Sorry if this question is too obvious, but I am new to the whole machine learning field.

But I don't understand how I can make my predictions on my dataset without labelled images? I trained the model on my images and got the best_checkpoint.pth. But I am not sure how to use this to actually make predictions?

Any answer is appreciated!

Guhanxue commented 4 months ago

Hi, I got your question here. are you saying directly inference the model without doing validation? i have that piece of code and i can share as jupyter notebook.

Gnkgo commented 4 months ago

Yes exactly, this would be much appreciated.

Guhanxue commented 4 months ago

Hi, I just updated two jupyter-notebook demos for making predictions and doing visualization. 1. 3D_predictions_with_vis.ipynb if for making predictions on an nifit image volume and 2. 2D_predictions_with_vis.ipynb is for making predictions on a .png image slice.

Gnkgo commented 4 months ago

Thank you so much!