返回列表

19th place solution

454. G2Net Gravitational Wave Detection | g2net-gravitational-wave-detection

开始: 2021-06-30 结束: 2021-09-29 物理与天文 数据算法赛
第19名方案

第19名方案

作者: anonamename (Grandmaster) 及其队友
比赛: G2Net Gravitational Wave Detection

感谢主办方和Kaggle组织了这次比赛。感谢我所有的队友( @sunakuzira @kzkt0713 @keiichimase @kanbehmw )以及参赛者。我想分享我们方案的摘要。

CQT (常数Q变换)

模型 OOF分数 Private LB
resnet34d 0.8794 0.8797
tf_efficientnet_b2_ap 0.8802 0.8803
tf_efficientnetvv2_b1 0.8800 0.8800
tf_efficientnet_b2_ap 0.8801 0.8800
resnet34 0.8787 0.8786

预处理

  • 标准化: 我们使用整个数据集计算标准化的统计数据。
  • 图像缩放: 276x513 或 207x513。
  • 通道添加: 我们添加了一个通道,包含LIGO波的加法和减法结果。
    waves = np.stack([
        waves[0], waves[1], waves[2], 
        waves[0]+waves[1], 
        waves[0]-waves[1]])

nnAudio.Spectrogram.CQT1992v2

CQT1992v2(sr=2048, fmin=20, fmax=1024, hop_length=8or4, window="flattop")

数据增强

  • 混合波形增强:
    class CustomDataset(Dataset):
        def __init__(self, train, ...):
            self.train = train.reset_index(drop=True).copy()
            self.labels = train["target"].values
            self.train_target0 = train[train["target"] == 0]
        ...
        def __getitem__(self, index):
            y_true = self.labels[index]
            y_true = torch.tensor(y_true).float()
            ...
            if np.random.rand() > 0.5:
                if y_true == 0:
                    sample = self.train.sample()
                else:
                    sample = self.train_target0.sample()
                wave2_path = sample.iloc[0]['file_path']
                waves2 = self.load_img(wave2_path)
    
                waves = waves + waves2
                if sample.iloc[0]['target'] == 1:
                    y_true = torch.tensor(1).float()
  • Albumentations:
    albumentations.ShiftScaleRotate(p=0.5, shift_limit=0.0, scale_limit=0.2or0.3, rotate_limit=0)

1dCNN

模型 OOF分数 Private LB
1dCNN 0.8753 0.8769

使用的1dCNN架构来自公开Kernel。

预处理

  • 标准化: 我们使用整个数据集计算标准化的统计数据。
  • 带通滤波: scipy.signal.butter(6, (35, 800), btype='bandpass', fs=2048)
  • 通道添加: 与CQT方法相同。

数据增强

  • 随机反转