sotiraslab / AgileFormer

This the repo for the paper tiltled "AgileFormer: Spatially Agile Transformer UNet for Medical Image Segmentation"
https://arxiv.org/abs/2404.00122
Apache License 2.0
63 stars 9 forks source link

Inquiry on Training AgileFormer with Custom Dataset #12

Closed rohollah97 closed 3 months ago

rohollah97 commented 4 months ago

Hello,

I am interested in training AgileFormer on my own dataset of Cardiac Catheterization images. I have a dataset consisting of 1717 images and corresponding masks, all in PNG format and with a resolution of 512x512. I plan to resize the images to 224x224 to fit the model's requirements.

Could you please confirm if it is possible to train AgileFormer on this specific dataset? If so, could you provide guidance on which files need to be edited and how to do so?

peijie-chiu commented 4 months ago

@rohollah97 Thank you for being interested in our work. If you have resized the input images into 224x224, I do not see any obstacle to training AgileFormer on your own dataset. The only thing that comes to my mind is the dataloading. If you want keep using the dataloader for ACDC/Synapse, you have to structure your dataset as ACDC/Synapse. If you have your own dataloader, I think you can directly switch to your own one. If you use your own dataset, you need to change the dataloading process in the "trainer_ACDC/Synapse.py". Alternatively, you can also repurpose the dataloader of ACDC/Synapse for your own dataset. Let me know if this answers your questions, or anything that I can help.