我使用像素库包来运行机器学习,当我运行我的程序时,有一个过程可以创建名为train.json的coco。但是一个带有train.json的文件夹是错误创建的,在这个文件夹中有一个文件dataset.json,这是我需要的文件。进程有问题,我在像素库中找到了生成coco数据集的命令:
def load_dataset(self, dataset):
labelme_folder1 = os.path.abspath(os.path.join(dataset, "train"))
#dir where the converted json files will be saved
save_json_path1 = os.path.abspath(os.path.join(dataset,"train.json"))
#conversion of individual labelme json files into a single json file
labelme2coco.convert(labelme_folder1, save_json_path1)
# Training dataset.
self.dataset_train = Data()
self.dataset_train.load_data(save_json_path1, labelme_folder1)
self.dataset_train.prepare()上面的代码有什么问题吗?我以前用过这个程序,它正常工作。我试着联系这个程序的开发人员,但没有结果。
发布于 2022-02-18 19:01:40
新版本不起作用。我用了一个旧版本,现在起作用了。
!pip3 uninstall tensorflow
!pip3 install tensorflow==2.4.1
!pip3 install tensorflow--gpu
!pip3 install imgaug
!pip install pixellib==0.5.2
!pip install labelme2coco==0.1.2https://stackoverflow.com/questions/71175202
复制相似问题