使用Kaldi CVTE v2模型进行语音识别测试
目录
- 初始文件
- data/wav/chat001
- data/chat001/test
- 检查初始文件
- 自动解决错误
- 执行解码和查看WER
- run脚本
- Step1 - 生成测试数据的特征
- Step2 - 解码
- 查看解码信息
- 最优WER结果
- 其他日志
- 解码命令解读
- 参考阅读
初始文件
首先安装 kaldi,参考官方文档
然后,下载 http://kaldi-asr.org/models/m2 并解压到egs/cvte,保证文件 kaldi/egs/cvte/s5 文件存在。
以下介绍如何添加新的语音文件并进行识别测试。
data/wav/chat001
存储语音文件
data/wav/chat001
├── 001.wav
└── 002.wav
语音文件的录制,参考 语音处理常用工具集,命令
语音文件格式
$ sox --info data/wav/chat001/001.wavInput File : 'data/wav/chat001/001.wav'
Channels : 1
Sample Rate : 16000
Precision : 16-bit
Duration : 00:00:06.25 = 100000 samples ~ 468.75 CDDA sectors
File Size : 200k
Bit Rate : 256k
Sample Encoding: 16-bit Signed Integer PCM
data/chat001/test
cd egs/cvte/s5
data/chat001/test
├── conf
│ └── fbank.conf
├── frame_shift
├── spk2utt
├── text
├── utt2spk
└── wav.scp
其中,conf
,frame_shift
的文件拷贝自 data/fbank/test
wav.scp
, 语音文件的列表
CHAT001_20200801_001 data/wav/chat001/001.wav
CHAT001_20200801_002 data/wav/chat001/002.wav
第一列和第二列之间的空格是 tab,不能使用4个空格替换,下同
text
, 语音文件的对应文本
CHAT001_20200801_001 上海 浦东机场 入境 防 输入 全 闭环 管理
CHAT001_20200801_002 北京 地铁 宣武门 站 综合 改造 新增 换乘 通道
文本中,第二列是由空格分割的单词,词汇表在 exp/chain/tdnn/graph/words.txt
对应的语素文件 exp/chain/tdnn/graph/phones.txt
词汇表和语素文件的关系 exp/chain/tdnn/graph/phones/align_lexicon.int
以上,比如 149, 133 即语素,在exp/chain/tdnn/graph/phones.txt中定义。
spk2utt
, utt2spk
说话人和语音文件的映射关系。
$ cat data/chat001/test/utt2spk
CHAT001_20200801_001 CHAT001_20200801_001
CHAT001_20200801_002 CHAT001_20200801_002$ cat data/chat001/test/spk2utt
CHAT001_20200801_001 CHAT001_20200801_001
CHAT001_20200801_002 CHAT001_20200801_002
以上,使用了 文件的索引ID作为说话人,在kaldi中,说话人是一个宽泛的概念,理想情况是为每个独立的“发音人”设定一个ID。
检查初始文件
utils/validate_data_dir.sh data/chat001/test
自动解决错误
utils/fix_data_dir.sh data/chat001/test
自动解决错误会考虑完成 sort等。
执行解码和查看WER
run脚本
kaldi/egs/cvte/s5/run_chat001.sh
#!/bin/bash. ./cmd.sh
. ./path.sh# step 1: generate fbank features
obj_dir=data/chat001for x in test; dorm -rf fbank/$xmkdir -p fbank/$x# compute fbank without pitchsteps/make_fbank.sh --nj 1 --cmd "run.pl" $obj_dir/$x exp/make_fbank/$x fbank/$x || exit 1;# compute cmvnsteps/compute_cmvn_stats.sh $obj_dir/$x exp/fbank_cmvn/$x fbank/$x || exit 1;
done# #step 2: offline-decoding
test_data=data/chat001/test
dir=exp/chain/tdnnsteps/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 \--nj 1 --num-threads 1 \--cmd "$decode_cmd" --iter final \--frames-per-chunk 50 \$dir/graph $test_data $dir/decode_chat001_test# # note: the model is trained using "apply-cmvn-online",
# # so you can modify the corresponding code in steps/nnet3/decode.sh to obtain the best performance,
# # but if you directly steps/nnet3/decode.sh,
# # the performance is also good, but a little poor than the "apply-cmvn-online" method.
该脚本执行中分为一下几步:
Step1 - 生成测试数据的特征
$ tree data/chat001/test
data/chat001/test
├── cmvn.scp
├── conf
│ └── fbank.conf
├── feats.scp
├── frame_shift
├── spk2utt
├── split1
│ └── 1
│ ├── cmvn.scp
│ ├── feats.scp
│ ├── spk2utt
│ ├── text
│ ├── utt2dur
│ ├── utt2num_frames
│ ├── utt2spk
│ └── wav.scp
├── text
├── utt2dur
├── utt2num_frames
├── utt2spk
└── wav.scp
feats.scp
, utt2dur
, utt2num_frames
都是 make_fbank.sh
生成,也会在 fbank/test
下生成其他文件。
cmvn.scp
, 是归一化文件,steps/compute_cmvn_stats.sh
生成。
splitN
文件夹是在大量数据时,程序并发执行,然后合并,形成的一个个自文件夹。
fbank/test
目录
fbank/test
├── cmvn_test.ark
├── cmvn_test.scp
├── raw_fbank_test.1.ark
└── raw_fbank_test.1.scp
exp/make_fbank
目录
exp/make_fbank
└── test├── make_fbank_test.1.log└── wav.1.scp
Step2 - 解码
steps/nnet3/decode.sh --acwt 1.0 --post-decode-acwt 10.0 \--nj 1 --num-threads 1 \--cmd "$decode_cmd" --iter final \--frames-per-chunk 50 \$dir/graph $test_data $dir/decode_chat001_test
解码同样会计算WER,可以设置输出 nBest.
查看解码信息
cat exp/chain/tdnn/decode_chat001_test/log/decode.1.log
最优WER结果
$ cat exp/chain/tdnn/decode_chat001_test/scoring_kaldi/best_cer
%WER 2.94 [ 1 / 34, 0 ins, 0 del, 1 sub ] exp/chain/tdnn/decode_chat001_test/cer_7_0.0
这次测试一共34个单词,和识别结果的编辑距离0插入,0删除,1个替换。
但是该替换单词为"闭环"在发音词典里不存在,识别结果为“闭”“环”,两个字,其实也可以认为识别准确。
其他日志
WER nBest输出 exp/chain/tdnn/decode_chat001_test/scoring_kaldi
解码命令解读
在解码阶段,执行的脚本如下:
# nnet3-latgen-faster --frame-subsampling-factor=3 --frames-per-chunk=50 --extra-left-context=0 --extra-right-context=0 --extra-left-context-initial=-1 --extra-right-context-final=-1 --minimize=false --max-active=7000 --min-active=200 --beam=15.0 --lattice-beam=8.0 --acoustic-scale=1.0 --allow-partial=true --word-symbol-table=exp/chain/tdnn/graph/words.txt exp/chain/tdnn/final.mdl exp/chain/tdnn/graph/HCLG.fst "ark,s,cs:apply-cmvn --norm-means=true --norm-vars=false --utt2spk=ark:data/chat001/test/split1/1/utt2spk scp:data/chat001/test/split1/1/cmvn.scp scp:data/chat001/test/split1/1/feats.scp ark:- |" "ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:- | gzip -c >exp/chain/tdnn/decode_chat001_test/lat.1.gz"
# Started at Sat Aug 1 16:21:14 CST 2020
#
nnet3-latgen-faster --frame-subsampling-factor=3 --frames-per-chunk=50 --extra-left-context=0 --extra-right-context=0 --extra-left-context-initial=-1 --extra-right-context-final=-1 --minimize=false --max-active=7000 --min-active=200 --beam=15.0 --lattice-beam=8.0 --acoustic-scale=1.0 --allow-partial=true --word-symbol-table=exp/chain/tdnn/graph/words.txt exp/chain/tdnn/final.mdl exp/chain/tdnn/graph/HCLG.fst 'ark,s,cs:apply-cmvn --norm-means=true --norm-vars=false --utt2spk=ark:data/chat001/test/split1/1/utt2spk scp:data/chat001/test/split1/1/cmvn.scp scp:data/chat001/test/split1/1/feats.scp ark:- |' 'ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:- | gzip -c >exp/chain/tdnn/decode_chat001_test/lat.1.gz'
LOG (nnet3-latgen-faster[5.5.765-f88d5]:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (nnet3-latgen-faster[5.5.765-f88d5]:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (nnet3-latgen-faster[5.5.765-f88d5]:Collapse():nnet-utils.cc:1472) Added 1 components, removed 2
lattice-scale --acoustic-scale=10.0 ark:- ark:-
apply-cmvn --norm-means=true --norm-vars=false --utt2spk=ark:data/chat001/test/split1/1/utt2spk scp:data/chat001/test/split1/1/cmvn.scp scp:data/chat001/test/split1/1/feats.scp ark:-
LOG (nnet3-latgen-faster[5.5.765-f88d5]:CheckAndFixConfigs():nnet-am-decodable-simple.cc:294) Increasing --frames-per-chunk from 50 to 51 to make it a multiple of --frame-subsampling-factor=3
CHAT001_20200801_001 上海 浦东机场 入境 房 输入 全 闭 环 管理
LOG (nnet3-latgen-faster[5.5.765-f88d5]:DecodeUtteranceLatticeFaster():decoder-wrappers.cc:375) Log-like per frame for utterance CHAT001_20200801_001 is 2.19918 over 208 frames.
LOG (apply-cmvn[5.5.765-f88d5]:main():apply-cmvn.cc:162) Applied cepstral mean normalization to 2 utterances, errors on 0
CHAT001_20200801_002 北京 地铁 宣武门 站 综合 改造 新增 换乘 通道
LOG (nnet3-latgen-faster[5.5.765-f88d5]:DecodeUtteranceLatticeFaster():decoder-wrappers.cc:375) Log-like per frame for utterance CHAT001_20200801_002 is 2.19511 over 333 frames.
LOG (nnet3-latgen-faster[5.5.765-f88d5]:main():nnet3-latgen-faster.cc:256) Time taken 10.9386s: real-time factor assuming 100 frames/sec is 0.673972
LOG (nnet3-latgen-faster[5.5.765-f88d5]:main():nnet3-latgen-faster.cc:259) Done 2 utterances, failed for 0
LOG (nnet3-latgen-faster[5.5.765-f88d5]:main():nnet3-latgen-faster.cc:261) Overall log-likelihood per frame is 2.19668 over 541 frames.
LOG (nnet3-latgen-faster[5.5.765-f88d5]:~CachingOptimizingCompiler():nnet-optimize.cc:710) 0.00447 seconds taken in nnet3 compilation total (breakdown: 0.00219 compilation, 0.00168 optimization, 0 shortcut expansion, 0.000385 checking, 1.1e-05 computing indexes, 0.000209 misc.) + 0 I/O.
LOG (lattice-scale[5.5.765-f88d5]:main():lattice-scale.cc:107) Done 2 lattices.
# Accounting: time=53 threads=1
# Ended (code 0) at Sat Aug 1 16:22:07 CST 2020, elapsed time 53 seconds
我们详细看一下参数列表
nnet3-latgen-faster \--frame-subsampling-factor=3 \--frames-per-chunk=50 \--extra-left-context=0 \--extra-right-context=0 \--extra-left-context-initial=-1 \--extra-right-context-final=-1 \--minimize=false \--max-active=7000 \--min-active=200 \--beam=15.0 \--lattice-beam=8.0 \--acoustic-scale=1.0 \--allow-partial=true \--word-symbol-table=exp/chain/tdnn/graph/words.txt \exp/chain/tdnn/final.mdl \exp/chain/tdnn/graph/HCLG.fst \"ark,s,cs:apply-cmvn --norm-means=true --norm-vars=false --utt2spk=ark:data/chat001/test/split1/1/utt2spk scp:data/chat001/test/split1/1/cmvn.scp scp:data/chat001/test/split1/1/feats.scp ark:- |" \"ark:|lattice-scale --acoustic-scale=10.0 ark:- ark:- | gzip -c >exp/chain/tdnn/decode_chat001_test/lat.1.gz"
nnet3-latgen-faster
命令:
基于解码器LatticeFasterDecoder, 声学分来源,nnet3 模型
此外还有类似的 nnet3-latgen-faster-parallel, nnet3-latgen-faster-batch命令。
打印以下nnet3-latgen-faster
的帮助:
Generate lattices using nnet3 neural net model.
Usage: nnet3-latgen-faster [options] <nnet-in> <fst-in|fsts-rspecifier> <features-rspecifier> <lattice-wspecifier> [ <words-wspecifier> [<alignments-wspecifier>] ]
See also: nnet3-latgen-faster-parallel, nnet3-latgen-faster-batchOptions:--acoustic-scale : Scaling factor for acoustic log-likelihoods (caution: is a no-op if set in the program nnet3-compute (float, default = 0.1)--allow-partial : If true, produce output even if end state was not reached. (bool, default = false)--beam : Decoding beam. Larger->slower, more accurate. (float, default = 16)--beam-delta : Increment used in decoding-- this parameter is obscure and relates to a speedup in the way the max-active constraint is applied. Larger is more accurate. (float, default = 0.5)--computation.debug : If true, turn on debug for the neural net computation (very verbose!) Will be turned on regardless if --verbose >= 5 (bool, default = false)--debug-computation : If true, turn on debug for the actual computation (very verbose!) (bool, default = false)--delta : Tolerance used in determinization (float, default = 0.000976562)--determinize-lattice : If true, determinize the lattice (lattice-determinization, keeping only best pdf-sequence for each word-sequence). (bool, default = true)--extra-left-context : Number of frames of additional left-context to add on top of the neural net's inherent left context (may be useful in recurrent setups (int, default = 0)--extra-left-context-initial : If >= 0, overrides the --extra-left-context value at the start of an utterance. (int, default = -1)--extra-right-context : Number of frames of additional right-context to add on top of the neural net's inherent right context (may be useful in recurrent setups (int, default = 0)--extra-right-context-final : If >= 0, overrides the --extra-right-context value at the end of an utterance. (int, default = -1)--frame-subsampling-factor : Required if the frame-rate of the output (e.g. in 'chain' models) is less than the frame-rate of the original alignment. (int, default = 1)--frames-per-chunk : Number of frames in each chunk that is separately evaluated by the neural net. Measured before any subsampling, if the --frame-subsampling-factor options is used (i.e. counts input frames (int, default = 50)--hash-ratio : Setting used in decoder to control hash behavior (float, default = 2)--ivectors : Rspecifier for iVectors as vectors (i.e. not estimated online); per utterance by default, or per speaker if you provide the --utt2spk option. (string, default = "")--lattice-beam : Lattice generation beam. Larger->slower, and deeper lattices (float, default = 10)--max-active : Decoder max active states. Larger->slower; more accurate (int, default = 2147483647)--max-mem : Maximum approximate memory usage in determinization (real usage might be many times this). (int, default = 50000000)--min-active : Decoder minimum #active states. (int, default = 200)--minimize : If true, push and minimize after determinization. (bool, default = false)--online-ivector-period : Number of frames between iVectors in matrices supplied to the --online-ivectors option (int, default = 0)--online-ivectors : Rspecifier for iVectors estimated online, as matrices. If you supply this, you must set the --online-ivector-period option. (string, default = "")--optimization.allocate-from-other : Instead of deleting a matrix of a given size and then allocating a matrix of the same size, allow re-use of that memory (bool, default = true)--optimization.allow-left-merge : Set to false to disable left-merging of variables in remove-assignments (obscure option) (bool, default = true)--optimization.allow-right-merge : Set to false to disable right-merging of variables in remove-assignments (obscure option) (bool, default = true)--optimization.backprop-in-place : Set to false to disable optimization that allows in-place backprop (bool, default = true)--optimization.consolidate-model-update : Set to false to disable optimization that consolidates the model-update phase of backprop (e.g. for recurrent architectures (bool, default = true)--optimization.convert-addition : Set to false to disable the optimization that converts Add commands into Copy commands wherever possible. (bool, default = true)--optimization.extend-matrices : This optimization can reduce memory requirements for TDNNs when applied together with --convert-addition=true (bool, default = true)--optimization.initialize-undefined : Set to false to disable optimization that avoids redundant zeroing (bool, default = true)--optimization.max-deriv-time : You can set this to the maximum t value that you want derivatives to be computed at when updating the model. This is an optimization that saves time in the backprop phase for recurrent frameworks (int, default = 2147483647)--optimization.max-deriv-time-relative : An alternative mechanism for setting the --max-deriv-time, suitable for situations where the length of the egs is variable. If set, it is equivalent to setting the --max-deriv-time to this value plus the largest 't' value in any 'output' node of the computation request. (int, default = 2147483647)--optimization.memory-compression-level : This is only relevant to training, not decoding. Set this to 0,1,2; higher levels are more aggressive at reducing memory by compressing quantities needed for backprop, potentially at the expense of speed and the accuracy of derivatives. 0 means no compression at all; 1 means compression that shouldn't affect results at all. (int, default = 1)--optimization.min-deriv-time : You can set this to the minimum t value that you want derivatives to be computed at when updating the model. This is an optimization that saves time in the backprop phase for recurrent frameworks (int, default = -2147483648)--optimization.move-sizing-commands : Set to false to disable optimization that moves matrix allocation and deallocation commands to conserve memory. (bool, default = true)--optimization.optimize : Set this to false to turn off all optimizations (bool, default = true)--optimization.optimize-row-ops : Set to false to disable certain optimizations that act on operations of type *Row*. (bool, default = true)--optimization.propagate-in-place : Set to false to disable optimization that allows in-place propagation (bool, default = true)--optimization.remove-assignments : Set to false to disable optimization that removes redundant assignments (bool, default = true)--optimization.snip-row-ops : Set this to false to disable an optimization that reduces the size of certain per-row operations (bool, default = true)--optimization.split-row-ops : Set to false to disable an optimization that may replace some operations of type kCopyRowsMulti or kAddRowsMulti with up to two simpler operations. (bool, default = true)--phone-determinize : If true, do an initial pass of determinization on both phones and words (see also --word-determinize) (bool, default = true)--prune-interval : Interval (in frames) at which to prune tokens (int, default = 25)--utt2spk : Rspecifier for utt2spk option used to get ivectors per speaker (string, default = "")--word-determinize : If true, do a second pass of determinization on words only (see also --phone-determinize) (bool, default = true)--word-symbol-table : Symbol table for words [for debug output] (string, default = "")Standard options:--config : Configuration file to read (this option may be repeated) (string, default = "")--help : Print out usage message (bool, default = false)--print-args : Print the command line arguments (to stderr) (bool, default = true)--verbose : Verbose level (higher->more logging) (int, default = 0)
参考阅读
https://blog.csdn.net/qq_25750561/article/details/81070092
https://www.cnblogs.com/yszd/p/12192769.html
https://github.com/naxingyu/kaldi_cvte_model_test
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
相关文章
- 面向对象的四大特性:封装、抽象、继承、多态
封装 封装也叫作信息隐藏或者数据访问保护。类通过暴露有限的访问接口,授权外部仅能通过类提供的方式来访问内部信息或者数据。它需要编程语言提供权限访问控制语法来支持,例如 Java 中的 private、protected、public 关键字。封装特性存在的意义,一方面是保护数据不被随意修…...
2024/4/25 23:59:57 - 初识DOM DOM总结 心得
什么是DOM?DOM:Document Object Model,文档对象模型。 是一组用来描述js代码怎样与html文档进行交互和访问的web标准,它定义了一系列对象、方法和属性,用于访问、操作和创建文档中的内容、结构、样式和行为。DOM中有哪些节点类型?元素节点 属性节点 文本节点DOM1 标准方法…...
2024/4/15 17:47:00 - Java基础学习总结3(面向对象之继承,多态.接口,内部类,匿名内部类,选择排序)
day101.代码块 在Java中使用{}包裹起来的内容,将这个{}称为代码块!分类:1)局部代码块: 在方法定义中定义的{} 作用:限定局部变量的生命周期 2)构造代码块:在类中的成员位置中定义的{}作用:在执行构造方法之前先执行构造代码块,然后对当前数据(类中的成员变量)…...
2024/5/7 15:55:35 - Docker无法启动 error initializing graphdriver: driver not supported
启动信息[root@localhost ~]# systemctl start docker Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.启动详情8月 31 01:47:25 localhos…...
2024/4/15 17:46:57 - OpenCV-Python笔记(一)GUI及核心操作
这部分笔记来源于我以前的纸质笔记本,重新写成电子文档,方便以后查阅。因为还不熟悉公式编写,后续可能不会加上公式,主要是说明和提醒自己一些需要注意的坑。 Python版本:python3.7 OpenCV版本:4.3 编译器:Pycharm 图片读取 import cv2 as cv import numpy as np import…...
2024/5/8 0:55:41 - Tomcat 核⼼配置 之 Service标签
该标签⽤于创建 Service 实例,默认使⽤ org.apache.catalina.core.StandardService。 默认情况下,Tomcat 仅指定了Service 的名称, 值为 “Catalina”。 <!-- Service ⼦标签为 : Listener、Executor、Connector、Engine,其中:Listener ⽤于为Service添加⽣命周期监听…...
2024/4/18 16:53:28 - yum安装软件
rpmp安装软件包的虽然方便,但是需要手工解决软件包的依赖关系。很多时候安装一个软件包需要安装多个其他软件包,还有不同版本的兼容性问题,很复杂。yum解决了这些问题,yum是rpm的前端程序,设计的主要目的就是为了自动解决rpm的依赖关系,有以下优点:1. 自动解决依赖关系;…...
2024/4/15 17:46:56 - node实现一个发送到指定邮箱功能
功能:用户需要在某个页面提交一些信息,然后再将信息发到指定邮箱。之前考虑纯前端实现,库较少,看起来也比较麻烦,正好我在学node,就用node来做吧。 前端(vue)将信息提交到node,node利用库 nodemailer 来实现。 目录结构:安装必要的库nodemon是自动重启node服务的库cnpm…...
2024/5/7 20:04:46 - 学习总结-MyBatis基本使用
MyBatis框架使用 一、第一种开发模式 使用MyBatis的SqlSession中提供的方法进行简单的增删改查。 1. 导包:到官网下载MyBatis的jar包,可以到中文官网上下载,下载完成后,在项目中导入MyBatis的核心jar包以及附属jar包,另外,还需要导入数据库连接的jar包,否则是连接不了数…...
2024/5/7 20:09:14 - python错误集锦
1.python连接数据库时,报错如下:原因:程序运行时,后面多了个“,”,已至于把它当做元组来处理,host传入getaddrinfo的值不是字符串 - 它很可能是一个元组。解决方案:去掉逗号2.python在调用函数的时候,函数明明不需要参数,调用的时候报错:TypeError: read_mysql() mis…...
2024/5/7 15:19:21 - 比特币一路上行 行情再次创出新高
各位朋友们,你们好, 我是阿帆老师。阿帆本着负责、诚恳、认真的态度用心写好每一篇分析文章,特点鲜明,不夸张,不含糊,力求能让大家看懂大的趋势分析以及小范围的多空搏杀力度!本内容中的信息及数据来源于公开可获得资料,力求准确可靠,但对信息的准确性及完整性不做任何…...
2024/5/7 20:08:24 - 在现实隐藏的时候,报错,某个属性不能读取。怎么处理
答案:用hasOwnProperty()方法判断属性。...
2024/5/8 2:35:42 - RocketMQ
文章目录一、MQ发送同步消息二、发送异步消息 一、MQ发送同步消息二、发送异步消息 对时间要求比较高的场景...
2024/4/18 18:56:59 - Hive查询练习二
目标 inner join left join full join union all 综合练习 表结构inner join 1.在2019年购买后又退款的用户※【注意去重】去重31条,没有去重61条 尽量在做表连接之前去重,这样效率才高select a.user_name from (select distinct user_name from user_trade where year…...
2024/4/19 23:08:41 - linux下的动态库和共享库(linux基础)
linux下的动态库和共享库 1.静态库 liblinux.so包含一个对应的头文件告知编译器lib文件里面的具体内容 设置lib文件允许编译器去查找已经编译好的二进制代码 静态链接表示静态性,在编译链接之后, lib库中需要的资源已经在可执行程序中了, 也就是静态存在,没有依赖性了。2.…...
2024/5/1 21:29:41 - python3 +dlib 人脸识别
想用dlib弄个人脸识别,达到能从一张多人的图里检测出是否有数据库中的人的效果。 最开始的代码是参考这篇文章的,https://blog.csdn.net/MAILLIBIN/article/details/88979691,其中检测器和识别模型分享到百度网盘了,链接:https://pan.baidu.com/s/1lfaWNaGJMxKyFlFydDS3Sw…...
2024/5/7 16:30:22 - C++ 标准模板库STL(二)—— string容器
一、什么是string string是一个类,类似于java中的String类。利用string类可以定义其对应的string对象 注意:要使用string类要引入库 string首字母s就是小写,不要大写,和java不一样二、如何定义string对象 string str;三、初始化string对象 (一)在定义的时候就初始化 stri…...
2024/4/15 17:46:48 - Linux内核学习笔记 -17 物理内存分配与回收机制 - 下
...
2024/4/15 17:46:47 - Python数据类型及其运算符(附练习实例)
# 使用比较运算符比较大小关系。python = 95 # 定义变量,存储Python的分数 english = 92 # 定义变量,存储english的分数 c = 89 # 定义变量,存储c语音的分数 # 输出3个变量的值 print(python =+str(python)+english =+str(english)+c =+str(c)+\n)…...
2024/5/7 3:12:36 - node.js之精华级入门
node.js简介简单的说 Node.js 就是运行在服务端的 JavaScript。 Node.js 是一个基于Chrome JavaScript 运行时建立的一个平台。 Node.js是一个事件驱动I/O服务端JavaScript环境,基于Google的V8引擎,V8引擎执行Javascript的速度非常快,性能非常好。 —解决问题: I/O的操作阻…...
2024/4/23 2:49:43
最新文章
- 洛谷 P3391:文艺平衡树 ← Splay树模板题
【题目来源】https://www.luogu.com.cn/problem/P3391【题目描述】 您需要写一种数据结构(可参考题目标题),来维护一个有序数列。 其中需要提供以下操作:翻转一个区间,例如原有序序列是 5 4 3 2 1,翻转区间…...
2024/5/8 3:23:46 - 梯度消失和梯度爆炸的一些处理方法
在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言,在此感激不尽。 权重和梯度的更新公式如下: w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...
2024/5/7 10:36:02 - ChatGPT 初学者指南
原文:ChatGPT for Beginners 译者:飞龙 协议:CC BY-NC-SA 4.0 介绍 如果您一直关注新闻和趋势,您可能已经在某个地方读到或听到过,Sam Altman 的生成式人工智能平台 ChatGPT 已经将人工智能推向了一个新的高度 - 许多…...
2024/5/7 2:14:21 - ChatGPT 赚钱初学者指南(上)
原文:The Beginner’s Guide to Earning Money Online with ChatGPT 译者:飞龙 协议:CC BY-NC-SA 4.0 第一章:理解基础知识 什么是 ChatGPT? 在人工智能与人类对话相遇的数字织锦中,ChatGPT 作为一个突出…...
2024/5/5 8:51:03 - 416. 分割等和子集问题(动态规划)
题目 题解 class Solution:def canPartition(self, nums: List[int]) -> bool:# badcaseif not nums:return True# 不能被2整除if sum(nums) % 2 ! 0:return False# 状态定义:dp[i][j]表示当背包容量为j,用前i个物品是否正好可以将背包填满ÿ…...
2024/5/7 19:05:20 - 【Java】ExcelWriter自适应宽度工具类(支持中文)
工具类 import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;/*** Excel工具类** author xiaoming* date 2023/11/17 10:40*/ public class ExcelUti…...
2024/5/7 22:31:36 - Spring cloud负载均衡@LoadBalanced LoadBalancerClient
LoadBalance vs Ribbon 由于Spring cloud2020之后移除了Ribbon,直接使用Spring Cloud LoadBalancer作为客户端负载均衡组件,我们讨论Spring负载均衡以Spring Cloud2020之后版本为主,学习Spring Cloud LoadBalance,暂不讨论Ribbon…...
2024/5/8 1:37:40 - TSINGSEE青犀AI智能分析+视频监控工业园区周界安全防范方案
一、背景需求分析 在工业产业园、化工园或生产制造园区中,周界防范意义重大,对园区的安全起到重要的作用。常规的安防方式是采用人员巡查,人力投入成本大而且效率低。周界一旦被破坏或入侵,会影响园区人员和资产安全,…...
2024/5/7 14:19:30 - VB.net WebBrowser网页元素抓取分析方法
在用WebBrowser编程实现网页操作自动化时,常要分析网页Html,例如网页在加载数据时,常会显示“系统处理中,请稍候..”,我们需要在数据加载完成后才能继续下一步操作,如何抓取这个信息的网页html元素变化&…...
2024/5/8 1:37:39 - 【Objective-C】Objective-C汇总
方法定义 参考:https://www.yiibai.com/objective_c/objective_c_functions.html Objective-C编程语言中方法定义的一般形式如下 - (return_type) method_name:( argumentType1 )argumentName1 joiningArgument2:( argumentType2 )argumentName2 ... joiningArgu…...
2024/5/7 16:57:02 - 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】
👨💻博客主页:花无缺 欢迎 点赞👍 收藏⭐ 留言📝 加关注✅! 本文由 花无缺 原创 收录于专栏 【洛谷算法题】 文章目录 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】🌏题目描述🌏输入格…...
2024/5/7 14:58:59 - 【ES6.0】- 扩展运算符(...)
【ES6.0】- 扩展运算符... 文章目录 【ES6.0】- 扩展运算符...一、概述二、拷贝数组对象三、合并操作四、参数传递五、数组去重六、字符串转字符数组七、NodeList转数组八、解构变量九、打印日志十、总结 一、概述 **扩展运算符(...)**允许一个表达式在期望多个参数࿰…...
2024/5/7 1:54:46 - 摩根看好的前智能硬件头部品牌双11交易数据极度异常!——是模式创新还是饮鸩止渴?
文 | 螳螂观察 作者 | 李燃 双11狂欢已落下帷幕,各大品牌纷纷晒出优异的成绩单,摩根士丹利投资的智能硬件头部品牌凯迪仕也不例外。然而有爆料称,在自媒体平台发布霸榜各大榜单喜讯的凯迪仕智能锁,多个平台数据都表现出极度异常…...
2024/5/7 21:15:55 - Go语言常用命令详解(二)
文章目录 前言常用命令go bug示例参数说明 go doc示例参数说明 go env示例 go fix示例 go fmt示例 go generate示例 总结写在最后 前言 接着上一篇继续介绍Go语言的常用命令 常用命令 以下是一些常用的Go命令,这些命令可以帮助您在Go开发中进行编译、测试、运行和…...
2024/5/8 1:37:35 - 用欧拉路径判断图同构推出reverse合法性:1116T4
http://cplusoj.com/d/senior/p/SS231116D 假设我们要把 a a a 变成 b b b,我们在 a i a_i ai 和 a i 1 a_{i1} ai1 之间连边, b b b 同理,则 a a a 能变成 b b b 的充要条件是两图 A , B A,B A,B 同构。 必要性显然࿰…...
2024/5/7 16:05:05 - 【NGINX--1】基础知识
1、在 Debian/Ubuntu 上安装 NGINX 在 Debian 或 Ubuntu 机器上安装 NGINX 开源版。 更新已配置源的软件包信息,并安装一些有助于配置官方 NGINX 软件包仓库的软件包: apt-get update apt install -y curl gnupg2 ca-certificates lsb-release debian-…...
2024/5/7 16:04:58 - Hive默认分割符、存储格式与数据压缩
目录 1、Hive默认分割符2、Hive存储格式3、Hive数据压缩 1、Hive默认分割符 Hive创建表时指定的行受限(ROW FORMAT)配置标准HQL为: ... ROW FORMAT DELIMITED FIELDS TERMINATED BY \u0001 COLLECTION ITEMS TERMINATED BY , MAP KEYS TERMI…...
2024/5/8 1:37:32 - 【论文阅读】MAG:一种用于航天器遥测数据中有效异常检测的新方法
文章目录 摘要1 引言2 问题描述3 拟议框架4 所提出方法的细节A.数据预处理B.变量相关分析C.MAG模型D.异常分数 5 实验A.数据集和性能指标B.实验设置与平台C.结果和比较 6 结论 摘要 异常检测是保证航天器稳定性的关键。在航天器运行过程中,传感器和控制器产生大量周…...
2024/5/7 16:05:05 - --max-old-space-size=8192报错
vue项目运行时,如果经常运行慢,崩溃停止服务,报如下错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 因为在 Node 中,通过JavaScript使用内存时只能使用部分内存(64位系统&…...
2024/5/8 1:37:31 - 基于深度学习的恶意软件检测
恶意软件是指恶意软件犯罪者用来感染个人计算机或整个组织的网络的软件。 它利用目标系统漏洞,例如可以被劫持的合法软件(例如浏览器或 Web 应用程序插件)中的错误。 恶意软件渗透可能会造成灾难性的后果,包括数据被盗、勒索或网…...
2024/5/8 1:37:31 - JS原型对象prototype
让我简单的为大家介绍一下原型对象prototype吧! 使用原型实现方法共享 1.构造函数通过原型分配的函数是所有对象所 共享的。 2.JavaScript 规定,每一个构造函数都有一个 prototype 属性,指向另一个对象,所以我们也称为原型对象…...
2024/5/7 11:08:22 - C++中只能有一个实例的单例类
C中只能有一个实例的单例类 前面讨论的 President 类很不错,但存在一个缺陷:无法禁止通过实例化多个对象来创建多名总统: President One, Two, Three; 由于复制构造函数是私有的,其中每个对象都是不可复制的,但您的目…...
2024/5/7 7:26:29 - python django 小程序图书借阅源码
开发工具: PyCharm,mysql5.7,微信开发者工具 技术说明: python django html 小程序 功能介绍: 用户端: 登录注册(含授权登录) 首页显示搜索图书,轮播图࿰…...
2024/5/8 1:37:29 - 电子学会C/C++编程等级考试2022年03月(一级)真题解析
C/C++等级考试(1~8级)全部真题・点这里 第1题:双精度浮点数的输入输出 输入一个双精度浮点数,保留8位小数,输出这个浮点数。 时间限制:1000 内存限制:65536输入 只有一行,一个双精度浮点数。输出 一行,保留8位小数的浮点数。样例输入 3.1415926535798932样例输出 3.1…...
2024/5/7 17:09:45 - 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...
解析如下:1、长按电脑电源键直至关机,然后再按一次电源健重启电脑,按F8健进入安全模式2、安全模式下进入Windows系统桌面后,按住“winR”打开运行窗口,输入“services.msc”打开服务设置3、在服务界面,选中…...
2022/11/19 21:17:18 - 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。
%读入6幅图像(每一幅图像的大小是564*564) f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...
2022/11/19 21:17:16 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...
win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面,在等待界面中我们需要等待操作结束才能关机,虽然这比较麻烦,但是对系统进行配置和升级…...
2022/11/19 21:17:15 - 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...
有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows,请勿关闭计算机”的提示,要过很久才能进入系统,有的用户甚至几个小时也无法进入,下面就教大家这个问题的解决方法。第一种方法:我们首先在左下角的“开始…...
2022/11/19 21:17:14 - win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...
置信有很多用户都跟小编一样遇到过这样的问题,电脑时发现开机屏幕显现“正在配置Windows Update,请勿关机”(如下图所示),而且还需求等大约5分钟才干进入系统。这是怎样回事呢?一切都是正常操作的,为什么开时机呈现“正…...
2022/11/19 21:17:13 - 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...
Win7系统开机启动时总是出现“配置Windows请勿关机”的提示,没过几秒后电脑自动重启,每次开机都这样无法进入系统,此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一:开机按下F8,在出现的Windows高级启动选…...
2022/11/19 21:17:12 - 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...
有不少windows10系统用户反映说碰到这样一个情况,就是电脑提示正在准备windows请勿关闭计算机,碰到这样的问题该怎么解决呢,现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法:1、2、依次…...
2022/11/19 21:17:11 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...
今天和大家分享一下win7系统重装了Win7旗舰版系统后,每次关机的时候桌面上都会显示一个“配置Windows Update的界面,提示请勿关闭计算机”,每次停留好几分钟才能正常关机,导致什么情况引起的呢?出现配置Windows Update…...
2022/11/19 21:17:10 - 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...
只能是等着,别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚,只能是考虑备份数据后重装系统了。解决来方案一:管理员运行cmd:net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...
2022/11/19 21:17:09 - 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?
原标题:电脑提示“配置Windows Update请勿关闭计算机”怎么办?win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢?一般的方…...
2022/11/19 21:17:08 - 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...
关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!关机提示 windows7 正在配…...
2022/11/19 21:17:05 - 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...
钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...
2022/11/19 21:17:05 - 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...
前几天班里有位学生电脑(windows 7系统)出问题了,具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面,长时间没反应,无法进入系统。这个问题原来帮其他同学也解决过,网上搜了不少资料&#x…...
2022/11/19 21:17:04 - 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...
本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法,并在最后教给你1种保护系统安全的好方法,一起来看看!电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中,添加了1个新功能在“磁…...
2022/11/19 21:17:03 - 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...
许多用户在长期不使用电脑的时候,开启电脑发现电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机。。.这要怎么办呢?下面小编就带着大家一起看看吧!如果能够正常进入系统,建议您暂时移…...
2022/11/19 21:17:02 - 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...
配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!配置windows update失败 还原更改 请勿关闭计算机&#x…...
2022/11/19 21:17:01 - 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...
不知道大家有没有遇到过这样的一个问题,就是我们的win7系统在关机的时候,总是喜欢显示“准备配置windows,请勿关机”这样的一个页面,没有什么大碍,但是如果一直等着的话就要两个小时甚至更久都关不了机,非常…...
2022/11/19 21:17:00 - 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...
当电脑出现正在准备配置windows请勿关闭计算机时,一般是您正对windows进行升级,但是这个要是长时间没有反应,我们不能再傻等下去了。可能是电脑出了别的问题了,来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...
2022/11/19 21:16:59 - 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...
我们使用电脑的过程中有时会遇到这种情况,当我们打开电脑之后,发现一直停留在一个界面:“配置Windows Update失败,还原更改请勿关闭计算机”,等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢࿰…...
2022/11/19 21:16:58 - 如何在iPhone上关闭“请勿打扰”
Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...
2022/11/19 21:16:57