yolov8如何设置保存predict的视频,图片等结果?
就是这种带标签的视频
save=True
不知道你这个问题是否已经解决, 如果还没有解决的话: #Config
plots = not evolve # create plots(创建图) evolve-----evolve hyperparameters for x generations
#为x个generations进化超参数
cuda = device.type != 'cpu'
init_seeds(1 + RANK) #这里RANK到底是什么东西
with torch_distributed_zero_first(LOCAL_RANK): # 这也看不懂
data_dict = data_dict or check_dataset(data) # check if None
train_path, val_path = data_dict['train'], data_dict['val']
nc = 1 if single_cls else int(data_dict['nc']) # number of classes
names = ['item'] if single_cls and len(data_dict['names']) != 1 else data_dict['names'] # class names
assert len(names) == nc, f'{len(names)} names found for nc={nc} dataset in {data}' # check
is_coco =data.endswith('coco.yaml') and nc == 80 #COCO dataset
这一段是先设置了随机种子,然后记载data.yaml数据,读进来训练图像和测试图像的地址。在数据处理部分已经说过了,标签的地址是根据图像的地址替换掉‘imges’为'labels'得到的。所以这里只需要度图像地址就可以了。
这面这个就是data.yaml中的数据。