- 博客(17)
- 收藏
- 关注
原创 vs2015 +opencv4.1证件照背景替换 任意色变为白色
vs2015 +opencv4.1证件照背景替换 任意色变为白色#include <opencv2/opencv.hpp>#include <iostream>#include <opencv2/highgui/highgui_c.h>using namespace cv;using namespace std;Mat mat_to_sample...
2020-04-30 21:59:43
792
原创 模型的训练
import tensorflow as tffrom tensorflow.keras import layers, optimizers, datasets, Sequentialimport osfrom resnet import resnet18os.environ['TF_CPP_MIN_LOG_LEVEL']='2'tf.random.set_seed(2345)#...
2020-04-24 16:02:05
261
原创 tesnorflow2.0模型的加载训练和保存
import tensorflow as tfimport numpy as npimport pandas as pdimport osimport matplotlib.pyplot as plt# matplotlib inline(train_image, train_label),(test_image,test_label)=tf.keras.datasets.fashio...
2020-04-24 14:46:58
297
原创 Python TensorFlow2.0 cifar100 cnn vgg13
import tensorflow as tffrom tensorflow.keras import layers, optimizers, datasets, Sequentialimport osos.environ['TF_CPP_MIN_LOG_LEVEL']='2'tf.random.set_seed(2345)conv_layers = [# 5 units of co...
2020-03-15 18:50:13
194
原创 Python OpenCV 人脸识别(pca_svm)
Python OpenCV 人脸识别(pca_svm)import sklearn.datasets as sdimport sklearn.decomposition as dcimport sklearn.model_selection as msimport sklearn.svm as svmimport sklearn.metrics as smimport matplotl...
2020-03-15 16:13:22
1703
1
原创 python opencv人脸识别
Python OpenCV 人脸识别局部二值模式直方图人脸识别器import cv2 as cvimport osimport numpy as npimport sklearn.preprocessing as spfd = cv.CascadeClassifier('face.xml')def search_faces(directory): directory = ...
2020-03-15 14:41:54
170
原创 Python OpenCV 人脸定位 ,包括(face,smile,eyes)
基于Python OpenCV的人脸定位(face ,smile,eyes)import cv2 as cvfd = cv.CascadeClassifier('face.xml')#脸部定位器ed = cv.CascadeClassifier('eye.xml')#眼睛定位器sd = cv.CascadeClassifier('smile.xml')#笑容定位器vc = cv.Vid...
2020-03-15 13:37:37
1408
原创 Python OpenCV 物体识别
基于Python OpenCV 隐马尔可夫模型 物体识别,汽车飞机摩托车。网上自己收集的图片进行识别的,准确率可以达到60% 其中通过star 和sift 特征检测。import osimport warningsimport numpy as npimport cv2 as cvimport hmmlearn.hmm as hlwarnings.filterwarnings('...
2020-03-15 11:41:15
5966
3
原创 python opencv 角点检测,锐化
import numpy as npimport cv2 as cvoriginal = cv.imread('box.jpg')print(original.shape)cv.imshow('box',original)#灰度转化gray = cv.cvtColor(original,cv.COLOR_BGR2GRAY)eq_gray = cv.equalizeHist(gra...
2020-03-14 15:07:20
529
原创 Python OpenCV 直方均衡处理,提高亮度,对比度不变。
import numpy as npimport cv2 as cvoriginal = cv.imread('hei.jpg')print(original.shape)cv.imshow('hei',original)#灰度转化gray = cv.cvtColor(original,cv.COLOR_BGR2GRAY)#直方均衡处理,提高亮度,对比度不变。eq_gray ...
2020-03-14 14:38:33
150
转载 Python OpenCV canny检测
边缘检测 cannyimport numpy as npimport cv2 as cvoriginal = cv.imread('p4.jpg')print(original.shape)cv.imshow('1',original)#边缘检测,canny 效果比较好。目的让边缘更加突出。canny=cv.Canny(original,50,50)cv.imshow('cann...
2020-03-14 14:10:31
204
原创 Python OpenCV 图片的读取、缩放,裁剪与保存
import numpy as npimport cv2 as cvoriginal = cv.imread(‘p4.jpg’)print(original.shape)cv.imshow(‘1’,original)blue = np.zeros_like(original)blue[…,0] = original[…,0]cv.imshow(‘blue’,blue)green =...
2020-03-14 14:00:35
2187
原创 Python if else test 练习
Python if else test 练习#! /usr/bin/python3#第一题k = int(input(“请输入公里数”))if 0<k<=3:y=13elif 3<k<=15:y=2.3kelif k>15:y=2.3k+1.15*kprint(“费用:”,round(y),“元”)#第二题s1 = int(input(“请输入...
2020-02-12 10:41:48
250
原创 Python test4
python 练习#! /usr/bin/python3#注释。注释print(“hello”)print(“1+23")print("1+2+34 =”,1+2+3*4)#作业#第一题:写出图形print("########")print("# #")print("# #")print("########")#第2题#已知矩形的长边为6,短边为4,求...
2020-02-12 10:38:03
114
原创 Python test2
Python 练习2s = input("请输入圆的半径: ")s= float(s)print(s)print("圆的周长是:",2*3.14*s)print(1,2,3,4,5,sep='-+-')print(1,2,3,4,5,sep='*')print(1,2,3,4,5,sep=' ')print(1,2,3,4,5,end=' \n')print(1,2,3...
2020-02-12 10:35:48
125
原创 Python test1
Python 练习1#第一题print("第一题")print(" * ")print(" *** ")print(" ***** ")print("*******")#第二题print("第二题")print("216两是",216//16,"斤",216%16,"两")#第三题print("第三题")print("63320秒",63320//3600,"...
2020-02-12 10:33:25
107
原创 Python学习总结
Python学习总结更具视频自学的Python,以前学的已经快忘记,现在来复习一下,顺便做一个笔记。linux的基本知识linux 命令格式:命令名 【选项】【参数】例: pwdls /usr/bin/cd /注:有些命令没有选项和参数。根目录: Linux : / 。路径:用来记录一个文件或者文件夹的字符串,分为绝对路径和相对路径。绝对路径:以“ / ”...
2020-02-11 20:46:00
103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人