c++编译:
g++ hello.cpp -o hello
清除pip缓存指令:
sudo rm -rf ~/.cache/pip
查看当前目录大小:
du -sh
压缩和解压缩:
1.将当前目录下所有.txt文件打包并压缩归档到文件this.tar.gz,我们可以使用
tar czvf this.tar.gz ./*.txt
2.将当前目录下的this.tar.gz中的文件解压到当前目录我们可以使用
tar xzvf this.tar.gz ./
复制整个目录:
cp -r dg dg_wxy
指定GPU训练
CUDA_VISIBLE_DEVICES=0,1 python test.py
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
监听GPU
watch -n 10 nvidia-smi
https://www.docin.com/p-1447633705.html
## 计算角度 角BAC B(x1,y1) A(x2,y2) C(x3,y3)
def get_angle(x1,y1,x2,y2,x3,y3):
numerator = (x1-x2)*(x3-x2)+(y1-y2)*(y3-y2)
denominator = np.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) * np.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2))
angle = np.arccos(numerator/denominator)
return angle/3.1415926 * 180
## 计算角度 AB 与 CD 向量夹角 A(x1,y1) B(x2,y2) C(x3,y3) D(x4,y4)
def get_angle_v2(x1,y1,x2,y2,x3,y3,x4,y4):
numerator = (x2-x1)*(x4-x3) + (y2-y1)*(y4-y3)
denominator = np.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)) * np.sqrt((x4-x3)*(x4-x3)+(y4-y3)*(y4-y3))
angle = np.arccos(numerator/denominator)
return angle/3.1415926 * 180
https://blog.csdn.net/qq_36782182/article/details/83624357
https://blog.csdn.net/baidu_38172402/article/details/81949447
https://blog.csdn.net/weixin_43206570/article/details/84797361
在图像测量过程以及机器视觉应用中,为确定空间物体表面某点的三维几何位置与其在图像中对应点之间的相互关系,必须建立相机成像的几何模型,这些几何模型参数就是相机参数。
进行摄像机标定的目的:求出相机的内、外参数,以及畸变参数。
标定相机后通常是想做两件事:一个是由于每个镜头的畸变程度各不相同,通过相机标定可以校正这种镜头畸变矫正畸变,生成矫正后的图像;另一个是根据获得的图像重构三维场景。
摄像机标定过程,简单的可以简单的描述为通过标定板,可以得到n个对应的世界坐标三维点Xi和对应的图像坐标二维点xi,这些三维点到二维点的转换都可以通过上面提到的相机内参K,相机外参R和t,以及畸变参数D,经过一系列的矩阵变换得到。
https://www.jianshu.com/p/940d21c79aa3
https://blog.csdn.net/qq_37014750/article/details/84659473
https://www.sohu.com/a/160377591_114877
https://www.cnblogs.com/arkenstone/p/10856466.html
https://blog.csdn.net/Vici__/article/details/100714822、http://codingdict.com/sources/py/cv2.html
https://blog.csdn.net/u011995719/article/details/71080987
https://blog.csdn.net/mashaokang1314/article/details/82885995
https://blog.csdn.net/qq_37541097/article/details/90257985
tensorflow中文文档:http://www.tensorfly.cn/tfdoc/get_started/introduction.html
https://www.cnblogs.com/guoyaohua/p/9059605.html
https://blog.csdn.net/baymax_007/article/details/85249432
torch中文文档:https://pytorch-cn.readthedocs.io/zh/latest/
torch.nn:https://www.cnblogs.com/wanghui-garcia/p/10775859.html
https://www.jianshu.com/p/8e501a159b28
参数和FLOPs计算:https://www.cnblogs.com/arkenstone/p/10856466.html、https://www.cnblogs.com/arkenstone/p/10856466.html
仿射变换:https://www.cnblogs.com/happystudyeveryday/p/10547316.html
https://blog.csdn.net/qq_29796317/article/details/74910733
EM聚类算法:
最小二乘法的求解:
梯度下降法:
import numpy as np
x = np.array([LFoot_dx,LAnkle_dx,LKnee_dx,LHip_dx,LShould_dx,LElbow_dx,LWrist_dx,LHand_dx,
RFoot_dx,RAnkle_dx,RKnee_dx,RHip_dx,RShould_dx,RElbow_dx,RWrist_dx,RHand_dx,
EIT1_dx,EIT2_dx,EIT3_dx])
y = np.array([CG_dy])
w = np.zeros([1,19])
b = 0
'''定义传播函数 由于不涉及到二分类等问题 所以不使用sigmoid函数 使用线性回归 取平方差的和 '''
def process(w, b, X, Y):
m = X.shape[1]
A = np.dot(w, X) + b
assert (A.shape == (1, len(CG_dx)))
cost = 1 / m * np.sum((A - Y) ** 2) # 越小则越接近实际值
dw = 2 / m * np.dot((A - Y), X.T)
db = 2 / m * np.sum(A - Y)
assert (dw.shape == w.shape)
assert (cost.shape == ())
dao = {'dw': dw, 'db': db}
return dao, cost
alpha = 0.001 # 学习率
itemra_Num =1000001 # 迭代次数
for i in range(itemra_Num):
dao, cost = process(w, b, x, y)
dw = dao['dw']
db = dao['db']
w = w - alpha * dw
b = b - alpha * db
if i % 1000 == 0:
print(w)
print(b)
print(cost)
马氏距离:
ffmpeg常见用法:
抽帧:
ffmpeg -i "*.mp4" -r 1 -q:v 2 -f image2 %d.jpeg
ffmpeg -i input_video.mp4 -r 5 output_dir/frame%04d.jpg
合成:
ffmpeg -f image2 -i %*.jpeg test.avi
ffmpeg -r 5 -start_number 123 -i input_dir/frame%02d.jpg -vf fps=5 output_dir/video.mp4
截取视频:
ffmpeg -i ./plutopr.mp4 -vcodec copy -acodec copy -ss 00:00:10 -to 00:00:15 ./cutout1.mp4 -y
ffmpeg -ss 1:05 -i input.mp4 -t 10 -c:v copy -c:a copy output.mp4
视频转gif:
ffmpeg -i out.mp4 -ss 00:00:00 -t 10 out.gif
视频抽单张图片:
ffmpeg -i 1.avi -f image2 -ss 2 -vframes 1 test1.png
coco2017数据集下载:
http://images.cocodataset.org/zips/train2017.zip
http://images.cocodataset.org/annotations/annotations_trainval2017.zip
http://images.cocodataset.org/zips/val2017.zip
http://images.cocodataset.org/zips/test2017.zip
http://images.cocodataset.org/annotations/image_info_test2017.zip
COCO数据集的标注格式:https://zhuanlan.zhihu.com/p/29393415
关键点常用数据集:https://blog.csdn.net/baolinq/article/details/90447518
关键点常用指标:OKS https://zhuanlan.zhihu.com/p/48601321、https://blog.csdn.net/m0_37163827/article/details/84887811
https://blog.csdn.net/u014380165/article/details/79502197
官方:https://github.com/open-mmlab/mmdetection
官方:https://github.com/leoxiaobin/deep-high-resolution-net.pytorch
结合mmdetector /yolo v3的hrnet pose:https://github.com/lxy5513/hrnet
多目标跟踪的pose:https://github.com/lxy5513/cvToolkit
官方:https://github.com/CMU-Perceptual-Computing-Lab/openpose
https://github.com/CMU-Perceptual-Computing-Lab/openpose_train
配置:https://www.aiuai.cn/aifarm706.html:安装git caffe和pybind11
https://blog.csdn.net/qq_42001765/article/details/89480840
问题:找不到 lpthread
find /lib -name "*pthread*"
sudo ln -s /lib/x86_64-linux-gnu/libpthreads.so /lib/
安装protobuf:https://blog.csdn.net/lwplwf/article/details/76532804
添加环境变量:
export PATH=/usr/local/bin/:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
安装opencv:https://blog.csdn.net/cocoaqin/article/details/78163171
关键点定位︱四款人体姿势关键点估计论文笔记
https://blog.csdn.net/sinat_26917383/article/details/79704097
2D姿态估计整理:从DeepPose到HRNet:
https://www.jianshu.com/p/39fe654ed410