Curya
Curya
The latter, we freeze the backbone weights in all experiments.
`att_feats` is transformed images, if you want get raw image, you should check https://github.com/232525/PureT/blob/main/datasets/coco_dataset.py#L18 
代码太久远了,找了一下没找到ablation结果的备份,不过如果想要更高的XE分数,你可以尝试一下Cosine LR Scheduler,据我的经验,应该会比Noam或者普通的warm up+linear要好一些
Maybe you need to check the codes of [main_test.py](https://github.com/232525/PureT/blob/main/main_test.py) and [Dataset](https://github.com/232525/PureT/blob/main/datasets/coco_dataset.py).
The error occurred in the process of computing metrics. If you do not need to validate, you can comment out #L73 of https://github.com/232525/PureT/blob/main/evaluation/evaler.py#L73. Or you have to modify the codes...
The model of __swin_large_patch4_window12_384_22kto1k_no_head.pth__ is come from the official pre-trained SwinTransformer model of __swin_large_patch4_window12_384_22kto1k.pth__. The feature extraction does not need the final classification layer, so we delete the weights of...
Ensemble model. About the code, I did not sort it out, so I cannot give you a complete code. The following is the core code about how to ensemble (get...
简单来说就是预先把图像特征提取出来,对于原本模型,每张输入图像的大小为3\*W\*H。如果预先提取特征,此时每个图像被表示为1\*L\*D(L是特征的数量,D为特征维度),并且此时模型不需要backbone encoder部分,直接将图像特征送入到后续的模块中。这个时候模型训练相当于少了一整个SwinTransformer模型的forward,训练速度会快些。至于怎么提特征,可以参考repo里面的ICC分词预处理.ipynb,里面有相关的代码。提了特征之后需要对模型结构定义的代码和Dataset、DataLoader部分的代码进行修改,模型结构部分就是把SwinTransformer模型的定义部分去掉,数据读取部分的修改可以参考datasets路径下的[coco_dataset_raw.py](https://github.com/232525/PureT/blob/main/datasets/coco_dataset_raw.py)和[data_loader_raw.py](https://github.com/232525/PureT/blob/main/datasets/data_loader_raw.py)。
是的,ICC分词预处理.ipynb是针对另一个数据集写的,你需要提取MSCOCO的特征的话得更换为COCO的json文件,json文件其实只是用来提供数据集里面图像的文件名和图像ID的,构造了dataset拿到文件名读取图像然后去提取特征。你如果用别的办法获取数据集所有图像的存储路径的话,也是可以的,遍历读取图像然后调用特征提取保存。
You need to construct JSON files (for your own datasets) referring to MSCOCO datasets and generate the necessary files for training. I upload a new notebook file "ICC分词预处理.ipynb" for reference,...