Chen Pengguang
Chen Pengguang
Of course, you can use it in compose, just use Grid instead of GridMask in grid.py
The codes for ImageNet classification are mainly in : - https://github.com/Jia-Research-Lab/GridMask/blob/master/imagenet_grid/utils/grid.py - https://github.com/Jia-Research-Lab/GridMask/blob/master/imagenet_grid/imagenet_amp.py#L134-L136 - https://github.com/Jia-Research-Lab/GridMask/blob/master/imagenet_grid/imagenet_amp.py#L282-L283 - https://github.com/Jia-Research-Lab/GridMask/blob/master/imagenet_grid/imagenet_amp.py#L387-L388 The codes for COCO detection are mainly in : - https://github.com/Jia-Research-Lab/GridMask/blob/master/detection_grid/maskrcnn_benchmark/data/transforms/grid.py - https://github.com/Jia-Research-Lab/GridMask/blob/master/detection_grid/train_net.py#L69-L71...
1. p 是对图片实行GridMask的概率,就是一张图片有p的概率实行GridMask,1-p的概率保持不变。你的理解应该是正确的。 2. 训练样本的数量是保持不变的,这个是为了对比更加公平,根据p来增加图片或许会有更好的结果。
我们是用你说的第二种实现的,具体代码里有体现https://github.com/Jia-Research-Lab/GridMask/blob/master/detection_grid/maskrcnn_benchmark/data/transforms/grid.py#L22-L23
在语义分割中,我们做实验的时候是只mask了image,没有mask label。我个人的考虑是,mask一部分image但是不mask label的话可以使得网络尝试通过周围的信息去补全被mask掉的信息,从而达到正则化的效果。如果把label也mask掉的话效果可能会有不一样的效果。
I think you only need to change the dataloader and augmentation to CIFAR-10 and change the num_classes=10. And check if you can load the pretrained weights correctly.
You should, 1. use main.py to get the checkpoint; 2. use main_lincls.py to load the checkpoint as pretrained weights (not resume training). The results of CIFAR-10 in the paper are...
In "linear", we load the pretrained weights and fix the backbone, then only train a classifier. In "fine-tune" we load the pretrained weights as initialization and train the whole model...
It takes about 5 days with 4 2080ti.
Actually, I didn't try to run on a single GPU. In my opinion, the most important part you need to change lies in [jigclu.py](https://github.com/dvlab-research/JigsawClustering/blob/master/JigClu/jigclu.py). This file contains gather multi-GPU results...