FengheTan9 / Multi-Level-Global-Context-Cross-Consistency

Official Pytorch Code base for "Multi-Level Global Context Cross Consistency Model for Semi-Supervised Ultrasound Image Segmentation with Diffusion Model"
MIT License
33 stars 1 forks source link

data #7

Open Ystartff opened 1 year ago

Ystartff commented 1 year ago

Hi, I would like to know how your dataset is stored, I read your two papers and found that the dataset storage format is from the last CMU, I would like to know how you store the unlabeled images generated by diffusion modeling into the dataset and for semi-supervised training dataset how it should be stored.

FengheTan9 commented 1 year ago

Thanks for using our code. Well, put the unlabeled generated image and the labeled image in same file (e.g. ./images). And use trainfile and labeled slice control label batch and unlabeled batch. total_slices = len(db_train) labeled_idxs = list(range(0, int(labeled_slice * total_slices))) unlabeled_idxs = list(range(int(labeled_slice * total_slices), total_slices))

Ystartff commented 1 year ago

Hello, sorry to bother you again, can you send me the picture generation module project code, I would appreciate it if you could send it to me, my email address is 20222008110539@stu.usc.edu.cn

FengheTan9 commented 1 year ago

Please refer medFusion for easy medical image generation with LDM.

Ystartff commented 1 year ago

Thank you for taking the time out of your busy schedule to answer my question. I have another question. Can you provide the segmentation mask code generated by the model prediction?

FengheTan9 commented 1 year ago

Fine, you can follow : mask = output.cpu().detach().numpy()[0][0] * 255 cv2.imencode('.jpg', mask)[1].tofile("[your_prediction_save_dir]"))