Kalrfou / GCtx-UNet

MIT License
20 stars 1 forks source link

Modify image_size=512 #1

Open Chenjingsuo opened 2 weeks ago

Chenjingsuo commented 2 weeks ago

Hi, I want to change the size of the input photo to 512*512, with or without weights and how to change the parameters.

Kalrfou commented 6 days ago

Hi,

I apologize for the delay in responding to your request.

To change the input image size to 512x512, follow these steps:

1) In the config.py file, update the following parameters: _C.DATA.IMG_SIZE = 512 _C.MODEL.PRETRAIN_CKPT = './pretrained_ckpt/gcvit_21k_large_512.pth.tar'

Drop path rate

_C.MODEL.DROP_PATH_RATE = 0.1

_C.MODEL.GCVIT.EMBED_DIM = 192 _C.MODEL.GCVIT.LAYER_SCALE = 1e-5 _C.MODEL.GCVIT.NUM_HEADS = [6, 12, 24, 48] _C.MODEL.GCVIT.WINDOW_SIZE = [16, 16, 32, 16] _C.MODEL.GCVIT.MLP_RATIO = 2.

image

2) In the train.py file, modify the following line to set the image size:

parser.add_argument('--img_size', type=int, default=512, help='input patch size of network input')

Thanks