摘要: import os root_dir = r'pycococreatortools' # os.path.join(root_dir, str):将root_dir,str部分合成一个整体 print("执行结果:", os.path.join(root_dir, '_os_path_')) fil 阅读全文
posted @ 2020-04-14 15:38 DuanYongchun 阅读(429) 评论(0) 推荐(1) 编辑
摘要: 源码: #!/usr/bin/python # -*- coding:utf8 -*- import os import random def mod_file_name(root_dir): files = os.listdir(root_dir) # 获取当前目录的所有文件及文件夹 for fi 阅读全文
posted @ 2020-04-14 15:19 DuanYongchun 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 您可能会想,“如果它如此容易理解,为什么不只使用png二进制掩码格式。” 请记住,我们尝试制作COCO数据集的原因不是因为它是表示带注释的图像的最佳方式,而是因为其他所有人都在使用它。 前期准备: 安装pycocotools:Windows下安装- pip install git+https://g 阅读全文
posted @ 2020-04-14 13:01 DuanYongchun 阅读(916) 评论(0) 推荐(0) 编辑