摘要: 1.图像基础操作 #1.视频读取,变成灰度视频,调节视频速度: import cv2 as cv video=cv.VideoCapture('lz.mp4') #检查是否打开正确 if video.isOpened: open,frame=video.read()#读取第一帧 else: open 阅读全文
posted @ 2020-06-26 19:57 Turing-dz 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #检测opencv插件安装成功否 import cv2 as cv img=cv.imread(r'D:\DeepLearning\timg.jpg') cv.namedWindow('Image') cv.imshow('Image',img) cv.waitKey(0) cv.destroyAl 阅读全文
posted @ 2020-06-26 19:52 Turing-dz 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import time start_time=time.time() for a in range(0,1001): for b in range(0,1001): c=1000-a-b if a**2+b**2==c**2: print("a,b,c:%d,%d,%d"%(a,b,c)) end_ 阅读全文
posted @ 2020-06-26 19:45 Turing-dz 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1.简单线性回归 #线性回归 import numpy as np data_x=np.linspace(0,10,30) data_y=data_x*3+7+np.random.normal(0,1,30) import matplotlib.pyplot as plt %matplotlib i 阅读全文
posted @ 2020-06-26 16:34 Turing-dz 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1.卷积神经网络卫星图片识别 import tensorflow as tf import matplotlib.pyplot as plt %matplotlib inline import numpy as np import pandas as pd import pathlib#面向对象的路 阅读全文
posted @ 2020-06-26 10:19 Turing-dz 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 1.猫狗数据集自定义 import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt %matplotlib inline import numpy as np import glob impo 阅读全文
posted @ 2020-06-26 10:12 Turing-dz 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 1.gpu配置 import tensorflow as tf #当前程序可用GPU gpu=tf.config.experimental.list_physical_devices(device_type='GPU') cpu=tf.config.experimental.list_physica 阅读全文
posted @ 2020-06-26 10:03 Turing-dz 阅读(307) 评论(0) 推荐(0) 编辑