最近一段时间做图像挖掘的3个经验mark一下【人脸、全图、形体】

【数字图像处理】基于SeetaFace2的人脸检测 (一)Seetaface2 基本概念 1.1 图像 1.1.1 结构定义 作为图像处理的C++库,图像存储是一个基本数据结构。 接口中图像对象为SeetaImageData。 struct SeetaImageData { int width; // 图像宽度 int height; // 图像高度 int channels; // 图像通道 unsigned char *data; // 图像数据 }; 这里要说明的是data的存储格式,其存储的是 阅读详情
1.判断一个人颜值好看不好看,截取“人脸部分”去训练模型,比整图要好。(这里贴下seetaface取人脸特征的脚本,部分函数是小伙伴写的)

关键词:颜值,人脸部分

import os
os.environ["CUDA_VISIBLE_DEVICES"]="-1" #不使用gpu
import tensorflow as tf

#配置seetaface
sys.path.append('./seetaface')
from seetaface.api import *
init_mask = FACE_DETECT|LANDMARKER5|FACE_GENDER|LANDMARKER68|LANDMARKER_MASK|FACERECOGNITION
stf = SeetaFace(init_mask)
stf.SetProperty(DetectProperty.PROPERTY_MIN_FACE_SIZE, 40)
stf.SetProperty(DetectProperty.PROPERTY_THRESHOLD, 0.9)

#配置颜值打分的模型
mm = keras.models.load_model("./nn_model/0001xxx")
def extract_feature(img):
    '''
    返回最大人脸的seetaface结果
    '''
    faces = stf.Detect(img)
    if faces.size < 1:
        return np.array([]), '', 0.0
    max_face_index = 0
    max_face_size = faces.data[0].pos.width * faces.data[0].pos.height
    for i in range(faces.size):
        tmp = faces.data[i].pos.width * faces.data[i].pos.height
        if tmp > max_face_size:
            max_face_size = tmp
            max_face_index = i
    mark5 = stf.mark5(img, faces.data[max_face_index].pos)
    feature = stf.Extract(img, mark5)
    gender = stf.PredictGenderWithCrop(img, mark5)
    face_ratio = faces.data[max_face_index].pos.width * faces.data[max_face_index].pos.height / (img.shape[0] * img.shape[1])
    #rect = faces.data[max_face_index].pos
    #face_img = img[rect.y:rect.y + rect.height, rect.x:rect.x + rect.width]
    #feature = stf.ExtractCroppedFace(face_img)
    return np.array(list(feature)), 'male' if gender == 0 else 'female', face_ratio

def variance_of_laplacian(image):
    '''
    计算图像的laplacian响应的方差,反应图片的清晰程度
    '''
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    return cv2.Laplacian(gray, cv2.CV_64F).var()
    
def img2beauty(img):
    img = np.uint8(img)
    img_bgr = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)#进来的rgb转bgr
    fea, pred_gender, face_ratio = extract_feature(img_bgr)
    fm = variance_of_laplacian(img_bgr)
    if fea.size != 0 and face_ratio > 0.02:
        score = round(float(mm.predict(fea.reshape(-1, 1024))[0]), 3)
        return pred_gender, face_ratio, score, fm
    else:
        return "-",face_ratio,0.0,fm
2.照片的“整图”在判断场景之类的比较好用。

关键词:整图,人物环境

比如人在健身房、卫生间、电梯间、户外山水、绿地、车里、街景、戴墨镜、戴口罩、带帽子等。(这里贴一下用看下imagenet倒数第二层2048维,pca后,聚类看效果的脚本)

import os
os.environ['CUDA_VISIBLE_DEVICES']='2'
mem_limit = 10000
import tensorflow as tf
physical_devices = tf.config.experimental.list_physical_devices('GPU')
tf.config.experimental.set_virtual_device_configuration(physical_devices[0],[tf.config.experimental.VirtualDeviceConfiguration(memory_limit=mem_limit)])

from keras.applications.resnet50 import ResNet50
from keras.preprocessing import image
from keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np

#====1.看下imagenet倒数第二层2048维的效果
model = ResNet50(weights='imagenet')

