1.新增是否推理获取特征判断

2.取消搭配不足异常逻辑
This commit is contained in:
zhouchengrong
2024-04-05 17:45:25 +08:00
parent 010d1536eb
commit 726eee86ab
7 changed files with 332 additions and 110 deletions

View File

@@ -86,8 +86,8 @@ class FashionDataset(object):
outerwear = random.choice(self.cate2item['outerwear'])
outfit.append(outerwear)
outfit_list.append(tuple(outfit))
if len(outfit_list) < topk:
raise ValueError(f"Cannot generate more than {topk} outfits!")
# if len(outfit_list) < topk:
# raise ValueError(f"Cannot generate more than {topk} outfits!")
return outfit_list
elif given_cate == 'outerwear':
@@ -112,8 +112,8 @@ class FashionDataset(object):
outfit = [query_item] + list(top_bottom)
outfit_list.append(tuple(outfit))
if len(outfit_list) < topk:
raise ValueError(f"Cannot generate more than {topk} outfits!")
# if len(outfit_list) < topk:
# raise ValueError(f"Cannot generate more than {topk} outfits!")
return outfit_list
elif given_cate == 'all-body':