自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 记录一个linux中使用blender python 渲染的坑

blender Python脚本导入module

2023-03-07 17:59:59 608 1

原创 3dmm人脸配准/重建:gold standard algorithm

基于gold standard algorithm的人脸重建算法

2022-05-31 22:25:32 932

原创 pytorch3d Meshes类的方法get_bounding_boxes(),offset_verts(), scale_verts_(), update_padded()

其中Meshes 类有自带的计算bounding box的方法,如:mesh.get_bounding_boxes()Meshes类还有计算offset的方法,如通过通过torch.mean计算出中心坐标center后,需要将mesh移动至原点,通过mesh.offset(center)就可以做到。output_mesh = mesh.offset_verts(offset)而mesh的缩放,可以通过Meshes类中的scale_verts_()或scale_verts()做到,二者的区别是

2022-05-25 10:18:07 843

原创 pytorch3d学习之pytorch3d.ops

pytorch3d.ops是pytorch提供的一些关于3d数据,即计算机图形学的一些运算的包。1.pytorch3d.ops.ball_query()pytorch3d.ops.ball_query(p1: torch.Tensor, p2: torch.Tensor, lengths1: Optional[torch.Tensor] = None, lengths2: Optional[torch.Tensor] = None, K: int = 500, radius: float = 0.

2022-05-23 21:44:19 2062

原创 [解决]RuntimeError: CUDA error: device-side assert triggered

有很多博客说是因为分类数目错,...blabla错,都不对!这个报错是因为在gpu上运行时无法判断具体程序运行到什么地方报错,也有可能由硬件引发的错误。建议将程序放在CPU上运行debug,device='cpu'。我自己的问题是torch.gather()中的索引超出最大长度,这个问题只有在cpu上debug是才能准确报出。参考链接[已解決] RuntimeError: CUDA error: device-side assert triggered - Clay-Technology W

2022-05-23 20:18:45 1671 1

原创 关于pytorch的张量处理

1. squeeze()压缩张量,去除size为1的维度2.unsqueeze()增加维度:在指定维度上增加维度,如b = torch.tensor([1, 2, 3]), torch.Size([3])在dim = 0的维度插入,B1 = torch.unsqueeze(b, 0),输出为[[1,2,3]]。torch.Size([1, 3])加到另一个维度,B2 = B.unsqueeze(1),输出为[[1],[2],[3]]。torch.Size([3, 1])在B1基础

2022-05-23 17:09:05 418

原创 pytorch3d代码解释:pytorch3d.structures.meshes之verts_list, verts_packed, verts_padded

pytorch3d定义的mesh结构在,在pytorch3d.structures.meshes中可以看到pytorch3d.structures.meshes — PyTorch3D documentationhttps://pytorch3d.readthedocs.io/en/latest/_modules/pytorch3d/structures/meshes.html首先,输入可能由多个 meshes组成,每个mesh可能又不同的顶点数和面数。pytorch3d的meshes结构在load o

2022-05-22 12:50:18 1263

原创 win10/11 文件资源处理器卡死

换了win11后,经常出现卡死,打不开文件夹的情况。目前解决方法有二1.已经卡死,在任务管理器里面重启 “Windows 资源管理器”2.在"个性化",“开始”中关掉显示最近打开的项目。这样暂时能缓解该问题,更多原因需要进一步研究。...

2022-03-13 12:56:37 4216 2

原创 cuda10.1 找不到\没有libcublas.so文件

cuda10以后 libcublas.so.10被放在/usr/lib/x86_64-linux-gnu文件夹下可以采用sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.1 /usr/local/cuda-10.1/lib64/libcublas.so.10.1解决问题https://forums.developer.nvidia.com/t/cublas-for-10-1-is-missing/71015/6...

2021-06-28 15:37:47 4692 3

转载 Ubuntu16.04安装OpenNI2

安装方法安装依赖项$ sudo apt-get install -y g++ python libusb-1.0-0-dev freeglut3-dev doxygen graphviz$ sudo apt-get install libudev-dev$ apt-cache search openni2libopenni2-0 - framework for sensor-base...

2020-04-29 19:21:22 567

转载 安装jdk 错误

Errors were encountered while processing:/var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)$ sudo dpkg --configure -a依赖问题...

2020-04-29 17:46:14 312

转载 error while loading shared libraries: libopencv_core.so.3.1: cannot open shared object file: No such

