<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[AManFromEarth的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/AManFromEarth</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; AManFromEarth]]></copyright><item><title><![CDATA[人脸识别-论文阅读-ArcFace及其由来（SphereFace、CosFace）]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/107013578</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/107013578</guid><author>AManFromEarth</author><pubDate>Tue, 30 Jun 2020 22:42:19 +0800</pubDate><description><![CDATA[ArcFace（建议大家去看论文的第一版）是现在最常用的人脸识别算法，它从softmax、SphereFace和CosFace发展过来，这里就详述一下arcface算法和其发展过程。

图1
ArcFace发展过程
随着深度学习人脸识别的发展，现在人脸识别的主要思想是在网络学习的过程中增大类间差距（inter-class）的同时减小类内差距（intra-class）。
Softmax
Softmax是最常用的分类损失函数：
L=−1N∑i=1Nlog⁡(eWyiTxi+byi∑j=1neWjTxi+bj)(]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读-Network Slimming]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106942943</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106942943</guid><author>AManFromEarth</author><pubDate>Wed, 24 Jun 2020 20:28:35 +0800</pubDate><description><![CDATA[论文地址：Learning Efficient Convolutional Networks through Network Slimming
这篇论文是在2017年的ICCV发表的，可以看做是之前讲过的channel pruning方法的变种，但是更加简单有效。
简单来说，这篇论文的剪枝方式是，给每个通道加上权重，在训练的过程中使用L1正则化对通道权重进行稀疏化，然后对于最终通道权重低于阈值的通道剪枝，最后重新训练得到剪枝模型。论文非常聪明的就是对batch normliization(BN)层的γ\ga]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读-Deep compression]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106936855</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106936855</guid><author>AManFromEarth</author><pubDate>Wed, 24 Jun 2020 20:26:03 +0800</pubDate><description><![CDATA[下载地址：《Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding》
这篇是韩松大神的代表作，是ICLR2016年的best paper，值得好好读一下。
其实这篇论文本质上是《Learning both Weights and Connections for Efficient Neural Networks》的极致扩展，是在这篇论文基础上继续压缩模型，]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读-《Channel Pruning for Accelerating Very Deep Neural Networks》]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106906156</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106906156</guid><author>AManFromEarth</author><pubDate>Tue, 23 Jun 2020 09:44:44 +0800</pubDate><description><![CDATA[与上篇对卷积核进行剪枝不同，本篇论文主要是对特征通道进行剪枝。
Introduction
其实这一篇论文的立意和上篇类似，都是说在剪枝后不需要产生稀疏网络，不同的是，该篇论文是剪枝的冗余的特征通道来达到目的。其剪枝方法是：对于一个训练好的网络，通道剪枝是通过最小化其剪枝前后的输出特征图之间的重建误差来完成的：首先是进行通道选择和特征图重建，在该过程中使用LASSO回归找到冗余的特征图并剪枝；然后使用最小二乘优化对剩余的特征通道进行输出重建。
方法
该论文首先对单层卷积层剪枝方法进行说明，然后是多层和多分枝网]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读《Pruning Filters For Efficient Convnets》]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106888694</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106888694</guid><author>AManFromEarth</author><pubDate>Mon, 22 Jun 2020 21:51:54 +0800</pubDate><description><![CDATA[之前的两篇分别讲了剪枝的权重剪枝和神经元剪枝，这篇是专门针对CNN卷积核进行剪枝的，还是挺有针对性和有效的，建议大家去看下原文。
Introduction
论文首先指出了现有剪枝网络的两个主要问题：一个是有些剪枝方法在剪枝后并不能减少计算时间，因为大多数的剪枝操作是在计算量不大的FC层完成的；另一个问题是，有些能剪枝CNN的方法在剪枝后需要使用单独的稀疏网络框架（BLAS）甚至专门的硬件上才能运行。
所以本文专注于对卷积核剪枝，与权重剪枝相比，卷积核剪枝对于剪枝操作更自然，不会引入稀疏连接，所以不需要使用专]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读-《Data-free Parameter Pruning for Deep Neural Networks》]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106840127</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106840127</guid><author>AManFromEarth</author><pubDate>Fri, 19 Jun 2020 18:26:09 +0800</pubDate><description><![CDATA[与上篇论文剪枝权重连接不同，这篇论文是直接剪枝神经元，并且是data-free，就是不用重训练的，值得读一下。
本篇论文的主要思想是，找到两个非常相似的神经元，删除其中的一个并使最终的输出尽量不变。
定义相似的神经元
之前的神经元剪枝操作是找到冗余的（权重为0的）神经元，然后进行剪枝，这样的话最终的网络输出是没有任何影响的。
在这篇论文中，作者定义了另外一种神经元冗余。首先以单层隐藏层、只有一个输出z的神经网络举例，如下图：

对于该神经网络输出z来说：
z=a1h(W1TX)+a2h(W2TX)+a3h(]]></description><category></category></item><item><title><![CDATA[网络模型剪枝-论文阅读《Learning both Weights and Connections for Efficient Neural Networks》]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106835832</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106835832</guid><author>AManFromEarth</author><pubDate>Thu, 18 Jun 2020 20:40:15 +0800</pubDate><description><![CDATA[这是2015年NIPS的一篇经典的剪枝文章，由韩松大神所作，由于年代比较久远，所以就大概说一下它的重点内容，以便给模型剪枝有个初始印象。
Introduction
文章首先讲了LeNet、AlexNet和VGG这些当时经典的网络的参数量的非常大，同时需要的存储空间也越来越大；然后以能量消耗的角度谈了这些模型运行具体能消耗多少能量。这就引出了本文的目标，就是对较大的网络模型进行剪枝以降低能量消耗从而能在移动端实时运行。
文章提出的剪枝策略是：①在初始模型训练完成后，②移除权重低于特定阈值的所有连接，即从稠密连]]></description><category></category></item><item><title><![CDATA[目标检测-论文阅读-FPN(Feature Pyramid Networks for Object Detection)]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/106803948</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/106803948</guid><author>AManFromEarth</author><pubDate>Wed, 17 Jun 2020 20:01:08 +0800</pubDate><description><![CDATA[FPN论文地址，以及pytorch版本的github地址，实际上最新版本的pytorch已经集成了FPN，所以建议去看该代码。
立意
FPN的立意很直接，如图1所示的目标检测常用的abc三种特征提取结构：
(a) 将图像依次缩放成金字塔样式并分别提取特征，优点是能提取多个尺度的带有较强语义信息的特征表示，缺点是预测时间是之前的多倍、训练较占显存；
(b) Faster RCNN用的无金字塔结构，缺点和优点与(a)相反；
© SSD使用的网络内特征金字塔层次，优点是能产生不同分辨率的特征图，缺点是不同的深度(]]></description><category></category></item><item><title><![CDATA[python中numpy的一些用法]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/81319061</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/81319061</guid><author>AManFromEarth</author><pubDate>Tue, 31 Jul 2018 19:24:53 +0800</pubDate><description><![CDATA[1.np.unique()

删除array里面的重复数字

a = np.array([1,1,2,3,1,5])
print(np.unique(a))

结果：

[1 2 3 5]]]></description><category></category></item><item><title><![CDATA[使用pytorch读取、使用预训练模型进行finetune：以Resnet-101为例]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/81071823</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/81071823</guid><author>AManFromEarth</author><pubDate>Mon, 16 Jul 2018 21:49:34 +0800</pubDate><description><![CDATA[在使用pytorch进行网络训练的时候，有时候不可避免的使用迁移学习（trainsfer learning），即使用已经训练好的模型（如resnet、inception等），固定其已经训练好的网络层参数，然后进行finetune。 
以下代码是以resnet-101为例使用pytorch进行finetune的操作：

#导入必要模块
import torch
import torch.nn as ...]]></description><category></category></item><item><title><![CDATA[Tensorflow读取并输出已保存模型的权重数值]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/81057577</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/81057577</guid><author>AManFromEarth</author><pubDate>Sun, 15 Jul 2018 21:56:14 +0800</pubDate><description><![CDATA[这篇文章是为了对网络模型的权重输出，可以用来转换成其他框架的模型。



import tensorflow as tf
from tensorflow.python import pywrap_tensorflow

#首先，使用tensorflow自带的python打包库读取模型
model_reader = pywrap_tensorflow.NewCheckpointReader(r&amp;quot;mo...]]></description><category></category></item><item><title><![CDATA[手把手从0开始安装Windows版Caffe与py-faster-RCNN]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/80212554</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/80212554</guid><author>AManFromEarth</author><pubDate>Sat, 14 Jul 2018 07:44:21 +0800</pubDate><description><![CDATA[在安装windows版faster RCNN的时候，网上的教程都不太完整，所以在此写下自己安装的完整过程，希望对别人有帮助。

一、 安装显卡驱动

1.    下载 
下载地址：http://www.nvidia.cn/Download/index.aspx?lang=cn 
下载选项：（以GTX 1080为例） 
 
2.    安装 
一直点下一步就可以了，安装完成之后重启电脑。



二、...]]></description><category></category></item><item><title><![CDATA[python中numpy的拷贝（改变一个数组另外一个数组也改变的情况）]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/80931737</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/80931737</guid><author>AManFromEarth</author><pubDate>Thu, 05 Jul 2018 19:05:16 +0800</pubDate><description><![CDATA[python里numpy默认的是浅拷贝，即拷贝的是对象的地址，结果是修改拷贝的值的时候原对象也会随之改变，如代码所示：



a = np.arange(4)
print(a)

b = a
print(b)

b[0] = 100
print(b)

print(a)

结果



[0 1 2 3]
[0 1 2 3]
[100   1   2   3]
[100   1   2   3]

...]]></description><category></category></item><item><title><![CDATA[C++读取不定行数不定数目的数据]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/80898719</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/80898719</guid><author>AManFromEarth</author><pubDate>Tue, 03 Jul 2018 15:01:27 +0800</pubDate><description><![CDATA[在读取不定数据方面，官方是用CTRL+Z终止的，下面的代码是只需要回车就可以自动判断是否输入数据。 
以读取int数据为例：



#include &amp;lt;iostream&amp;gt;
#include &amp;lt;string&amp;gt;
#include &amp;lt;sstream&amp;gt;
using namespace std;

int main()
{
    string str;
    int ...]]></description><category></category></item><item><title><![CDATA[python3中pathlib库的Path类的使用]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/80265843</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/80265843</guid><author>AManFromEarth</author><pubDate>Thu, 10 May 2018 14:38:36 +0800</pubDate><description><![CDATA[用了很久的os.path，今天发现竟然还有这么好用的库，记录下来以便使用。

1.调用库

from pathlib import 

2.创建Path对象



p = Path('D:/python/1.py')
print(p)

#可以这么使用,相当于os.path.join()
p1 = Path('D:/python')
p2 = p1/'123'
print(p2)

结果

D:\...]]></description><category></category></item><item><title><![CDATA[python使用numpy读取、保存txt数据]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/80259649</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/80259649</guid><author>AManFromEarth</author><pubDate>Wed, 09 May 2018 21:08:16 +0800</pubDate><description><![CDATA[1.首先生成array数组

import numpy as np
a = np.random.rand(5,5)
print(a)

结果：



array([[0.17374613, 0.87715267, 0.93111376, 0.53415215, 0.59667207],
       [0.6865835 , 0.15873242, 0.2842251 , 0.73840834, ...]]></description><category></category></item><item><title><![CDATA[Tensorflow读取并使用预训练模型：以inception_v3为例]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/79155926</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/79155926</guid><author>AManFromEarth</author><pubDate>Wed, 24 Jan 2018 22:06:24 +0800</pubDate><description><![CDATA[在使用Tensorflow做读取并finetune的时候，发现在读取官方给的inception_v3预训练模型总是出现各种错误，现记录其正确的读取方式和各种错误做法： 
关键代码如下：



import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.contrib.slim.python.slim....]]></description><category></category></item><item><title><![CDATA[python下遍历文件夹中所有文件]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/79125361</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/79125361</guid><author>AManFromEarth</author><pubDate>Mon, 22 Jan 2018 09:16:04 +0800</pubDate><description><![CDATA[python下遍历某个路径所有文件是很常用的事，一直对其有所困扰，今天想明白了之后记录下来，供以后查阅。

首先，文件夹是这样的： 
 
a,b,c是各包含一张jpg图片的文件夹，其余是4张jpg图片。

遍历文件夹的方法首先需要调用os库，即 
import os 
然后使用 
os.walk(path) 
path是指想遍历文件夹的路径 
完整代码如下：

import os
path=r'C]]></description><category></category></item><item><title><![CDATA[目标检测-论文阅读-Faster RCNN（Faster R-CNN:Towards Real-Time Object Detection with Region Proposal Networks）]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/79085365</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/79085365</guid><author>AManFromEarth</author><pubDate>Thu, 18 Jan 2018 10:25:29 +0800</pubDate><description><![CDATA[Faster RCNN论文解读

用了一段时间的Faster RCNN，现写下自己的理解，有不对的地方希望指正。 
Faster RCNN是基于RCNN和Fast RCNN的基础上完成的，建议没有看过前两篇的先去了解一下。

论文首先说明，Fast RCNN如果不考虑region proposals的话它的检测时间接近实时，所以传统region proposal的算法(如Fast RCNN用的Se...]]></description><category></category></item><item><title><![CDATA[Caffe下py-faster-rcnn使用残差网络Resnet进行训练]]></title><link>https://blog.youkuaiyun.com/AManFromEarth/article/details/79030199</link><guid>https://blog.youkuaiyun.com/AManFromEarth/article/details/79030199</guid><author>AManFromEarth</author><pubDate>Thu, 11 Jan 2018 09:12:26 +0800</pubDate><description><![CDATA[Faster RCNN论文：http://arxiv.org/abs/1506.01497  
Faster RCNN源码Github地址：https://github.com/rbgirshick/py-faster-rcnn  
ResNet论文：https://arxiv.org/abs/1512.03385  
ResNet Github地址：https://github.com/Kaimi]]></description><category></category></item></channel></rss>