Comments (3)
Hi @ngctnnnn ,
Thanks for your interest.
- How do you run the experiments? I just tested the model and re-computed the metrics and confirmed that the reported DSC is right. The segmentation results and trained model have been available on the readme page.
- We didn't have specific configurations for DRIVE dataset. All the trained datasets are merged together for training and you can find the training data on the readme page as well.
from medsam.
please correct me if i'm wrong, when I use this code on test 20 images for 20 batches (1 image per batch), my output dice score is 3.5 instead of less than 1. Does this problem occur to you also or just me. Thanks
sam_model = sam_model.to("cuda:3")
mask_segmentation, iou_predictions = sam_model.mask_decoder(
image_embeddings=image_embedding.to("cuda:3"), # (B, 256, 64, 64)
image_pe=sam_model.prompt_encoder.get_dense_pe(), # (1, 256, 64, 64)
sparse_prompt_embeddings=sparse_embeddings, # (B, 2, 256)
dense_prompt_embeddings=dense_embeddings, # (B, 256, 64, 64)
multimask_output=False,
)
medsam_seg_prob = torch.sigmoid(mask_segmentation)
# convert soft mask to hard mask
medsam_seg_prob = medsam_seg_prob.cpu().numpy().squeeze()
medsam_seg = (medsam_seg_prob > 0.5).astype(np.uint8)
all_masks_segmentation.append(medsam_seg)
all_gt2d.append(gt2D)
all_masks_segmentation = np.stack(all_masks_segmentation, axis = 0)
all_gt2d = np.stack(all_gt2d, axis =0)
dice_score = compute_dice_coefficient(all_gt2d>0, all_masks_segmentation>0)
from medsam.
Hi @ngctnnnn ,
The testing images and code are also available on the read me page. I didn't have this issue.
from medsam.
Related Issues (20)
- point prompt inference HOT 2
- why image data must be normalized to [0, 1], 1]"? HOT 1
- The training process of LiteMedSAM HOT 1
- About the bounding box HOT 3
- Prompt method HOT 1
- About GUI segment in WSI patches HOT 1
- 2d custom dataset supported? HOT 1
- bbox needed for inference? HOT 2
- labeled areas HOT 1
- Why only randomly select a label as a hint in the ground truth mask? HOT 1
- Is their any possibilities to add SAM2AutomaticMaskGenerator ? HOT 3
- Hi I can't open this dataset link HOT 6
- dataset HOT 1
- question about the iou loss HOT 2
- about point prompt HOT 1
- question about class_name HOT 1
- 关于二维数据集的问题 HOT 1
- MedSAM2 datasplit and inference HOT 5
- About image size HOT 1
- 关于多标签掩码的处理 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medsam.