huawei-noah / noah-research

Noah Research
870 stars 161 forks source link

How to do transfer learning on size 384*384 image based on your 224*224sizeTNT model? #31

Open joshuaWang-bit opened 3 years ago

joshuaWang-bit commented 3 years ago

In your great work about TNT, I see transfer learning on size 384384 image based on 224224 TNT-B model. But I can't find out the method to modify the tnt.py to train TNT-B on 384384 size image with a 224224 checkpoint loaded.

I have tried to modify the conv2d in PixelEmbeded() and change img_size, but both will cause a wrong parameter number.

Thanks for your attention!

错误-直接改参数

iamhankai commented 3 years ago

You should resize patch_pos to match the larger input (384). Refer to https://github.com/whai362/PVT/blob/36e3596ee54f02673e62aba4f1e8df0ccca6973a/detection/pvt.py#L228