error while loading shared libraries: libopencv_core.so.3.1: cannot open shared object file: No such file or directory这个错误主要的原因是在运行应用程序的时候没有找到一些动态文件,也就是没有将动态文件添加到系统的环境变量中。上述的解决方法如下sudo gedit /etc/...

2020-01-07 23:10:06 1744

转载 dpkg: 处理软件包 nginx (--configure)时出错:  依赖关系问题 - 仍未被配置 正在设置 libopencv-contrib-dev:amd64 (2.4.9.1+dfsg-1

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.invoke-rc.d: initscript nginx, action "start" fa...

2020-01-04 17:11:59 4270

原创 无法打开锁文件 /var/lib/dpkg/lock - open (13: 权限不够)

获取:23 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [79.6 kB]获取:24 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [124 kB]获取:25 http://s...

2020-01-04 16:58:34 2339

转载 RuntimeError: Found 0 files in subfolders of:

报错如下:RuntimeError: Found 0 files in subfolders of: /home/A/0Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif,.tiff,webp产生原因:路径问题举例说明: /home/A/0/ 目录下存在若干图片,/home/A/ 目录下只有 0 这一个文件夹。那...

2019-07-26 19:58:35 9118 1

转载 git 删除全局配置

1.查看Git所有配置git config --list2.删除全局配置项(1)终端执行命令:git config --global --unset user.name(2)编辑配置文件:git config --global --edit原文地址http://www.mamicode.com/info-detail-2301350.html...

2019-05-30 10:52:27 21384

原创 pytorch 使用预训练的模型

import torchimport torchvision.models as modelsimport MyDataLoaderfrom torch.autograd import Variablealexnet = models.alexnet(pretrained = False)alexnet.load_state_dict(torch.load('/home/alex...

2018-11-19 13:21:58 1135

转载 mark一下GAN的一些综述

https://blog.csdn.net/qq_25737169/article/details/78857788

2018-10-23 20:52:56 380

原创 c++换行

cout<<"int size = "<<sizeof(int)<<"\n";或cout<<"int size = "<<sizeof(int)<<endl;

2018-03-08 17:08:48 2515

原创 c++中的sleep用法

#include "stdafx.h"#include "iostream"#include<windows.h>//在Windows操作系统下sleep包含在windows.h中using namespace std;//使用std命名空间int main(){ cout << "hello world, i am ready for c++"; Sleep(1000);...

2018-03-08 16:59:21 21434

转载 caffe.Net类

caffe.Net类__init__(prototxt, phase)@param prototxt: 字符串。指定prototxt路径@param phase: `caffe.TRAIN`或者`caffe.TEST`@description: 根据prototxt初始化一个网络。相当于C++的: shared_ptr<Net<Dtype> > net(ne...

2018-03-06 16:12:51 5098 2

转载 python 中easydict的使用

easydict的作用:可以使得以属性的方式去访问字典的值![python] view plain copy >>> from easydict import EasyDict as edict  >>> d = edict({'foo':3, 'bar':{'x':1, 'y':2}})  >>> d.foo  3  >>>...

2018-03-06 10:25:37 1781

原创 ubuntu16.04 cuda9 faster-rcnn配置

python faster-rcnn github报错src/caffe/layers/cudnn_relu_layer.cu(43): error: argument of type "cudnnActivationMode_t" is incompatible with parameter of type "cudnnActivationDescriptor_t"          detec...

2018-03-05 19:36:35 2360 5

转载 caffe 可视化模型

在线可视化caffe模型结构http://ethereon.github.io/netscope/#/editor假设Caffe的目录是$(CAFFE_ROOT)1.编译caffe的python接口$ make pycaffe12.装各种依赖$ pip install pydot$ sudo apt-get install graphviz123.可视化模型dra

2018-01-25 17:32:32 234

原创 ubuntu17装nvidia驱动

1.非常重要,移除自带驱动nouveau否则后面安装后重启会发生冲突,无法启动!!!2.参考官网用deb下载https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1704&target_type=debl

2018-01-22 14:08:37 265

转载 卸载ubuntu自带驱动nouveau

强制方法:直接移除这个驱动(备份出来)#    mv /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko /lib/modules/3.0.0-12-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko.org重新加载一下    #    

2018-01-22 13:14:49 7166

原创 csv中的数据导入数据库

将文件a.csv中的数据导入表 table_xx. (separator "," a.csv中字段以逗号分别)sqlite> .separator ","sqlite> .import a.csv table_xxsqlite>导入停止.

2017-10-17 16:31:46 266

转载 anaconda使用

Conda的环境管理Conda的环境管理功能允许我们同时安装若干不同版本的Python,并能自由切换。对于上述安装过程,假设我们采用的是Python 2.7对应的安装包,那么Python 2.7就是默认的环境(默认名字是root,注意这个root不是超级管理员的意思)。假设我们需要安装Python 3.4,此时,我们需要做的操作如下:# 创建一个名为python34的环境,指定Pyth

2017-10-10 10:48:00 284

原创 python 读取 modis hdf文件

from pyhdf.SD import SD, SDCimport pprintHDF_FILR_URL = "E:\MyDownloads\MOD021KM.A2012156.0115.006.2014225090534.hdf"file = SD(HDF_FILR_URL)print(file.info())输出(31, 58),说明有31个科学数据集datas

2017-09-30 15:18:42 11445 12

原创 cnn实现 saver()

from __future__ import print_functionimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datamnist = input_data.read_data_sets('MNIST_data',one_hot=True)def comput

2017-09-27 16:31:29 268

原创 could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM

without close of session,you can use method 1, with tf.session or sess.close()1.config = tf.ConfigProto(device_count = {'GPU': 0})config.gpu_options.allow_growth = Truewith tf.Session(config=c

2017-09-27 16:17:08 718

转载 droputout使用

from __future__ import print_functionimport tensorflow as tf from sklearn.datasets import load_digitsfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import Label

2017-09-26 11:42:08 991

转载 Python中的__future__模块

这篇文章主要介绍了介绍Python中的__future__模块,__future__模块使得在Python2.x的版本下能够兼容更多的Python3.x的特性,需要的朋友可以参考下作者:廖雪峰 Python的每个新版本都会增加一些新的功能,或者对原来的功能作一些改动。有些改动是不兼容旧版本的,也就是在当前版本运行正常的代码,到下一个版本运行就可能不正常了

2017-09-26 10:28:19 241

转载 tf.cast

cast(x, dtype, name=None) 将x的数据格式转化成dtype.例如,原来x的数据格式是bool, 那么将其转化成float以后,就能够将其转化成0和1的序列。反之也可以a = tf.Variable([1,0,0,1,1])b = tf.cast(a,dtype=tf.bool)sess = tf.Session()sess.run(tf.initializ

2017-09-25 17:36:16 191

转载 The TensorFlow library wasn't compiled to use SSE4.1 instructions

原文转自2017-05-06 08:09:33.780033: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine a

2017-09-25 15:48:55 469

转载 GPU 版 TensorFlow failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED

如果你是使用 GPU 版 TensorFlow 的话,并且你想在显卡高占用率的情况下(比如玩游戏)训练模型,那你要注意在初始化 Session 的时候为其分配固定数量的显存,否则可能会在开始训练的时候直接报错退出:2017-06-27 20:39:21.955486: E c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\

2017-09-22 18:01:32 13520

原创 tensorflow session两种运行

对于tensorflow ,只有运行到session.run(xxx),才会调用起计算图里的该计算xxx因此大概有两种方式运行1,sess = tf.Session()for i in range(20000):result=sess.run(xxx)sess.close()2,用with的方法with tf.Session()as sess:

2017-09-22 15:45:36 1230

原创 caffe使用之——将自己的数据生成lmdb

1,准备文件目录在caffe/examples/下新建my_image文件夹下面在新建data文件夹以存放数据,建lmdbtest文件夹存放lmdb文件2,数据准备data文件夹下新建train,val文件夹分别存放用于训练和验证的数据建立train.txt文件,生成图片的目录+标签,最好打乱一下home/alice/caffe/examples/my_image/data

2017-09-19 11:00:16 631

转载 Ubuntu 下安装 Sublime Text 3

安装,因为有 PPA 可用,支持 Ubuntu 15.04、14.10、14.04、12.04 系统及衍生版本系统,打开终端,输入以下命令:sudo add-apt-repository ppa:webupd8team/sublime-text-3sudo apt-get updatesudo apt-get install sublime-text-installer卸载 sub

2017-09-18 10:48:10 341

转载 set -e作用

#!/bin/bashset -ecommand 1command 2...exit 0----------------------------------------------------------Every script you write should include set -e at the top. This tells bash tha

2017-09-15 22:43:40 902

空空如也

空空如也

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

TA关注的人

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