from keras.models import Model
base_model = model
model_1 = Model(inputs=base_model.input, outputs=base_model.get_layer('avg_pool').output)

def path_to_array(img_path):
    img = image.load_img(img_path, target_size=(224, 224))
    x = image.img_to_array(img)
    x = np.expand_dims(x, axis=0)
    x = preprocess_input(x)
    preds = model_1.predict(x)
    return preds[0]

path_dir = "/var/data/xxx/"
list_file = os.listdir(path_dir)

res_file = "/var/data/xxx_txt"
with open(res_file, "w+") as res_f:
    for x in list_file:
        img_path = path_dir + x
        res  = x + "\t" + str(path_to_array(img_path).tolist()) + "\n"
        res_f.write(res)

#====2.得到了2048维度,pca加聚类看下效果
import numpy as np
with open("/var/data/xxx_txt", "r+") as f:
    res_lines = f.readlines()

# user_vec = [eval(item.split("\t")[1].strip("\n")) for item in res_lines]
user_vec = []
user_id = []
for line in res_lines:
    items = line.split("\t")
    feav = [float(x) for x in items[2].strip("\n").split(",")]
    uid = items[0]
    if feav != []:
        user_vec.append(feav)
        user_id.append(uid)
user_nparr = np.array(user_vec)

from sklearn.decomposition import PCA
pca = PCA(n_components=100)
pca.fit(user_nparr)
print(pca.explained_variance_ratio_)
print(pca.explained_variance_)

user_nparr_new = pca.transform(user_nparr)
from sklearn.cluster import KMeans
model = KMeans(n_clusters=50)
model.fit(user_nparr_new)
#model.fit(user_nparr)
yhat = model.predict(user_nparr_new)
#yhat = model.predict(user_nparr)

#======3.显示图片
import matplotlib.pyplot as plt # plt 用于显示图片
import matplotlib.image as mpimg # mpimg 用于读取图片

#返回每一个簇的前35张图片plt
def index_img(i):
    index_i = np.where(yhat==i)[0]
    user_i = [user_id[id] for id in index_i]
    print(user_i[0])
    user_pic = user_i[0:35]
    N=6
    M=6
    plt.figure(figsize=(30, 30))
    for i in range(len(user_pic)):
        path="/var/data/xxx/" + user_pic[i] + ".jpg"
        img = plt.imread(path)
        plt.subplot(N,M,i+1)#表示第i张图片,下标只能从1开始,不能从0,
        plt.imshow(img)
        #下面两行是消除每张图片自己单独的横纵坐标,不然每张图片会有单独的横纵坐标,影响美观
        plt.xticks([])
        plt.yticks([])
    plt.show()
for i in range(50):
    print(i)
    index_img(i)

3.照片的“人脸部分”在体型胖瘦还算比较好用,整图不行,这里代码就不贴了,参见第一部分

但是不知道利用姿态估计提取特征好不好使,还没试

关键词:人脸部分,体型

SeetaFace 开源的人脸识别代码 最近在做一个人脸识别(人脸对比)的项目,所以查找了一些人脸识别的相关算法。刚开始考虑的是dlib,但没有折腾出来(最新的版本需要使用2015编译?)。在我十分纠结的时候,无意中查到了SeetaFace这个开源项目,并成功的运用起来了,十分兴奋,而且SeetaFace还是个国产货,更加感动,感谢开源者的无私奉献。简介SeetaFace Engine是一个开源的人脸识别引擎(官网:Github),由中科 阅读详情

相关推荐

图挖掘算法总结

一. 环境准备 neo4j python包:pip3 install neo4j 和pip3 install py2neo(这里的py2neo 是python对Neo4j的驱动库,同时这里必须是py2neo版本必须是最新版4,不然会报连接数据库的错误,老版本不兼容的问题) Java8:这里由于neo4j 数据库是依赖于java8的。 Neo4j_3.5.14:这里由于neo4j 在中国地区下载慢,并且neo4j3.X版本才支持java8,到4.0版本就是需要java11了。 Neo4j_Desktop:ne

u013250861的博客 819

seetaface6之画出人脸位置

