cuda

FFMpeg.AutoGen(1)讲解官方example代码:Main函数、 解码

时光怂恿深爱的人放手 提交于 2020-07-27 04:25:24
FFMpeg 是一套C编译的开源工具集。主要用于视频处理,可以编解码视频,建立流媒体服务器等等。官方网站: http://ffmpeg.org/ FFMpeg.AutoGen 封装方法以方便C#调用FFmpeg。项目地址: https://github.com/Ruslan-B/FFmpeg.AutoGen 。可以使用NuGet安装。 AutoGen只是封装调用FFmpeg,程序还是需要下在FFmpeg工具放在程序目录里,且版本要对应。 笔者用FFMpeg.AutoGetn的官方example代码介绍一下FFMpege如何使用(源代码在其github库里)。 example是一个命令行程序,mian函数里面的代码如下。我将通过此函数调用顺序介绍ffmpeg.AutoGet的用法。 目录: 1.注册FFmpeg库。实际就将ffmpeg库的地址告诉autogen 2.ffmpeg 一些调用其的配置(可选) 2.1 配置日志输出 2.2配置硬件解码器ffmpeg是支持硬解的.具体支持类型可以参考ffmpeg官方文档。转载网友摘录的ffmpeg支持硬解编码的枚举。 3.解码函数DecodeAllFramesToImages 3.1 VideoStreamDecoder类 3.2 VideoFrameConverter类 3.3 相关数据结构AVPacket,AVFrame

Pytorch深度学习实战教程(一):语义分割基础与环境搭建

强颜欢笑 提交于 2020-07-26 11:13:16
本文 GitHub https:// github.com/Jack-Cherish /PythonPark 已收录,有技术干活文章,整理的学习资料,一线大厂面试经验分享等,欢迎 Star 和 完善。 一、前言 该系列文章的内容有: Pytorch的基本使用 语义分割算法讲解 先从最简单的语义分割基础与开发环境搭建开始讲解。 二、语义分割 语义分割是什么? 语义分割(semantic segmentation) : 就是按照“语义”给图像上目标类别中的每一点打一个标签,使得不同种类的东西在图像上被区分开来。可以理解成像素级别的分类任务,直白点,就是对每个像素点进行分类。 简而言之,我们的目标是给定一幅RGB彩色图像(高x宽x3)或一幅灰度图像(高x宽x1),输出一个分割图谱,其中包括每个像素的类别标注(高x宽x1)。具体如下图所示: 注意 :为了视觉上清晰,上面的预测图是一个低分辨率的图。在实际应用中,分割标注的分辨率需要与原始图像的分辨率相同。 这里对图片分为 五类 :Person(人)、Purse(包)、Plants/Grass(植物/草)、Sidewalk(人行道)、Building/Structures(建筑物)。 与标准分类值(standard categorical values)的做法相似,这里也是创建一个 one-hot编码 的目标类别标注——本质上即为

如何安装pytorch

情到浓时终转凉″ 提交于 2020-07-26 04:27:46
https://blog.csdn.net/yuanzhoulvpi/article/details/86742729 https://blog.csdn.net/qq_34342852/article/details/97673819 用conda安装会比较方便,下面直接用conda安装 先改个镜像 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ 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 --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/ conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

Anaconda5.1.0(对应python3.6.4)+CUDA10.0+CUDNN7.4.1+TensorFlow1.2.0+keras2.2.4安装总结

浪子不回头ぞ 提交于 2020-07-25 02:52:17
标题其实很清楚了,只不过我还是把我环境列详细一点给大家吧,第一次写博客,大佬勿喷~ 上面的连接我再发一下: Anaconda3下载: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive Anaconda和Python对应版本见: https://blog.csdn.net/yuejisuo1948/article/details/81043823 Cuda下载: https://developer.nvidia.com/cuda-toolkit Cudnn下载: https://developer.nvidia.com/rdp/cudnn-download TensorFlow下载(需要翻墙): https://1drv.ms/u/s!AspzPyzQ0HQR7VNCicPlnCV2abKJ TensorFlow安装问题解决: https://www.cnblogs.com/elitphil/p/11580604.html keras和TensorFlow的版本对应: https://www.cnblogs.com/carle-09/p/11661261.html 好了,上面已经介绍完环境了,那接下来说一下详细的步骤吧~~~ 一、Anaconda3安装 下载 Anaconda3-5.1.0-Windows-x86_64.exe

How to improve computational time for sorting with thrust?

心不动则不痛 提交于 2020-07-23 06:20:19
问题 I found the method 'vectorized/batch sort' and 'nested sort' on below link. How to use Thrust to sort the rows of a matrix? When I tried this method for 500 row and 1000 elements, the result of them are vectorized/batch sort : 66ms nested sort : 3290ms I am using 1080ti HOF model to do this operation but it takes too long compared to your case. But in the below link, it could be less than 10ms and almost 100 microseconds. (How to find median value in 2d array for each column with CUDA?) Could

How to improve computational time for sorting with thrust?

本小妞迷上赌 提交于 2020-07-23 06:19:47
问题 I found the method 'vectorized/batch sort' and 'nested sort' on below link. How to use Thrust to sort the rows of a matrix? When I tried this method for 500 row and 1000 elements, the result of them are vectorized/batch sort : 66ms nested sort : 3290ms I am using 1080ti HOF model to do this operation but it takes too long compared to your case. But in the below link, it could be less than 10ms and almost 100 microseconds. (How to find median value in 2d array for each column with CUDA?) Could

How to improve computational time for sorting with thrust?

[亡魂溺海] 提交于 2020-07-23 06:18:21
问题 I found the method 'vectorized/batch sort' and 'nested sort' on below link. How to use Thrust to sort the rows of a matrix? When I tried this method for 500 row and 1000 elements, the result of them are vectorized/batch sort : 66ms nested sort : 3290ms I am using 1080ti HOF model to do this operation but it takes too long compared to your case. But in the below link, it could be less than 10ms and almost 100 microseconds. (How to find median value in 2d array for each column with CUDA?) Could

Bitonic sorting in cuda misorders some values

旧巷老猫 提交于 2020-07-19 13:47:25
问题 i'm making a sorting algorithm on CUDA for a bigger project and i decided implementing a Bitonic sorting. The number of elements i'll be sorting will be allways a power of two, in fact will be 512. I need an array which will have the final positions because this method will be used for ordering an array that represents the quality matrix of another solution. fitness is the array i'll sort, numElements is the number of elements, and orden is initially an empty array with numElements positions

LLVM retrieve name of AllocaInst

徘徊边缘 提交于 2020-07-18 07:35:08
问题 I am trying to retrieve the name of the pointer passed to a cudaMalloc call. CallInst *CUMallocCI = ... ; // CI of cudaMalloc call Value *Ptr = CUMallocCI->getOperand(0); if (AllocaInst *AI = dyn_cast<AllocaInst>(Ptr) != nullptr) { errs() << AI->getName() << "\n"; } The above however just prints an empty line. Is is possible to get the pointer name out of this alloca? This is the relevant IR: %28 = alloca i8*, align 8 ... ... call void @llvm.dbg.declare(metadata i8** %28, metadata !926,