自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 leetcode C++

1.hashtable unordered_map<int, int> hashtable; auto it = hashtable.find(target - nums[i]); if (it != hashtable.end()) { return {it->second, i}; } hashtable[nums[i]] = i;

2021-12-20 23:37:24 464

原创 博弈论拾遗4(不定期更新)

1.There’s two things you need to know about accountants. One is that they’re usually boring, and the other is that they’re often wrong.2.Strategy effect: Other players are going to change their behavior.1.If we know that tomorrow I’m going to win the war

2021-09-20 07:32:30 86

原创 博弈论拾遗3(不定期更新)

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

2021-09-19 20:58:06 119

原创 自用处理文件的python代码

import osfrom shutil import copyfilefrom pathlib ipmort Pathif __name__== '__main__': i = 1 path = R'C:\Users\hgp\Desktop\outputsB\122\nm-02\090' name = '122-nm-02-090-' for image_path in Path(R'C:\Users\hgp\Desktop\outputsB\122\nm-02\3').rglob("**

2021-07-14 16:20:50 74

原创 launch.json

{ "name":"test", "type":"python", "request":"launch", "program":"${workspaceFolder}/applications/test.py", "console":"integratedTerminal", "args": [ "--config", "configs/config.py" ], "env":{

2021-07-09 15:55:56 501

原创 利用Mask-RCNN分割出步态数据

from typing import Listimport osos.eniron["KMP_DUPLICATE_LIB_OK"]="TRUE"import cv2import numpy as npimport torchimport torchvisionfrom torchvision import transformsimport matplotlib.pyplot as pltimport cocoimport model as modellibimport visuali

2021-07-09 15:45:38 192

原创 rank1精度计算方式

def evaluation(data,config): dataset = config['dataset'].split('-')[0] feature, view, seq_type, label = data label = np.array(label) view_list = list(set(view)) view_list.sort() view_num = len(view_list) sample_num = len(feature) probe_seq_dict =

2021-07-09 15:10:41 740 1

原创 步态识别GaitSet预处理代码简化(去除多线程在windows系统下运行)

import osfrom scipy import misc as sciscimport cv2import numpy as npfrom warnings import warnfrom time import sleepimport argparsefrom pathlib import Pathfrom multiprocessing import Poolfrom multiprocessing import TimeoutError as MP_TimeoutError

2021-07-05 16:14:23 1019 2

原创 python检查行人轨迹是否为下蹲动作的简化函数

def check_isdown(cfg, trajectory) isdown = False rect = trajectory["rect"][0] h1max = 0 h2max = 0 value = 2 s1 = 0 s2 = 0 for i in range(1, len(trajectory["rects"])): rect = trajectory["rects"][i] if rect[3] < 0.5 and rect[3] > h1max:

2021-06-28 15:32:48 139

原创 python onnx模型测试2(在图像中做出bounding boxs并按要求格式输出bounding boxs和scores)

github上面scrfd模型修改其中部分代码输出1中要求的json文件,与1中模型差别在于模型输出的bounding boxs未作规划if__name__ == '__main__': data = [] wname = 'data.json' detector = SCRFD(model_file = R'') detector.prepare(-1) for image_path in Path(R'') data1 = {} data1["image_path"] = str(i

2021-06-28 15:24:39 255

原创 python onnx模型测试1(在图像中做出bounding boxs并按要求格式输出bounding boxs和scores)

数据格式为:[{“image_path”:“results”: [[],[],]},{…},…]if__name__ == '__main__' data = [] data1 = dict() detector = FaceDetectInPedestrian(R'') for root,dirs,files in os.walk(R''): for file in files: data1 = {} file_name = os.path.join

2021-06-28 14:29:50 285

原创 python曲线画法(PR曲线为例)

import numpy as npimport matplotlib.pyplot as plta = []b = []x = np.array(a)y = np.array(b)f1 = np.polyfit(x,y,3)p1 = np.poly1d(f1)yvals = p1(x)plot1 = plt.plot(x,y, 's')plot2 = plt.plot(x,yvals, 'r')plt.xlabel(‘R’)plt.ylabel('P')plt.legend(l

2021-06-28 14:06:49 1713

原创 PR求法(包含IOU求法)

import numpy as npimport os import os.path as ospimport jsondef get_josn_by_filename(josn_file_path): with open(json_file_path) as f: json_data = json.load(f) f1 = json_data["annotation"] f2 = f1["face"] if f2 == []: return [] return f2[0

2021-06-25 22:56:38 166

原创 博弈论拾遗2(不定期更新)

1.信息集是决策节的合集2.尽管博弈本身是在贯序地进行,但局中人却同时选择各自的策略3.在基本博弈中,或在局中人选择参与博弈的方式中不存在不确定性时,你可以继续认为盈利是简单的排序4.策略型:局中人名单,策略集,策略组合对应的盈利5.当每一个局中人都有优策略时,博弈就有一个占优策略解6.艺术品拍卖模型,真实叫价是占优策略解...

2021-06-25 22:45:06 76

原创 博弈论拾遗1(不定期更新)

1.Do not choose strictly dominated strategy.2.Rational choice sucks3.in shoes strategy1.the ingredients of a game: players, strategies, payoffs2.in shoes in shoes…1.iteratively deleting dominated strategies2.Median Voter Theorem: the prediction is ca

2021-06-25 22:43:19 121

原创 修改json文件内部分内容

import jsonfrom shutil import copyfileimport shtilfrom sys import exitjson_data = {}def change_json(input_json_file, output_json_file, pathn) with open(input_json_file, encoding = "utf-8") as f: json_data = json.load(f) json_data["A"]["B"]["C"]

2021-06-25 22:01:48 689

原创 Python展平文件夹

Python展平文件夹import osfrom shutil import copyfileimport shutilfrom sys import exitif_name_==‘main’:path1 = R’’path2 = R’’for root,dirs,files in os.walk(path1):for file in files:file_name = os.path.join(root,file)filename = file.split(’/’)[-1]prin

2021-06-25 18:03:10 144

原创 视频跟踪:下蹲情况的检测(猜想验证代码)

Python 视频跟踪下蹲误报清除import jsonimport ospath = R’’def get_json_by_filename(json_file_path):“”"从json文件里提取rect字段“”"with open(json_file_path) as f:json_data = json.load(f)return json_data["rect"]def reset(value):value = float(0)return valuedef upd

2021-06-25 16:11:58 105

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除