<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[reform513的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/reform513</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; reform513]]></copyright><item><title><![CDATA[minAreaRect]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/119142016</link><guid>https://blog.youkuaiyun.com/reform513/article/details/119142016</guid><author>reform513</author><pubDate>Tue, 27 Jul 2021 13:47:32 +0800</pubDate><description><![CDATA[函数 cv2.minAreaRect() 返回一个Box2D结构 rect：（最小外接矩形的中心（x，y），（宽度，高度），旋转角度）。
分别对应于返回值：(rect[0][0], rect[0][1]), (rect[1][0], rect[1][1]), rect[2]

借用原博主的图片（侵即删）：

注意 ：

1. 旋转角度θ是水平轴（x轴）逆时针旋转，与碰到的矩形的第一条边的夹角。并且这个边的边长是width，另一条边边长是height。也就是说，在这里，width与height不是...]]></description><category></category></item><item><title><![CDATA[制作Pascal Voc 格式标柱文件]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/118960014</link><guid>https://blog.youkuaiyun.com/reform513/article/details/118960014</guid><author>reform513</author><pubDate>Wed, 21 Jul 2021 10:07:44 +0800</pubDate><description><![CDATA[# -*- coding: utf-8 -*-
import os
import cv2
import shutil
from xml.etree import ElementTree
from xml.etree.ElementTree import Element, SubElement


def pretty_xml(element, indent, newline, level=0):
    """
    通过加入缩进、换行，美化xml
    :param element: Elment类.]]></description><category></category></item><item><title><![CDATA[感受野的理解]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/118877852</link><guid>https://blog.youkuaiyun.com/reform513/article/details/118877852</guid><author>reform513</author><pubDate>Sun, 18 Jul 2021 15:27:54 +0800</pubDate><description><![CDATA[Receiptive Field: 特征图上每个grid（一个特征向量, 维度=nchannels）所对应的输入图片上一个矩形区域

感受野不是越大越好 ，比如在文本识别任务中，特征序列的每个step的感受野和一个word的大小相当理论上是最好的，太大的话，一个激活对应这个几个文字，反而不利于分类。




...]]></description><category></category></item><item><title><![CDATA[梯度是怎么计算的]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/116129348</link><guid>https://blog.youkuaiyun.com/reform513/article/details/116129348</guid><author>reform513</author><pubDate>Sun, 18 Jul 2021 15:19:44 +0800</pubDate><description><![CDATA[梯度是怎么计算的


import torch 

a = torch.randn((3,3), requires_grad = True)

w1 = torch.randn((3,3), requires_grad = True)
w2 = torch.randn((3,3), requires_grad = True)
w3 = torch.randn((3,3), requires_grad = True)
w4 = torch.randn((3,3), requires_grad = Tru...]]></description><category></category></item><item><title><![CDATA[python 派生类方法重写必须要有相同的函数签名吗]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/116230120</link><guid>https://blog.youkuaiyun.com/reform513/article/details/116230120</guid><author>reform513</author><pubDate>Wed, 28 Apr 2021 11:44:19 +0800</pubDate><description><![CDATA[Question

Python Method overriding, does signature matter?

Lets say I have


class Super():
  def method1():
    pass

class Sub(Super):
  def method1(param1, param2, param3):
      stuff


Is this correct? Will calls to method1 always go to the sub cl...]]></description><category></category></item><item><title><![CDATA[pytorch computation graph]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/116126697</link><guid>https://blog.youkuaiyun.com/reform513/article/details/116126697</guid><author>reform513</author><pubDate>Sun, 25 Apr 2021 15:03:39 +0800</pubDate><description><![CDATA[1. 动态图 vs 静态图

pytorch 是动态建图，好处是方便使用python control flow statements控制计算流走向，每个iteration可以有完全不同的计算图，同时也比较容易处理shape不确定的tensors or variables。除此，dynamic graphs are debug friendly, becuase it allows for line by line execution of code and you can have access to al]]></description><category></category></item><item><title><![CDATA[3D Human Body Reconstruction]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/115674534</link><guid>https://blog.youkuaiyun.com/reform513/article/details/115674534</guid><author>reform513</author><pubDate>Tue, 13 Apr 2021 17:55:55 +0800</pubDate><description><![CDATA[本文简要介绍与 3D 数字人相关的研究，包括常用 3D 表示、常用 3D 人体模型、3D 人体姿态估计，带衣服 3D 人体重建，3D 衣服建模，以及人体动作驱动等。

常用3D表示

目前 3D 学习中，物体或场景的表示包括显式表示与隐式表示两种，主流的显式表示包括基于 voxel、基于 point cloud、和基于 polygon mesh 三种，隐式表示包括基于 Occupancy Function[1]、和基于 Signed Distance Functions[2]两种。下表简要总结了各种表...]]></description><category></category></item><item><title><![CDATA[谈谈基于深度相机的三维重建]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/115212607</link><guid>https://blog.youkuaiyun.com/reform513/article/details/115212607</guid><author>reform513</author><pubDate>Thu, 25 Mar 2021 16:45:29 +0800</pubDate><description><![CDATA[三维重建（3D Reconstruction）技术一直是计算机图形学和计算机视觉领域的一个热点课题。早期的三维重建技术通常以二维图像作为输入，重建出场景中的三维模型。但是，受限于输入的数据，重建出的三维模型通常不够完整，而且真实感较低。随着各种面向普通消费者的深度相机（depth camera）的出现，基于深度相机的三维扫描和重建技术得到了飞速发展。以微软的Kinect，华硕的XTion以及因特尔的RealSense等为代表的深度相机造价低廉，体积适当，操作方便，并且易于研究者和工程师进行开发。三维重...]]></description><category></category></item><item><title><![CDATA[pytorch 获取分布在不同GPU上的某个tensor的值]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/114751934</link><guid>https://blog.youkuaiyun.com/reform513/article/details/114751934</guid><author>reform513</author><pubDate>Sat, 13 Mar 2021 17:00:14 +0800</pubDate><description><![CDATA[torch.distributed支持3中backends，'gloo', 'mpi' 和 'nccl', 每种backend支持的函数是不同的，需要查表确认https://pytorch.org/docs/stable/distributed.html#

下面以backend = 'nccl' 为例， 演示获取分布在不同GPU上的某个tensor的值的方式



1. reduce or all_reduce

 




# 获取该tensor的均值
box_iou = comput...]]></description><category></category></item><item><title><![CDATA[pytorch DistributedDataParallel]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/113972777</link><guid>https://blog.youkuaiyun.com/reform513/article/details/113972777</guid><author>reform513</author><pubDate>Tue, 23 Feb 2021 10:01:41 +0800</pubDate><description><![CDATA[1. 为什么每个epoch都要调用distributed_sampler.set_epoch(epoch) 函数一次?

torch.utils.data.distributed.DistributedSampler: 在多机多卡情况下分布式训练数据的读取也是一个问题，不同的卡读取到的数据应该是不同的。dataparallel的做法是直接将batch切分到不同的卡，这种方法对于多机来说不可取，因为多机之间直接进行数据传输会严重影响效率。于是有了利用distributed_sampler确保datalo...]]></description><category></category></item><item><title><![CDATA[Linux 磁盘分区大于2T]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/113882717</link><guid>https://blog.youkuaiyun.com/reform513/article/details/113882717</guid><author>reform513</author><pubDate>Sat, 20 Feb 2021 14:29:51 +0800</pubDate><description><![CDATA[Linux机器磁盘分区，如果分区大于2T，使用 fdisk /dev/xxx 划分后的分区可能会小于等于2T。


	fdisk is not an option
	

root@turtle:~# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xbe0...]]></description><category></category></item><item><title><![CDATA[python 派生类方法可以改变函数签名]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/113058735</link><guid>https://blog.youkuaiyun.com/reform513/article/details/113058735</guid><author>reform513</author><pubDate>Sat, 23 Jan 2021 17:33:07 +0800</pubDate><description><![CDATA[派生类方法是可以改变父类方法的函数签名的，但为了避免出错，父类方法要满足LSP.


class Super():
  def method1(*args):
    pass

class Sub(Super):
  def method1(param1, param2, param3):
      stuff


In Python, methods are just key-value pairs in the dictionary attached to the class. When you a]]></description><category></category></item><item><title><![CDATA[Linux Shell 学习]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/112968407</link><guid>https://blog.youkuaiyun.com/reform513/article/details/112968407</guid><author>reform513</author><pubDate>Thu, 21 Jan 2021 17:48:04 +0800</pubDate><description><![CDATA[Linux Shell 学习

1. 基础


#!/bin/bash

# 变量声明
a=1 # 等号两边不能有空格

# 使用expr做整数运算
b=`expr 2 \* 2`  # 乘法中的*号需要做转义\*
c=`expr $b + 1` 


# 条件表达式要放在方括号之间，并且要有空格
if [ $b == $c ]
then
   echo "b 等于 c"
elif [ $b != $c ]
then echo "b 不等于 c"
fi


# 关系运算, 关系运算符只支持数字，不支持字符.]]></description><category></category></item><item><title><![CDATA[Linux 命令]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/112762448</link><guid>https://blog.youkuaiyun.com/reform513/article/details/112762448</guid><author>reform513</author><pubDate>Mon, 18 Jan 2021 09:58:19 +0800</pubDate><description><![CDATA[1. nautilus

最近使用Ubuntu的时候发现了一个很好用的小命令：nautilusnautilus是GNOME桌面下的一个文件管理工具。通过这个命令我们可以在终端下非常方便的打开指定目录的文件。

$ nautilus your_path

your_path支持绝对路径和相对路径两种方式；当your_path 省略时，默认打开家目录“~”。

如果当前打开了多个文件管理器，不需要鼠标一个个点掉，一个命令就可以将其尽数关闭

 $ nautilus -q




...]]></description><category></category></item><item><title><![CDATA[mmdetection 环境配置]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/112245722</link><guid>https://blog.youkuaiyun.com/reform513/article/details/112245722</guid><author>reform513</author><pubDate>Tue, 05 Jan 2021 19:08:03 +0800</pubDate><description><![CDATA[1. 配置清华源镜像通道


conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anac]]></description><category></category></item><item><title><![CDATA[双目测距的基本公式推导]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/111515533</link><guid>https://blog.youkuaiyun.com/reform513/article/details/111515533</guid><author>reform513</author><pubDate>Tue, 22 Dec 2020 11:44:27 +0800</pubDate><description><![CDATA[双目深度估计使用两个camera，通过双目矫正把问题从深度估计转化到特征点匹配、视差计算的问题，这样的转换将学习目标从深度变成了视差，这样做是因为视差相对于深度来说更直观一些。

双目校正是根据摄像头定标后获得的单目内参数据（焦距、成像原点、畸变系数）和双目相对位置关系（旋转矩阵和平移向量），分别对左右视图进行消除畸变和行对准，使得左右视图的成像原点坐标一致。



视差图是同一个场景在两个相机下成像的像素的位置偏差，下图中的即是视差。P是待测物体上的某一点，OR与OT分别是两个相机的光心，点P在两个相机感]]></description><category></category></item><item><title><![CDATA[python 修饰器]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/111505506</link><guid>https://blog.youkuaiyun.com/reform513/article/details/111505506</guid><author>reform513</author><pubDate>Tue, 22 Dec 2020 10:12:43 +0800</pubDate><description><![CDATA[修饰器就是一个普通的python函数，接受一个函数作为其唯一的参数, 并返回一个新函数（一般是传入函数的封装）。

下面的my_decorator就是一个简单的修饰函数:


def my_decorator(func):
    def wrapper():
        print("Something is happening before the function is called.")
        func()
        print("Something is happening a]]></description><category></category></item><item><title><![CDATA[Python打包分发工具setuptools简介与扩展]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/111263926</link><guid>https://blog.youkuaiyun.com/reform513/article/details/111263926</guid><author>reform513</author><pubDate>Wed, 16 Dec 2020 13:36:34 +0800</pubDate><description><![CDATA[Python打包分发工具setuptools简介



作为Python标准的打包及分发工具，setuptools可以说相当地简单易用。它会随着Python一起安装在你的机器上。你只需写一个简短的setup.py安装文件，就可以将你的Python应用打包。本文就会介绍下如何编写安装文件及如何打包分发。

首先，如果你需要另外安装setuptools，你可以使用下面的命令：


$ wget http://peak.telecommunity.com/dist/ez_setup.py
$ sudo pyth.]]></description><category></category></item><item><title><![CDATA[Ubuntu 通过NFS挂载远程目录到本地]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/110555405</link><guid>https://blog.youkuaiyun.com/reform513/article/details/110555405</guid><author>reform513</author><pubDate>Thu, 03 Dec 2020 17:49:12 +0800</pubDate><description><![CDATA[Ubutun 通过NFS挂载远程目录到本地

本地机器每次对于自身挂载的远程文件的访问，实际上都是发送了一次新的RPC请求，请求目标服务器，将其对应的数据实时返回到本地机器的文件当中；（Linux中存在这样一个应用即：Network File System即NFS网络文件系统，一种使用于分散式文件系统的协定，让应用程序在客户端通过网络访问位于远程磁盘中的数据，是在类Unix系统间实现对应的磁盘文件共享的一种方法）。

NFS于RPC的关系：

NFS在文件传送或信息传送过程中依赖于RPC协议。RPC...]]></description><category></category></item><item><title><![CDATA[磁盘查看/挂载/修改目录]]></title><link>https://blog.youkuaiyun.com/reform513/article/details/110546436</link><guid>https://blog.youkuaiyun.com/reform513/article/details/110546436</guid><author>reform513</author><pubDate>Thu, 03 Dec 2020 17:15:49 +0800</pubDate><description><![CDATA[磁盘查看/挂载/修改目录

查看

df -h  查看分区情况及数据盘名称，只能查看已经挂载的
	fdisk -l 可以查看所有磁盘，包括未挂载的
挂载

把已经挂载在/home目录上的硬盘挂载到/data目录上， 如下操作


mkdir /data（如果没有data目录就创建，否则此步跳过）
umount /home（卸载硬盘已挂载的home目录）
mount /dev/sdb3 /data （挂载到data目录）
vim /etc/fstab （编辑fstab文件修改或添加，使重启后可以自动挂载）..]]></description><category></category></item></channel></rss>