mAP&AP算法 https://www.zhihu.com/question/53405779
1.代码来自于https://github.com/matterport/Mask_RCNN
训练自己的数据参考博客https://blog.csdn.net/qq_29462849/article/details/81037343#commentBox
批量重命名文件,注意,如果文件本身就是json格式,需要先转化为png,再变为json,因为这是处于一个for 循环中,所以之前的又被重复使用了
i=1; for x in *; do mv $x $i.json; let i=i+1; done
这里说明一下用labelme制作的数据集出现的问题
因为labelme升级以后,用命令行labelme_json_to_dataset+空格+文件名称.json就产生不了能用的图片
因此,对于labelme_json里面的文件,应该用如下py文件生成
import argparse
import json
import os
import os.path as osp
import warnings
import PIL.Image
import yaml
from labelme import utils
def main():
warnings.warn("This script is aimed to demonstrate how to convert the\n"
"JSON file to a single image dataset, and not to handle\n"
"multiple JSON files to generate a real-use dataset.")
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
parser.add_argument('-o', '