Open RealSuSeven opened 10 months ago
您可以在/script这个folder下面找到分别的train_large.sh以及train_small.sh。数据集可以follow我们开源在我们主页Dataset中的格式。
请问是这里的数据格式吗? https://huggingface.co/datasets/DefectSpectrum/Defect_Spectrum 好像不太对啊,代码里面需要的是这样的 self.image_paths = sorted(get_first_five_images(dir+'/test', num_images)) print("image paths ", self.image_paths) self.mask_paths = sorted(get_first_five_images(dir+'/converted_ground_truth', num_images))
请问这个“/converted_ground_truth”下的mask具体是什么什么格式,如何从0或255的mask转换得来
请问这个“/converted_ground_truth”下的mask具体是什么什么格式,如何从0或255的mask转换得来
您好,“/converted_ground_truth”内的mask是由[0, num_of_defects]组成,举个例子:如果一个胶囊有三个不同种类的defects,对应的mask我们用三种不同的颜色来表征,比方说用红色表示crack,用蓝色表示squeeze,用绿色表示poke,对于converted_ground_truth来说,您可以把这三种不同种类的defects用[1,2,3]来表示,对于background可以用0,也可以用-1。因为converted_ground_truth都被转成了defect的index,所以visualize的时候您需要用同样的算法将其inverse到rgb domain。
我好像没有读明白项目的start,没有找到什么sh脚本呀,这个项目到底该如何运行?数据集该怎么准备?