Junelin2333 / LanGuideMedSeg-MICCAI2023

Pytorch code of MICCAI 2023 Paper-Ariadne’s Thread : Using Text Prompts to Improve Segmentation of Infected Areas from Chest X-ray images
GNU General Public License v3.0
32 stars 1 forks source link

Train our own dataset #4

Closed Miraclerice closed 1 year ago

Miraclerice commented 1 year ago

If I want to train my own dataset, but the input is an RGB image, where do I need to modify it so that the number of channels corresponds?If you have a solution for this, I would appreciate it! @Junelin2333

Junelin2333 commented 1 year ago

Sry I forgot to reply in time. If you want to train on RGB image, you don't even need to change any code. My code is running on images in 3 channels.

See utils/model.py/LanGuideMedSeg/forward:

        if image.shape[1] == 1:   
            image = repeat(image,'b 1 h w -> b c h w',c=3)