AI
highoooo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Yolact
Yolact原创 2022-12-10 16:55:36 · 986 阅读 · 0 评论 -
BN
BN原创 2022-11-29 17:32:52 · 126 阅读 · 0 评论 -
yolov5-seg
yolov5-seg原创 2022-11-16 16:47:56 · 811 阅读 · 2 评论 -
我在self-attention中对Query,Key,Value的理解
Non-local means可先了解相关内容Non-local meansNon-local Neural Networks作用:突破局部限制,不管是CNN还是RNN计算式图解论文原创 2022-03-18 13:55:44 · 1646 阅读 · 0 评论 -
pytorch转TensorRT 模型转换 (以retinaface为例)
Trail 1 :.pth->.wts->.engine1.1 pth文件转为key value的字典文件便于c++解析 (.pth->.wts)def main(): print('cuda device count: ', torch.cuda.device_count()) device = 'cuda:0' net = torch.load('retinaface.pth') net = net.to(device) net.eval()原创 2022-03-07 15:51:40 · 1905 阅读 · 0 评论 -
基于c++的人脸检测识别NVIDIA边缘设备部署
基于c++的人脸检测识别NVIDIA边缘设备部署效果展示:1.检测识别模型retinaface+arcface(mobilenet)2.部署(以下步骤直接参考readme)https://github.com/axxx-xxxa/Insightface-arcface-retinaface2.1 模型转换2.2 tensorrt推理2.3 集成两个模型到主函数2.4 opencv抓流送入推理2.5 显示+保存...原创 2022-03-01 09:01:45 · 2771 阅读 · 0 评论 -
bisect
https://docs.python.org/zh-cn/3.7/library/bisect.html原创 2022-02-09 09:51:40 · 430 阅读 · 0 评论 -
饱和和非饱和激活函数
https://blog.youkuaiyun.com/qq_40824311/article/details/103017760原创 2022-02-08 16:04:15 · 510 阅读 · 0 评论 -
BatchN
from torch import nnimport torchtorch.manual_seed(21)input = torch.randn(1,3,3,3).cuda()input[0][0] = 0m3 = nn.BatchNorm2d(3, eps=0, momentum=0.5, affine=True, track_running_stats=True).cuda()m3.running_mean = (torch.ones([3])*4).cuda() # 设置模型的均原创 2022-02-08 15:25:12 · 1246 阅读 · 0 评论 -
thop 计算flops和params
from torchvision.models import resnet50from thop import profileimport torchmodel = resnet50()input = torch.randn(1, 3, 224, 224)flops, params = profile(model, inputs=(input, ))print("%s ------- params: %.2fMB ------- flops: %.2fG" % (model, params /原创 2022-02-08 13:38:40 · 2602 阅读 · 0 评论 -
dataset:xml->txt
filterimport globimport cv2import xml.etree.ElementTree as ETimport numpy as np# color =def filter1(xml_root, img_root): xml_list = glob.glob(f'{xml_root}/*') classes = [] error_num = 0 for i, xml_name in enumerate(xml_list):原创 2021-09-03 11:34:26 · 100 阅读 · 0 评论 -
Batch normalization
1.3 Internal Covariate Shift会带来什么问题?(1)上层网络需要不停调整来适应输入数据分布的变化,导致网络学习速度的降低我们在上面提到了梯度下降的过程会让每一层的参数 [公式] 和 [公式] 发生变化,进而使得每一层的线性与非线性计算结果分布产生变化。后层网络就要不停地去适应这种分布变化,这个时候就会使得整个网络的学习速率过慢。(2)网络的训练过程容易陷入梯度饱和区,减缓网络收敛速度当我们在神经网络中采用饱和激活函数(saturated activation funct..原创 2021-09-03 10:25:38 · 152 阅读 · 0 评论 -
add/concat
concat是通道数的增加;不同层提取到的特征拼接在一起add是特征图相加,通道数不变不同层提取到的特征各取一部分原创 2021-08-27 09:17:35 · 355 阅读 · 0 评论 -
cv 带中文
imread/imwriteimg_path = f"all_img/{img_name}.png"img = cv2.imdecode(np.fromfile(img_path, dtype=np.uint8), 1)name = f"data_ver2/{img_name}.png"cv2.imencode('.png', img)[1].tofile(name)原创 2021-08-26 16:59:13 · 106 阅读 · 0 评论 -
model_name : Epoch{i}-Total_Loss{m}-Val_Loss{n}.pth to figure
import matplotlib.pyplot as pltimport globimport osimport numpy as npimport pylab as plfile_names = os.listdir("824_4classes_200epoch_logs")train_Loss_merge = np.empty(len(file_names))val_Loss_merge = np.empty(len(file_names))Epoch_merge = np.a原创 2021-08-26 16:29:07 · 138 阅读 · 0 评论 -
read - xml
xml -> annotationclass提前设定好import xml.etree.ElementTree as ETimport randomimport globall_class = ['straw hat' , 'train' , 'person' , 'hat' , 'head' , 'cellphone' , 'cell phone']act_class = ['hat' , 'head' , 'cellphone']def Read_Write_classest.原创 2021-08-26 16:26:02 · 482 阅读 · 0 评论 -
学习率调整
yolov4标准模型 训练集共4000张图 试过cosine_lr下降比较有效 前面下降太慢 组合试一下def adjust_lr(optimizer, epoch, start_lr): if epoch < 30: lr = start_lr * pow(0.5,(epoch//10)) else: # lr = 5e-4 ~ 5e-5 index = epoch % 10 b = [1 , 0.8, 0原创 2021-08-26 15:13:57 · 167 阅读 · 0 评论 -
mAP——————
https://www.zhihu.com/question/53405779原创 2021-06-02 11:39:13 · 95 阅读 · 0 评论 -
计算图,动态图与静态图
https://blog.youkuaiyun.com/SakuraHimi/article/details/104589704原创 2021-06-21 15:02:37 · 438 阅读 · 0 评论 -
grad_fn
https://www.cnblogs.com/picassooo/p/13757403.html原创 2021-06-21 15:13:28 · 406 阅读 · 0 评论 -
decode
https://blog.youkuaiyun.com/weixin_42615068/article/details/93767781原创 2021-07-03 16:45:33 · 102 阅读 · 0 评论 -
embedding和pca
embedding降低维度后仍然保留重要信息PCA单纯只是降低维度原创 2021-07-06 14:53:52 · 623 阅读 · 0 评论 -
greedy/beam search
greedy preds = self.model(image, text_for_pred, is_train=False) preds = preds[:, :text_for_loss.shape[1] - 1, :] # target = text_for_loss[:, 1:] # without [GO] Symbol # select max probabilty (greedy decoding) then原创 2021-07-13 09:48:10 · 145 阅读 · 0 评论 -
RNN、LSTM、GRU
RNN整个RNN共享一组(U,W,b)seq2seq 是一个Encoder–Decoder 结构的网络,它的输入是一个序列,输出也是一个序列, Encoder 中将一个可变长度的信号序列变为固定长度的向量表达,Decoder 将这个固定长度的向量变成可变长度的目标的信号序列seq2seq with attentionencoder的时候为重点附上更大的权重输入给decoderRNN容易发现梯度消失梯度爆炸lstm 增加了输入门i、遗忘门f、输出门o、内部记忆单元c遗忘门f:ft = σ(W原创 2021-07-13 10:38:43 · 132 阅读 · 0 评论 -
旋转等变向量场网络Rotation equivariant vector field networks
https://blog.youkuaiyun.com/bxdzyhx/article/details/109813038原创 2021-08-05 09:11:36 · 373 阅读 · 0 评论 -
backbone
CV 经典主干网络 (Backbone) 系列: VGGNet (2014年)CV 经典主干网络 (Backbone) 系列: GoogLeNet(InceptionNet) (2014年)CV 经典主干网络 (Backbone) 系列: ResNet家族(2015年)CV 经典主干网络 (Backbone) 系列: ResNet变种(DenseNet, ResNext, ResNeSt…)CV 经典主干网络 (Backbone) 系列: SENet(2017年)CV 经典主干网络 (Backbo原创 2021-08-10 15:11:09 · 210 阅读 · 0 评论 -
最小二乘,极大似然,交叉熵
评估模型与人脑模型的差距最小二乘:累加错误的数值(平方而不是绝对值是为了方便求导,1/2是为了方便化简)极大似然估计:x1,x2—xn是人脑模型 W,b是网络模型 求使P最大的W,b(极大似然) P值越大 越与人脑模型接近log改连乘为连加 不影响单调性改max为min- 求极小值交叉熵:中国1%赢球的信息量6.6 法国99%赢球的信息量0.01比利时和阿根廷都是1左边的熵 = 0.5+0.5 =1 右边的熵 =0.01+0.06 = 0.07(KL散度、相对熵的定义)用于比较两个原创 2021-08-11 09:31:01 · 251 阅读 · 0 评论
分享