![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
json
狗庄欺人太甚
目前方向为文本处理,之前有过两年的目标检测实习经历
展开
-
从p_json中获得register和index序号的关系
def register2index(p_path): """从p_json中获得register和index的关系,方便后续用index直接修改p_data""" jsondata = json.load(open(p_path, 'r')) # 读取json文件jsonlist为列表 jsonlist = jsondata['images'] p_register_to_index = {} for index, sample in enumerate(jso.原创 2021-05-21 20:48:46 · 220 阅读 · 0 评论 -
删除request_images对应的n_sample中的sample 增加register_images对应的与register_images对应的n_sample中的request_images
import json import os.path as osp import logging #业务需求:result.txt为两列信息n_sample中的request_images和p_sample中的register_images #删除request_images对应的n_sample中的sample #增加register_images对应的与register_images对应的n_sample中的request_images #很多request_images对应一个sample #感谢天.原创 2021-05-19 16:01:53 · 196 阅读 · 0 评论 -
解析json文件,生成指定数据
#解析resultjson_path文件 import os, sys, shutil, json import os.path as osp from builtins import FileNotFoundError import logging from csv import DictReader resultjson_path='/data/benchmark/jingqu_30wan_1002/bm_files/remove100/n-search-result.json' outf.原创 2021-05-11 16:33:25 · 218 阅读 · 0 评论