You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------------------ 原始邮件 ------------------
发件人: "Haochen-Wang409/U2PL" ***@***.***>;
发送时间: 2024年11月28日(星期四) 上午9:18
***@***.***>;
抄送: "「 ***@***.******@***.***>;
主题: Re: [Haochen-Wang409/U2PL] 为什么显示无标签的数据集仍要读取标签 (Issue #174)
我也遇到了这个问题,看了一下代码,似乎是因为数据增强是统一对原图和标签进行的,为了方便,无标签数据也复用了这套流程。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
dset = city_dset(cfg["data_root"], cfg["data_list"], trs_form, seed, n_sup, split)
dset_unsup = city_dset(
cfg["data_root"], data_list_unsup, trs_form_unsup, seed, n_sup, split
)
这两个都是使用的city_dset获取数据信息,而city_dset下面的类中似乎没有对有标签的和无标签的进行区分。
class city_dset(BaseDataset):
def init(self, data_root, data_list, trs_form, seed, n_sup, split="val"):
super(city_dset, self).init(data_list)
self.data_root = data_root
self.transform = trs_form
random.seed(seed)
if len(self.list_sample) >= n_sup and split == "train":
self.list_sample_new = random.sample(self.list_sample, n_sup)
elif len(self.list_sample) < n_sup and split == "train":
num_repeat = math.ceil(n_sup / len(self.list_sample))
self.list_sample = self.list_sample * num_repeat
The text was updated successfully, but these errors were encountered: