537. 1st and Future - Player Contact Detection | nfl-player-contact-detection
首先,我要感谢主办方组织了这次比赛。这是我以前从未解决过的任务,尝试不同的方法既具有教育意义又充满乐趣!

# x: (bs, cnn_features)
x_contact = model_contact(x) # (bs, n_predict_frames)
x_g = model_g(x) # (bs, n_predict_frames)
not_is_g = (is_g == 0)
x = x_contact * not_is_g + x_g * is_g # (bs, n_predict_frames)
# 伪代码
def forward(self, x_sideline_image, x_endzone_image):
x_sideline = cnn(x_sideline_image)
x_endzone = cnn(x_endzone_image)
return fc(torch.cat([x_sideline, x_endzone])), fc_sideline(x_sideline), fc_endzone(x_endzone)
加权集成,G 和 contact 分别进行加权。
bbox_left_ratio = 4.5
bbox_right_ratio = 4.5
bbox_top_ratio = 4.5
bbox_down_ratio = 2.25
for col in ["x", "y", "width", "height"]:
df[col] = df[[f"{col}_1", f"{col