摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv def text_detection_demo(): ie = IECore() for device in ie
阅读全文
posted @ 2022-02-25 15:43
qiaokuankuan
阅读(45)
推荐(0)
摘要:
from openvino.inference_engine import IECore import time import numpy as np import cv2 as cv model_xml = "/home/bhc/BHC/model/intel/road-segmentation-
阅读全文
posted @ 2022-02-25 14:12
qiaokuankuan
阅读(83)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv def ssd_video_demo(): ie = IECore() for device in ie.avai
阅读全文
posted @ 2022-02-25 14:04
qiaokuankuan
阅读(50)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv attris = "is_male:F,has_bag:F,has_backpack:F,has_hat:F,ha
阅读全文
posted @ 2022-02-25 10:53
qiaokuankuan
阅读(61)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv def ssd_video_demo(): ie = IECore() for device in ie.avai
阅读全文
posted @ 2022-02-25 10:43
qiaokuankuan
阅读(45)
推荐(0)
摘要:
from openvino.inference_engine import IECore import time import cv2 as cv def ssd_video_demo(): ie = IECore() for device in ie.available_devices: prin
阅读全文
posted @ 2022-02-25 10:21
qiaokuankuan
阅读(42)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv # 人脸检测模型 model_xml = "/home/bhc/BHC/model/intel/face-dete
阅读全文
posted @ 2022-02-25 10:13
qiaokuankuan
阅读(72)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import time import cv2 as cv emotions = ['neutral', 'happy', 'sad', 'surprise', 'anger
阅读全文
posted @ 2022-02-25 09:43
qiaokuankuan
阅读(246)
推荐(0)
摘要:
from openvino.inference_engine import IECore import cv2 as cv def ssd_video_demo(): ie = IECore() for device in ie.available_devices: print(device) wi
阅读全文
posted @ 2022-02-24 16:41
qiaokuankuan
阅读(39)
推荐(0)
摘要:
1 from openvino.inference_engine import IECore 2 import numpy as np 3 import time 4 import cv2 as cv 5 6 # 图像识别 7 def ssd_image_demo(): 8 ie = IECore(
阅读全文
posted @ 2022-02-23 13:39
qiaokuankuan
阅读(126)
推荐(0)
摘要:
from openvino.inference_engine import IECore import numpy as np import cv2 as cv ie = IECore() #推理引擎 for device in ie.available_devices: #可用设备 print(d
阅读全文
posted @ 2022-02-23 11:29
qiaokuankuan
阅读(88)
推荐(0)
摘要:
import cv2 as cv import numpy as np # 显示图像 def image_io_demo(): image = cv.imread("001.jpg") # BGR h, w, c = image.shape print(h, w, c) #长、宽、颜色通道(1080
阅读全文
posted @ 2022-02-23 10:41
qiaokuankuan
阅读(61)
推荐(0)
摘要:
图像、视频读取显示及操作 图像分类 ssd对象检测 异步推理-SSD 人脸识别-脸部标志、表情、年龄/性别 头部姿态评估 行人检测 车辆检测 行人属性 道路分割 道路分割+车辆识别 文本轮廓检测 分割网络 retinanet_resnet模型
阅读全文
posted @ 2022-02-23 09:48
qiaokuankuan
阅读(159)
推荐(0)
摘要:
# 写csv文件 import csv with open('test1.csv', 'a+',newline='') as f: #a+ writer = csv.writer(f) writer.writerow([0,'11']) #写一行 someiterable=[[11,22],[33,
阅读全文
posted @ 2022-02-23 09:24
qiaokuankuan
阅读(47)
推荐(0)
摘要:
函数定义 参数说明 mode说明 # t 文本模式 (默认)。 # x 写模式,新建一个文件,如果该文件已存在则会报错。 # b 二进制模式。 # + 打开一个文件进行更新(可读可写)。 # U 通用换行模式(不推荐)。 # r 以只读方式打开文件。文件的指针将会放在文件的开头。这是默认模式。 #
阅读全文
posted @ 2022-02-23 09:12
qiaokuankuan
阅读(167)
推荐(0)
摘要:
plot() 函数添加格式字符串来显示离散值 # 线样式 '-' 实线样式 '--' 短横线样式 '-.' 点划线样式 ':' 虚线样式 '.' 点标记 ',' 像素标记 'o' 圆标记 'v' 倒三角标记 '^' 正三角标记 '<' 左三角标记 '>' 右三角标记 '1' 下箭头标记 '2' 上箭
阅读全文
posted @ 2022-02-22 16:36
qiaokuankuan
阅读(57)
推荐(0)
摘要:
# NumPy 线性代数 # dot 两个数组的点积,即元素对应相乘。 # vdot 两个向量的点积 # inner 两个数组的内积 # matmul 两个数组的矩阵积 # determinant 数组的行列式 # solve 求解线性矩阵方程 # inv 计算矩阵的乘法逆矩阵
阅读全文
posted @ 2022-02-22 16:24
qiaokuankuan
阅读(34)
推荐(0)
摘要:
# NumPy 字符串函数 # add() 对两个数组的逐个字符串元素进行连接 # multiply() 返回按元素多重连接后的字符串 # center() 居中字符串 # capitalize() 将字符串第一个字母转换为大写 # title() 将字符串的每个单词的第一个字母转换为大写 # lo
阅读全文
posted @ 2022-02-22 16:19
qiaokuankuan
阅读(54)
推荐(0)
摘要:
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数。 worker_processes 8; #全局错误日志定义类型,[ debug | info | notice |
阅读全文
posted @ 2022-02-22 15:17
qiaokuankuan
阅读(43)
推荐(0)
摘要:
配置国内镜像-淘宝镜像 yarn config set registry https://registry.npm.taobao.org 设置代理 yarn config set proxy http://username:password@server:port yarn confit set h
阅读全文
posted @ 2022-02-22 14:44
qiaokuankuan
阅读(1346)
推荐(0)
摘要:
# Ndarray 对象 import numpy as np a = np.array([1,2,3]) #一维 a = np.array([[1, 2], [3, 4]]) #多维 a = np.array([1, 2, 3, 4, 5], ndmin = 2) #最小维度 a = np.arr
阅读全文
posted @ 2022-02-21 16:56
qiaokuankuan
阅读(29)
推荐(0)
摘要:
numpy基础 numpy数组操作 numpy位运算函数、字符串函数、数学函数、算数函数、排序筛选函数 numpy线性代数 NumPy Matplotlib.pyplot
阅读全文
posted @ 2022-02-21 16:38
qiaokuankuan
阅读(15)
推荐(0)
摘要:
# 修改数组形状 # reshape 不改变数据的条件下修改形状 # flat 数组元素迭代器 # flatten 返回一份数组拷贝,对拷贝所做的修改不会影响原始数组 # ravel 返回展开数组 a = np.arange(8) a=a.reshape(2,4) for element in a.
阅读全文
posted @ 2022-02-21 16:37
qiaokuankuan
阅读(57)
推荐(0)
摘要:
import pandas as pd import numpy as np pd.options.display.max_columns = 40 movie = pd.read_csv('data/movie.csv') two_cloumn = movie[['序号', '名称']] #选取多
阅读全文
posted @ 2022-02-21 11:57
qiaokuankuan
阅读(142)
推荐(0)
摘要:
pandas基础 DataFrame基本操作
阅读全文
posted @ 2022-02-21 09:54
qiaokuankuan
阅读(22)
推荐(0)
posted @ 2022-02-18 16:52
qiaokuankuan
阅读(39)
推荐(0)
摘要:
# TensorFlow Serving部署 # 服务器端,安装TensorFlow Serving tensorflow_model_server \ --rest_api_port=端口号(如8501) \ --model_name=模型名 \ --model_base_path="SavedM
阅读全文
posted @ 2022-02-18 11:20
qiaokuankuan
阅读(90)
推荐(0)
摘要:
# TensorFlow 模型导出 mport tensorflow as tf from zh.model.utils import MNISTLoader num_epochs = 1 batch_size = 50 learning_rate = 0.001 model = tf.keras.
阅读全文
posted @ 2022-02-18 11:10
qiaokuankuan
阅读(205)
推荐(0)
摘要:
#tf.function :图执行模式 # 基础使用 import tensorflow as tf import time from zh.model.mnist.cnn import CNN from zh.model.utils import MNISTLoader num_batches =
阅读全文
posted @ 2022-02-18 11:01
qiaokuankuan
阅读(33)
推荐(0)
摘要:
# TFRecord 数据集存储格式 import tensorflow as tf import os data_dir = 'C:/datasets/cats_vs_dogs' train_cats_dir = data_dir + '/train/cats/' train_dogs_dir =
阅读全文
posted @ 2022-02-18 10:52
qiaokuankuan
阅读(29)
推荐(0)
摘要:
实例 import tensorflow as tf import os num_epochs = 10 batch_size = 32 learning_rate = 0.001 data_dir = 'C:/datasets/cats_vs_dogs' train_cats_dir = data
阅读全文
posted @ 2022-02-17 16:52
qiaokuankuan
阅读(58)
推荐(0)
摘要:
简单粗暴的tensorflow-模型与层 简单粗暴的tensorflow-多层感知机(MLP) 简单粗暴的tensorflow-CNN 简单粗暴的tensorflow-RNN 简单粗暴的tensorflow-Keras Pipeline 简单粗暴的tensorflow-自定义层、损失函数、评估指标
阅读全文
posted @ 2022-02-17 16:05
qiaokuankuan
阅读(35)
推荐(0)
摘要:
# tensorboard可视化参数 summary_writer = tf.summary.create_file_writer('./tensorboard') #存放 TensorBoard 的记录文件 # 开始模型训练 for batch_index in range(num_batches
阅读全文
posted @ 2022-02-17 15:33
qiaokuankuan
阅读(109)
推荐(0)
摘要:
# train.py 模型训练阶段 model = MyModel() # 实例化Checkpoint,指定保存对象为model(如果需要保存Optimizer的参数也可加入) checkpoint = tf.train.Checkpoint(myModel=model) # ...(模型训练代码)
阅读全文
posted @ 2022-02-17 15:22
qiaokuankuan
阅读(59)
推荐(0)
摘要:
# 自定义层 y_pred=w*x+b class LinearLayer(tf.keras.layers.Layer): def __init__(self, units): super().__init__() self.units = units def build(self, input_s
阅读全文
posted @ 2022-02-17 15:09
qiaokuankuan
阅读(70)
推荐(0)
摘要:
# Keras Pipeline model = tf.keras.models.Sequential([ #模型定义 tf.keras.layers.Flatten(), tf.keras.layers.Dense(100, activation=tf.nn.relu), tf.keras.lay
阅读全文
posted @ 2022-02-17 15:01
qiaokuankuan
阅读(60)
推荐(0)
摘要:
# 数据集 class DataLoader(): def __init__(self): path = tf.keras.utils.get_file('nietzsche.txt', origin='https://s3.amazonaws.com/text-datasets/nietzsche
阅读全文
posted @ 2022-02-17 14:39
qiaokuankuan
阅读(44)
推荐(0)
摘要:
# CNN模型定义 class CNN(tf.keras.Model): def __init__(self): super().__init__() self.conv1 = tf.keras.layers.Conv2D( #卷积层定义 filters=32, # 卷积层神经元(卷积核)数目 ke
阅读全文
posted @ 2022-02-17 14:01
qiaokuankuan
阅读(44)
推荐(0)
摘要:
# 数据集 class MNISTLoader(): def __init__(self): mnist = tf.keras.datasets.mnist (self.train_data, self.train_label), (self.test_data, self.test_label)
阅读全文
posted @ 2022-02-17 13:49
qiaokuankuan
阅读(113)
推荐(0)
摘要:
#y_pred = a * X + b进行模型建立 import tensorflow as tf X = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) y = tf.constant([[10.0], [20.0]]) class Linear(t
阅读全文
posted @ 2022-02-17 13:35
qiaokuankuan
阅读(42)
推荐(0)