OFA-Sys / Chinese-CLIP

Chinese version of CLIP which achieves Chinese cross-modal retrieval and representation generation.
MIT License
4.32k stars 448 forks source link

convert rn50x16 #226

Open susht3 opened 10 months ago

susht3 commented 10 months ago

i get the error: Got: 384 Expected: 224

susht3 commented 10 months ago

RN50 on this code set image_size as 224, but my resnet is 384,how to convert to 384,

when i change : "RN50": { "struct": "RN50@RBT3-chinese", "input_resolution": 224 }, 224 to 384, i get model error

DtYXs commented 5 months ago

Hello, RN50 is pretrained at 224 input resolution, and you may need to resize the input image to 224. If you want to train with your custom ResNet, you may need to add the model's config file in the cn_clip/clip/model_configs directory, and then replace the original RN50 for training.