1.安装labelme的过程省略,可参考别人
2.打开anaconda prompt
3.激活安装有labelme的虚拟环境
4.运用labelme命令打开labelme开始标记数据
5.处理json文件
- 首先找到labelme中的json_to_dataset.py文件
2.更改json_to_dataset.py文件,在里面加上批处理的循环
import argparse
import base64
import json
import os
import os.path as osp
import imgviz
import PIL.Image
from labelme.logger import logger
from labelme import utils
def main():
logger.warning(
"This script is aimed to demonstrate how to convert the "
"JSON file to a single image dataset."
)
logger.warning(
"It won't handle multiple JSON files to generate a "
"real-use dataset."
)
parser = argparse.ArgumentParser()
parser.add_argument("json_file")