logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

opencv——canny算子提取图像边缘

import cv2import numpy as npfrom matplotlib import pyplot as pltimg = cv2.imread('test.png',0)edges = cv2.Canny(img,150,200)plt.subplot(121),plt.imshow(img,cmap = 'gray')plt.title('Original Image

#opencv
爬虫入门2——爬代理ip地址

import urllib.requestimport redef url_open(url):req=urllib.request.Request(url)req.add_header('User-Agent','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.

#爬虫
ubuntu下如何在spyder上输入汉字

每次写python脚本都是在spyder编辑器上写,然而在ubuntu环境中默认无法输入汉字。百度找了很久,没有找到解决方法,突然有一天碰巧成功,遂记录下来,以免日后遗忘。1.进入system2. 进入language support3.选择regional formats4.点击apply system-wide 就OK啦

#编辑器#ubuntu
爬虫入门2——爬代理ip地址

import urllib.requestimport redef url_open(url):req=urllib.request.Request(url)req.add_header('User-Agent','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.

#爬虫
This application failed to start because it could not find or load the Qt platform plugin "xcb"

安装完anaconda,打开spyder时,出现This application failed to start because it could not find or load the Qt platform plugin “xcb”。如图谷歌好久终于找到解决方案。步骤如下:sudo gedit ~./bashrc[在最后一行写入]export QT_PLUGIN_PATH=<你自己安装a

#qt
Ubuntu下NVIDIA显卡驱动安装教程+cuda8.0+cudnn5.1(极力推荐)

最近捣鼓了一下英伟达显卡驱动的安装,总结了一套比较方便的安装教程,进攻分享。1、根据显卡型号,去官网查找对应型号的驱动。官网地址:http://www.nvidia.cn/Download/index.aspx?lang=cn  。比如我选择的版本是2、点击下载。此时网页卡顿,需要等很久。所以这里有一个技巧。把地址栏的地址复制下来,然后粘贴到迅雷下载。然后再下载。3、把

#ubuntu
tensorflow将训练好的模型freeze,即将权重固化到图里面,并使用该模型进行预测(tf.graph_util.convert_variables_to_constants函数)

我们很多时候需要保存tensorflow模型的pb文件,这时用tf.graph_util.convert_variables_to_constants函数会非常方便。1.训练网络:fully_conected.pyimport argparseimport osimport timeimport tensorflow as tfimport datasets_mnist# Basic mo

#tensorflow
如何计算fpr95

对于二分类问题,我们经常通过ROC曲线及FPR95来判断分类器的好坏。这里提供两种方法。一种是sklearn.metrics中的roc_curve包,可直接用于计算在不同阈值下,TPR和FPR对应的值,进而可以得出TPR=0.95时,FPR的值。"""label=1表示正样本,scores为预测概率,数值越大,越有可能是正样本"""fro

#分类
opencv——计算轮廓的周长、所包含面积、中心点

#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Fri Oct 27 19:14:12 2017@author: fs"""import cv2import numpy as npimg = cv2.imread('lunkuo.png')ret,thresh = cv2.threshold(cv2.cvtColor(

#opencv
到底了