人脸跟踪模块 FaceTracker 人脸跟踪模块定位出图片中不同人脸的位置。利用返回的位置信息,使用opencv在图片中画出人脸位置方框 结果结构体 struct SeetaTrackingFaceInfo { SeetaRect pos; float score; //识别分数 int frame_no;//内部调试保留字段,一般不使用 int PID; //区分不同人脸 int step; //内部调试保留字段,一般不使用 };struct See...

weixin_43777852的博客 925

FreeModbus V1.6主机模式实战:如何在STM32上实现Modbus RTU主从一体通信

本文详细介绍了如何在STM32平台上利用FreeModbus V1.6开源协议栈实现Modbus RTU主从一体通信。文章深入剖析了V1.6版本主机模式的架构设计,提供了从硬件配置、串口与定时器移植到FreeRTOS操作系统适配的完整实战指南,并分享了数据缓冲区管理、多线程协同及高级调试技巧,为构建稳定可靠的工业通信网关提供了系统化解决方案。

weixin_29194255的博客 373

Anaconad+Ubuntu16.4下tensorflow+SSD人脸检测 模型测试

目录一、建立测试脚本二、测试模型 一、建立测试脚本 打开tensorfloe提供的脚本 research/object_detection/object_detection_tutorial.ipynb 根据所给的文档,建立适配自己的文件 # Time : 2020/12/9 下午7:00 # Author : gqw # Email:wgqiang98@163.com import sys import numpy as np import tensorflow as tf import cv2 imp

欢迎来到我的博客空间! 440

微信聊天记录解密,必须是root的手机

手机上安装x-plore软件,将/data/data目录的相关EnMicroMsg.db auth_info_key_prefs.xml拷贝到/storge/emulated/0目录后才可以拷贝到电脑。路径:/data/data/com.tencent.mm/shared_prefs/auth_info_key_prefs.xml。但是是加密过的 需要解密 解密密码生成规则是手机IMEI+微信UIN md5(32位小写)后的前7位。安卓手机要root测试版本微信要7或者8版本都可以。选择message表。

venus60的专栏 1007

从Live2D到Unreal Engine:2D与3D虚拟数字人核心技术实现路径解析

本文深入解析了从Live2D到Unreal Engine的2D与3D虚拟数字人核心技术实现路径,涵盖技术选型、制作流程与优化技巧。通过对比2D骨骼动画与3D建模渲染的差异,结合实战案例,帮助开发者根据项目需求选择合适方案,提升虚拟数字人的交互体验与视觉效果。

weixin_30379531的博客 149

提取图像特征方法总结 是那种很传统的方法~

本文对计算机视觉传统方法中的一些特征提取方法进行了总结,主要包括有:SIFT(尺度不变特征变换)、HOG(方向梯度直方图)、SURF、ORB、LBP、HAAR。

xian0710830114的专栏 1万+

【AI】使用Cursor和AI编程生成的VUE前端框架

本项目是一个基于VUE.js的前端框架,结合了登录、图形验证码、权限校验等常用功能模块。通过与Cursor AI交互生成的代码,展示了AI在编程中的潜力与效率。

清欢渡的博客 9862

图像数据挖掘:特征提取与识别

1.背景介绍 图像数据挖掘是一种利用计算机科学技术对图像数据进行分析和挖掘的方法,主要包括图像处理、图像分析、图像识别等方面。图像数据挖掘的主要目标是从大量图像数据中发现有价值的信息和知识,以解决实际问题。图像数据挖掘的核心技术是特征提取与识别,即从图像数据中提取出有意义的特征,并根据这些特征进行图像的分类和识别。 图像数据挖掘在现实生活中有广泛的应用,如人脸识别、车牌识别、图像分类、目标检测...

AI天才研究院 2597

【YOLOv8系列】在Windows上离线搭建YOLOv8运行环境

我们都知道,通过 pip安装YOLOv8是非常方便的,但是有时候网络环境受到限制,比如公司的工作站(无法连接网络)或者机房的教学机器等等,只能通过离线的方式安装YOLOv8;今天就来记录一下离线搭建YOLOv8运行环境的过程。并记录了遇到的问题及解决过程。

AnChenliang_1002的博客 2005

vue3 - element-plus表格组件el-table实现鼠标拖曳排序功能,vue3 Table表格拖拽排序,表格每行使用鼠标拖动进行排序功能,表格拖拽排序实现(详细示例代码,一键复制开箱即用

vue3,elementPlus,el-table,typescript,表格组件,Table表格,表格拖动排序,表格拖曳排序,鼠标拖拽表格进行排序功能,elementplus表格如何实现拖动每行进行排序操作,表格拖动改变顺序,鼠标拖曳,表格内的数据项拖拽排序,vue3如何实现element-Plus表格组件进行表格内的数据项拖拽排序,列表拖拽排序效果,实现table动态拖拽,鼠标拖着排序,vue3 element Plus 表格拖曳拖动拖拽 排序,el-table拖拽排序实现,表格内容拖拽重新排序,树形表

✅ 精选推荐文章 1万+

图挖掘算法-gSpan

原文链接:https://blog.csdn.net/qq_41653753/article/details/79112436 原文链接:https://blog.csdn.net/weidai00/article/details/85245217 一、基本概念 1、图挖掘 近年来,图挖掘作为,数据挖掘的重要组成部分引起了社会各界的极大关注。图挖掘(Graph Mining)是指利用图模型从海量数据中发现和提起有用知识和信息的过程。通过图挖掘所获取的知识和信息已广泛应用于各种领域,如商务管理、市场分

lili安的博客 6040

浅谈银行内部户治理

为避免该问题的发生,对内部户入账类交易,或内部户是可透支的账户(如系统间往来),可考虑通过异步方式更新账户余额(当然,根本上还是要考虑银行业务量的实际,异步消息接口很多时候没有同步接口方便),另外,在进行内部户余额更新时,可以通过定时的借贷方发生额轧差的方式,将多次的锁请求,简化为一次(当然,发生额明细本身在加工账户交易历史时,是不能汇总的)。内部户在银行系统中,属于业务属性较少,实现相对简单,原理也很容易讲清的系统,但管中窥豹,越是基础的东西,越能看出一家银行业务、内控的专业程度。

银行信息系统应用架构详解 789

SeetaFace6人脸检测C++代码实现Demo

人脸检测,就是输入待检测的图片,输出检测到的每个人脸位置,用矩形表示。

mickey2007的博客 1715

无人机:DJI Matrice 600 Pro_(8).DJI_Matrice_600_Pro_负载能力

在一些高级应用场景中,可能需要自定义开发负载设备。

zhubeibei168的博客 1341

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

我的机器学习-part(2020-2)【tf-server】

我的机器学习part(记录2020一次实践)0.引言1.环境配置:centos环境2.模型训练:resnet50、dt3.服务部署:docker、tf-server、tornado5.结语 0.引言 什么炫酷的模型都是手段而已,解决问题才是目的。 国庆加班,做了个紧急项目,今天主要是记录机器学习在解决实际问题中的这一次经历。 主要部分: (1)环境配置:这部分主要是同事来做,自己家里的Ubuntu是自己装的,公司的centos安装不一样,此处时间紧,分工配合,同事主配环境,我主作数据集、训练模型、搭建部分服

就俩字,咱们要做精通,不做熟悉 718

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

SeetaFace6使用详细教程(一) 人脸检测--戴着口罩也可以检测

点击左上方“OpenCV与AI深度学习”,选择加"星标"或“置顶” 重磅干货,第一时间送达! 导读 本文主要介绍SeetaFace6开源人脸识别库的人脸检测模块使用步骤。 背景介绍 SeetaFace是中科视拓开发并开源的人脸识别库,笔者以前用过人脸识别功能,相较于OpenCV和一些开源库识别准确率高,且只需一张或数张人脸样本。3月31日SeetaFace已更新到v6版本即SeetaFace6,此次开放版包含了一直以来人脸识别的基本部分,如人脸检测、关键点定位、人脸识别。同时增加了活体检测、质量评

Color Space的博客 7242

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

图像挖掘课程笔记-第一章:了解机器视觉

图像挖掘是一种从大量图像中自动提取有用信息、知识或模式的技术,它融合了图像处理、机器学习、数据库、人工智能、数据挖掘等多个领域的内容。数字图像是把现实世界中的连续图像通过**采样(Sampling)和量化(Quantization)**过程转为离散形式。采样:将连续图像空间划分为有限数量的像素点(如每英寸多少像素)量化:将每个像素的颜色或灰度值转换为固定的数字值(如8位表示256种灰度)数字图像实际上就是一个二维矩阵,每个矩阵单元(像素)记录颜色或灰度值。

2301_80136323的博客 980

数据挖掘与图像挖掘:计算机视觉的创新

1.背景介绍 计算机视觉是人工智能领域的一个重要分支,它涉及到计算机对图像和视频数据进行分析和理解。数据挖掘则是数据科学领域的一个核心技术,它涉及到从大量数据中发现隐藏的模式和规律。随着数据量的增加,数据挖掘技术在计算机视觉领域得到了广泛应用,以提高计算机视觉系统的准确性和效率。 在本文中,我们将讨论数据挖掘与图像挖掘的关系,以及它们在计算机视觉领域的应用。我们将介绍一些核心概念和算法,并通过...

AI天才研究院 1387

SeetaFace编译使用 中科院人脸识别SDK

中科院人脸识别平台: 1:编译face_detector——dll工程 步骤: 1:文件——新建——项目——win32控制台程序——dll——空工程。 2:添加cpp文件,除了TEST文件下 3:属性C/C++——附加包含目录——添加include中的文件 4:属性C/C++——预处理器——添加“SEETA_

shakevincent的博客 1万+

最新人脸识别 seetaface6 python接口

接口地址: seetaFace6Python

qq_32224529的博客 2949

拍案叫绝的情报分析之图片挖掘

*转自公众号“丁爸”*作者:黄舜龙本篇文章的内容均是广西平桂区检察院的黄舜龙老师的实操案例,相信大家看了以后一定又会有新的启迪和收获。案例一、找出该图拍摄地址和楼层。待挖掘图片:挖掘思路及过程:1、图片放大,可以模糊看到大巴车侧面有“北汽集团”几个字,通过图片比对后确认,将搜索范围确定在北京。2、通过远处大楼可以发现奇葩造型,搜索“北京楼顶违章“,图片比对发现相识度极高。获得人济山庄B座信息。3、...

xiaoi123的博客 4204

SeetaFace编译使用 中科院人脸识别SDK(转)

原文地址:https://blog.csdn.net/shakevincent/article/details/52673533 中科院人脸识别平台:  1:编译face_detector——dll工程  步骤: 1:文件——新建——项目——win32控制台程序——dll——空工程。  2:添加cpp文件,除了TEST文件下  3:属性C/C++——附加包含目录——添加include中的文件  ...

zhang43211234的博客 1691

C# 超简单的离线人脸识别库。( 基于 SeetaFace6 )

GitHub - ViewFaceCore/ViewFaceCore: C# 超简单的离线人脸识别库。( 基于 SeetaFace6 )

.NET 人工智能实践 1816

利用tensorflow实现人脸验证(face verification)的过程

首先我们应该知道何为人脸验证:      它的输入是两个人脸特征,通过人脸比对获得两个人脸特征的相似度,通过与预设的阈值比较来验证这两个人脸特征是否属于同一人(即相似度大于阈值,为同一人;小于阈值为不同)提取人脸特征模型:      模型参考论文:...

qq_29023939的博客 5642

TensorFlow框架做实时人脸识别小项目(一)

人脸识别是深度学习最有价值也是最成熟的的应用之一。在研究环境下,人脸识别已经赶上甚至超过了人工识别的精度。一般来说,一个完整的人脸识别项目会包括两大部分:人脸检测与人脸识别。下面就我近期自己练习写的一个“粗糙”的人脸识别小项目讲起,也算是做一个学习记录。首先 ,整个项目的框架包括四个主要的部分:(1)利用opencv从图像传感器处(比如电脑摄像头)实时的读入视频帧;(2)使用mtcnn网络做人脸检...

Goerge_L的博客 2万+
上一篇: 很久以前写的Xgboost有一些没写好,现在填坑_part1【xgboost是gbdt升级版】
下一篇: gbdt的一个笔记【“梯度提升”是一个通用的框架,GBDT是其中一员】
滚滚的纸盒子
博客等级 码龄10年 136粉丝 31原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值