Kaggle Competition: Determine if two products are the same by their images
try image retrieval model. -> notebook timeout, Notebook Exceeded Allowed Compute
kaggle notebook 샘플 + 학습된 model (effib4 with class num: 11014)
기존 대회 데이터로 pretrained model 획득.
ArcFace 적용 - 테스트 진행 중.
find other model through paper
lessoned learn
왜 infer 할때 마다 embedding 값이 다른가에 대한 이유 -> 잘못 사용한 TTA : 올바른 TTA 사용법. with torch.no_grad(): for img,label in tqdm(image_loader): img = img.cuda() label = label.cuda() batch_size = img.shape[0]
# TTA 5
TTA = [img, img.flip(-1), img.flip(-2),
img.transpose(-1,-2), img.transpose(-1,-2).flip(-1)]
img = torch.stack(TTA, 0)
img = img.view(-1, 3, CFG.img_size, CFG.img_size)
feat = model(img,label)
feat = feat.view(len(TTA), batch_size, -1).mean(0)
image_embeddings = feat.detach().cpu().numpy()
embeds.append(image_embeddings)
51 commits
Python
99.9%
Kaggle Competition: Determine if two products are the same by their images
try image retrieval model. -> notebook timeout, Notebook Exceeded Allowed Compute
kaggle notebook 샘플 + 학습된 model (effib4 with class num: 11014)
기존 대회 데이터로 pretrained model 획득.
ArcFace 적용 - 테스트 진행 중.
find other model through paper
lessoned learn
왜 infer 할때 마다 embedding 값이 다른가에 대한 이유 -> 잘못 사용한 TTA : 올바른 TTA 사용법. with torch.no_grad(): for img,label in tqdm(image_loader): img = img.cuda() label = label.cuda() batch_size = img.shape[0]
# TTA 5
TTA = [img, img.flip(-1), img.flip(-2),
img.transpose(-1,-2), img.transpose(-1,-2).flip(-1)]
img = torch.stack(TTA, 0)
img = img.view(-1, 3, CFG.img_size, CFG.img_size)
feat = model(img,label)
feat = feat.view(len(TTA), batch_size, -1).mean(0)
image_embeddings = feat.detach().cpu().numpy()
embeds.append(image_embeddings)
51 commits
Python
99.9%