<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[coding_zhang的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/coding_zhang</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; coding_zhang]]></copyright><item><title><![CDATA[ubuntu16.04更新安装protoc]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/104029815</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/104029815</guid><author>coding_zhang</author><pubDate>Sat, 18 Jan 2020 14:09:45 +0800</pubDate><description><![CDATA[目的是为了使用tensorflow object detection API。但是ubuntu16.04默认安装的是protoc 2.6.1 不满足需求。需要更新protoc版本到3.4.1]]></description><category></category></item><item><title><![CDATA[Nvidia 视频处理框架----1. VideoProcessingFramework 介绍和安装]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/103833370</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/103833370</guid><author>coding_zhang</author><pubDate>Sat, 04 Jan 2020 15:13:16 +0800</pubDate><description><![CDATA[地址：https://github.com/NVIDIA/VideoProcessingFramework

简介：

VPF(VideoProcessingFramework) 是一个视频处理框架。利用c++ 库和python绑定能够提供视频处理任务的硬件加速。例如：编码，解码，转码，颜色空间和像素转换的GPU加速。

安装：

系统：ubuntu16.04

环境准备：

python 环境：...]]></description><category></category></item><item><title><![CDATA[python任务调度之schedule 获取执行任务的返回值]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/103782990</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/103782990</guid><author>coding_zhang</author><pubDate>Tue, 31 Dec 2019 15:24:54 +0800</pubDate><description><![CDATA[背景：python利用schedule库执行定时任务。


import schedule
import time

def myjob():
    print("I'm working...")

schedule.every(10).minutes.do(myjob)

while True:
    schedule.run_pending()
    time.sleep(1)

但是我...]]></description><category></category></item><item><title><![CDATA[processing annotations of CULane:fatal error: opencv2\highgui.hpp: No such file or directory]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/103238356</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/103238356</guid><author>coding_zhang</author><pubDate>Mon, 25 Nov 2019 15:12:28 +0800</pubDate><description><![CDATA[#项目地址：
https://github.com/XingangPan/seg_label_generate

#编译错误：
fatal error: opencv2\highgui.hpp: No such file or directory

#原因：
因为opencv2和opencv3文件目录不同造成。
#解决：
1. 修改MakeFile
OPENCV = -I/usr/local/in...]]></description><category></category></item><item><title><![CDATA[Not JSON Serializable error  tf2.0]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/102794425</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/102794425</guid><author>coding_zhang</author><pubDate>Tue, 29 Oct 2019 10:37:21 +0800</pubDate><description><![CDATA[背景：使用的模型需要转换成tflite，用tf.keras重写后，因为用到了tf.keras.activations operators 所以在model.save的时候会报错Not JSON Serializable error。应该是类型不支持，造成node json序列化失败。

解决方法：

1. 官方tf nightly build '2.0.0-dev20190802' 版本已经fi...]]></description><category></category></item><item><title><![CDATA[ffmpeg 开发记录一]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/102639819</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/102639819</guid><author>coding_zhang</author><pubDate>Sat, 19 Oct 2019 16:47:58 +0800</pubDate><description><![CDATA[项目背景：所要实现的功能类似于直播。整个直播流程要打通，从摄像头拉流，到解码拆帧，然后处理之后编码推流，最后展示。

摄像头：海航威视 DS-IPC-B系列的摄像头。

开发工具：pycharm,ffmpeg/gstreamer

环境：mac，VLC

rstp/rtmp server: node-rtsp-rtmp-server，gst-rtsp-server, rtsp-server,Eas...]]></description><category></category></item><item><title><![CDATA[pytorch 和 keras padding对比]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/101695400</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/101695400</guid><author>coding_zhang</author><pubDate>Sun, 29 Sep 2019 17:35:03 +0800</pubDate><description><![CDATA[一、pytorch 相关


torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros')

其中padding_mode 有两种。默认值是‘zeros’,另一个是‘circular’(这种模式貌似...]]></description><category></category></item><item><title><![CDATA[python3处理带中文的文件]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/101295500</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/101295500</guid><author>coding_zhang</author><pubDate>Tue, 24 Sep 2019 17:15:14 +0800</pubDate><description><![CDATA[解决办法：



​​​​​​​def bad_filename(filename):
    temp = filename.encode(sys.getfilesystemencoding(), errors='surrogateescape')
    return temp.decode('utf-8')

for name in files:
    try:
        prin...]]></description><category></category></item><item><title><![CDATA[cv2.VideoCapture() always return false]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/99594777</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/99594777</guid><author>coding_zhang</author><pubDate>Wed, 14 Aug 2019 18:26:33 +0800</pubDate><description><![CDATA[背景：读取摄像头视频，cv2.VideoCapture() 总是返回false

解决办法：要么自己编译opencv with ffmpeg，要么安装高版本的opencv&gt;=3.4.1.15

之前是通过pip安装的opencv 3.2版本，测试的时候cv2.VideoCapture() 总是返回false。网上资料也都是让自己安装ffmpeg并编译opencv，再把.so文件copy到相...]]></description><category></category></item><item><title><![CDATA[DABNet: Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/97762486</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/97762486</guid><author>coding_zhang</author><pubDate>Tue, 30 Jul 2019 15:17:11 +0800</pubDate><description><![CDATA[论文地址：https://arxiv.org/pdf/1907.11357.pdf

代码地址：https://github.com/Reagan1311/DABNet

论文利用了depth-wise asymmetric convolution and dilated convolution 设计了DAB module（Depthwise Asymmetric Bottleneck），充分利用...]]></description><category></category></item><item><title><![CDATA[Efficient Dense Modules of Asymmetric Convolution for Real-Time Semantic Segmentation]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/97516366</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/97516366</guid><author>coding_zhang</author><pubDate>Sat, 27 Jul 2019 19:05:29 +0800</pubDate><description><![CDATA[论文地址：https://arxiv.org/pdf/1809.06323.pdf

作者：Shao-Yuan Lo1 Hsueh-Ming Hang1 Sheng-Wei Chan2 Jing-Jhih Lin2 1 National Chiao Tung University 2 Industrial Technology Research Institute sylo95.eecs02@g2...]]></description><category></category></item><item><title><![CDATA[学习过程中遇到的bug(持续更新)]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/97393767</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/97393767</guid><author>coding_zhang</author><pubDate>Fri, 26 Jul 2019 18:55:36 +0800</pubDate><description><![CDATA[错误：RuntimeError: CUDA error: unknown error
解决方法：sudo rm -rf ~/.nv





错误：RuntimeError: Failed to export an ONNX attribute, since it’s not constant, please try to make things (e.g., kernel size) s...]]></description><category></category></item><item><title><![CDATA[RuntimeError: Failed to export an ONNX attribute, since it's not constant, please try to make things]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/97382555</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/97382555</guid><author>coding_zhang</author><pubDate>Fri, 26 Jul 2019 13:00:38 +0800</pubDate><description><![CDATA[这是一个Pytorch1.1版本pytorch模型转onnx的bug

参考：https://blog.youkuaiyun.com/Cxiazaiyu/article/details/91129657

解决方法：

1.pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch==1.0.1

2.pip install -i https...]]></description><category></category></item><item><title><![CDATA[Tensorboard could not bind to unsupported address family问题解决]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89645798</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89645798</guid><author>coding_zhang</author><pubDate>Sun, 28 Apr 2019 21:01:32 +0800</pubDate><description><![CDATA[背景：ubuntu 16.04下使用tensorboard报错Tensorboard could not bind to unsupported address family

解决：


tensorboard --logdir=/tmp/mnist/log/ --port 8023 --host 本机ip
]]></description><category></category></item><item><title><![CDATA[Expected object of scalar type Long but got scalar type Float]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89643594</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89643594</guid><author>coding_zhang</author><pubDate>Sun, 28 Apr 2019 18:33:56 +0800</pubDate><description><![CDATA[背景：训练模型的时候报错Expected object of scalar type Long but got scalar type Float

解决：


方法一：
targets =torch.LongTensor(targets)
方法二：
targets = targets.to(self.device,dtype=torch.int64)


...]]></description><category></category></item><item><title><![CDATA[记录一次tensorflow cuda out of memory]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89643320</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89643320</guid><author>coding_zhang</author><pubDate>Sun, 28 Apr 2019 18:17:26 +0800</pubDate><description><![CDATA[背景：训练的时候cuda 报错out of memory

解决：排查原因。基本out of memory就是显存不够了,batchsize 太大的原因。将batchsize改小了以后确实问题也解决了。

但是让我疑问的是之前我跑程序的时候还没有任何问题。突然就out of memory.

注：tensorflow 默认run的时候将显存全占。设置config就解决。


config = tf...]]></description><category></category></item><item><title><![CDATA[apache2 如何禁止目录列举]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89556188</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89556188</guid><author>coding_zhang</author><pubDate>Fri, 26 Apr 2019 16:34:08 +0800</pubDate><description><![CDATA[背景：项目部署上线，由于所有文件都放在/static/对应的目录下，当直接访问/static/的时候会将所有的静态资源都列举出来，这是不被允许的。

解决方法：

修改apache配置禁用目录列举。


&lt;Directory&gt;
    Options -Indexes
&lt;/Directory&gt;

配置directory的时候加上以上值就ok。
...]]></description><category></category></item><item><title><![CDATA[pytorch中计算准确率，召回率和F1值的方法]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89537810</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89537810</guid><author>coding_zhang</author><pubDate>Fri, 26 Apr 2019 11:30:57 +0800</pubDate><description><![CDATA[predict = output.argmax(dim = 1)
confusion_matrix =torch.zeros(2,2)
for t, p in zip(predict.view(-1), target.view(-1)):
    confusion_matrix[t.long(), p.long()] += 1
a_p =(confusion_matrix.diag() / c...]]></description><category></category></item><item><title><![CDATA[tensorflow中tf.train.string_input_producer()方法]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89471216</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89471216</guid><author>coding_zhang</author><pubDate>Tue, 23 Apr 2019 14:04:25 +0800</pubDate><description><![CDATA[背景：最近用tensorflow读取大量的数据，为了高效读取数据，采用tf.train.string_input_producer()方法

问题：tf.train.string_input_producer()中可以指定epoch这个参数，但是用的时候发现好像没法获取一个epoch是什么时候结束

官方文档：https://www.tensorflow.org/api_docs/python/t...]]></description><category></category></item><item><title><![CDATA[TFRecords 拆分]]></title><link>https://blog.youkuaiyun.com/coding_zhang/article/details/89455784</link><guid>https://blog.youkuaiyun.com/coding_zhang/article/details/89455784</guid><author>coding_zhang</author><pubDate>Mon, 22 Apr 2019 17:41:16 +0800</pubDate><description><![CDATA[背景：由于之前已经生成了训练数据的tfrecords，需要对已经生成的tfrecords根据类别去按比例拆分。或者将一个大的tfrecors拆分成几个小的tfrecords。

参考：https://stackoverflow.com/questions/54519309/split-tfrecords-file-into-many-tfrecords-files?rq=1

1. 将大的tfre...]]></description><category></category></item></channel></rss>