1.self.img_ids = [i_id.strip() for i_id in open(list_path)]
在图像分割训练中,在list_path对应文件中读取图片的id.
下面是存储图片id的txt文件
for i_id in open(list_path)将id读取出来,如下图
2 strip() 函数
strip() 方法用于移除字符串头尾指定的字符(默认为空格或换行符)或字符序列。
在图像分割训练中,在list_path对应文件中读取图片的id.
下面是存储图片id的txt文件
for i_id in open(list_path)将id读取出来,如下图
strip() 方法用于移除字符串头尾指定的字符(默认为空格或换行符)或字符序列。