This commit is contained in:
tq
2022-04-07 11:02:12 +08:00
parent 9b6bef6f92
commit adae2c1a3d
71 changed files with 162 additions and 111 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

27
.idea/Intelligent-Eldly-Care.iml generated Normal file
View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$/cv_backend" />
<option name="settingsModule" value="settings.py" />
<option name="manageScript" value="manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
</component>
</module>

View File

@@ -0,0 +1,79 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="66">
<item index="0" class="java.lang.String" itemvalue="torch" />
<item index="1" class="java.lang.String" itemvalue="opencv-python" />
<item index="2" class="java.lang.String" itemvalue="torchvision" />
<item index="3" class="java.lang.String" itemvalue="timm" />
<item index="4" class="java.lang.String" itemvalue="joblib" />
<item index="5" class="java.lang.String" itemvalue="Click" />
<item index="6" class="java.lang.String" itemvalue="MarkupSafe" />
<item index="7" class="java.lang.String" itemvalue="numpy" />
<item index="8" class="java.lang.String" itemvalue="requests" />
<item index="9" class="java.lang.String" itemvalue="Jinja2" />
<item index="10" class="java.lang.String" itemvalue="sentencepiece" />
<item index="11" class="java.lang.String" itemvalue="certifi" />
<item index="12" class="java.lang.String" itemvalue="docutils" />
<item index="13" class="java.lang.String" itemvalue="urllib3" />
<item index="14" class="java.lang.String" itemvalue="itsdangerous" />
<item index="15" class="java.lang.String" itemvalue="Flask" />
<item index="16" class="java.lang.String" itemvalue="tokenizers" />
<item index="17" class="java.lang.String" itemvalue="scipy" />
<item index="18" class="java.lang.String" itemvalue="transformers" />
<item index="19" class="java.lang.String" itemvalue="sacremoses" />
<item index="20" class="java.lang.String" itemvalue="six" />
<item index="21" class="java.lang.String" itemvalue="botocore" />
<item index="22" class="java.lang.String" itemvalue="Werkzeug" />
<item index="23" class="java.lang.String" itemvalue="chardet" />
<item index="24" class="java.lang.String" itemvalue="jmespath" />
<item index="25" class="java.lang.String" itemvalue="tqdm" />
<item index="26" class="java.lang.String" itemvalue="boto3" />
<item index="27" class="java.lang.String" itemvalue="regex" />
<item index="28" class="java.lang.String" itemvalue="s3transfer" />
<item index="29" class="java.lang.String" itemvalue="idna" />
<item index="30" class="java.lang.String" itemvalue="absl-py" />
<item index="31" class="java.lang.String" itemvalue="google-pasta" />
<item index="32" class="java.lang.String" itemvalue="protobuf" />
<item index="33" class="java.lang.String" itemvalue="tensorflow-estimator" />
<item index="34" class="java.lang.String" itemvalue="opt-einsum" />
<item index="35" class="java.lang.String" itemvalue="PyYAML" />
<item index="36" class="java.lang.String" itemvalue="python-dateutil" />
<item index="37" class="java.lang.String" itemvalue="wget" />
<item index="38" class="java.lang.String" itemvalue="gast" />
<item index="39" class="java.lang.String" itemvalue="Keras-Preprocessing" />
<item index="40" class="java.lang.String" itemvalue="tensorflow" />
<item index="41" class="java.lang.String" itemvalue="appdirs" />
<item index="42" class="java.lang.String" itemvalue="pyparsing" />
<item index="43" class="java.lang.String" itemvalue="Markdown" />
<item index="44" class="java.lang.String" itemvalue="pyee" />
<item index="45" class="java.lang.String" itemvalue="websockets" />
<item index="46" class="java.lang.String" itemvalue="pyppeteer" />
<item index="47" class="java.lang.String" itemvalue="wrapt" />
<item index="48" class="java.lang.String" itemvalue="astor" />
<item index="49" class="java.lang.String" itemvalue="kiwisolver" />
<item index="50" class="java.lang.String" itemvalue="Keras-Applications" />
<item index="51" class="java.lang.String" itemvalue="tensorboard" />
<item index="52" class="java.lang.String" itemvalue="matplotlib" />
<item index="53" class="java.lang.String" itemvalue="grpcio" />
<item index="54" class="java.lang.String" itemvalue="Keras" />
<item index="55" class="java.lang.String" itemvalue="pandas" />
<item index="56" class="java.lang.String" itemvalue="loguru" />
<item index="57" class="java.lang.String" itemvalue="h5py" />
<item index="58" class="java.lang.String" itemvalue="cycler" />
<item index="59" class="java.lang.String" itemvalue="Unidecode" />
<item index="60" class="java.lang.String" itemvalue="librosa" />
<item index="61" class="java.lang.String" itemvalue="SoundFile" />
<item index="62" class="java.lang.String" itemvalue="inflect" />
<item index="63" class="java.lang.String" itemvalue="tensorboardX" />
<item index="64" class="java.lang.String" itemvalue="pyworld" />
<item index="65" class="java.lang.String" itemvalue="opencv_python" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Intelligent-Eldly-Care.iml" filepath="$PROJECT_DIR$/.idea/Intelligent-Eldly-Care.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

BIN
Img/.DS_Store vendored Normal file

Binary file not shown.

BIN
Img/algo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
Img/algo2-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
Img/algo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
Img/algo3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
Img/bs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
Img/cnn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
Img/configuration.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

BIN
Img/cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

BIN
Img/detector.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 MiB

BIN
Img/face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

BIN
Img/facenet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

BIN
Img/feature.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1007 KiB

BIN
Img/framework.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

BIN
Img/gf4-1-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

BIN
Img/gf4-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
Img/gf4-2-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

BIN
Img/gf4-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
Img/gf4-3-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

BIN
Img/gf4-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
Img/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
Img/kp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

BIN
Img/livestream.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
Img/mini-xception.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
Img/sequence.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
Img/siamese.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
Img/system.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
Img/triplets loss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

BIN
Img/win32com.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
Img/yl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d89c7b863fc1ac3a179d45d5fe1b9fd35fb6fbd45171ca68d0d68ab1c1ad04fb
size 87888

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:917b51b68d785f280b5cb386c2ad59a5d434fb51052eb21aecae5f5b92cedee4
size 236544

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd62c8c506ad61e273551f4b9a33849e92be5ce69b5a3d6ca3fd295b945acf31
size 130560

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5fe5a673fe2fff447125a62f6b8ea33d6a0e4c6dcdc5898ae42b1035e8f3b3f
size 228864

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9098978b1f5e2bc76bdc855239bbf030a5192cedcdcfc862041d5229a75cc03b
size 97280

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79051da0e88094996dfffca404bf4264a7c9366db5f99016b58191295fe52d2e
size 34192896

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1351cbe28b9f391a3f243c04ab0d1359064b073c541daea63453b632ab963163
size 18942976

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26d69a5eb59d53463a07d9c7da85b0f12203ad63ca3368e581b803e7ccf9b8f9
size 2307072

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc176bfe161c9a13ebe8ec12e476d471d3a6b7cdc63e0c3ed2d43bb23c2283ce
size 17643520

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5eb9ae3963f451123b176f8731f8c0ecd0ef00e15f6729b26b08ebeb4007b276
size 104448

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d9eb801ceda08397403411fb2ae61f18fd4904af7abecc6c227a01cdf4ce9c12
size 228864

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78c8d736ead1904ba4b7d499a918331adb68f39f43668c62dcbe00607a025594
size 82432

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c03623ba1b05b10d5781320a5a1a21a86f513f1f81482f52648fc7ec004d92a9
size 201216

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85fd45be66ad91bfb3cced55d0a0890cac38597a3a8b9a0155992111a4002184
size 67318784

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ca2ea3675f211078a7b0921bdfb49d633f0adbddcbc80f7faf5fcab136eb413
size 416256

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26495e7008bc239cacf0e65704b5717b862ba5ca250c641ec4ad4b114efc0cff
size 349596160

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca23f0a2334a6a736b4513a69675cffe6caced6fa38baa3f325ef4a18a78c37f
size 49751040

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4cb11cccd0fad125f9bbb0845be38fa2e2b066923c1af640bb397b70a4cdb3f3
size 139776

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:63a3eedf1a6cba3113cdb896c146aa202e9ec08b9d46119211672694029e15d4
size 557056

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a831ce2d426a6b53456f828ae1de592a08f2d1590035ac3439960c1de6ec1630
size 114176

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7fa445f48425b05a5a1ce216ec9ff7d9fc83308abc95f92ebb5af4925b5970a
size 326656

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:621b30e0febd769e24b5b78c2ce77011595e8b9d7c2b4f05bfed75b2a1f53d7a
size 82432

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b1abd767efd9f1bd3ab1a5d3bba3f9f332a051680c3a72cf45d475765e401a5b
size 1279488

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ce8bd02b8218a4156a09456607c4b2f9a1ac4318c65755f2e435e68d93e74b2
size 38340126

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de6c30fcc5bc94120647ab0a382fd9dd8b2d1c031b1e629ddb8f54d36d575558
size 331776

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc6cca11924263d28c5716afba6208101574d190301ce9281af942c6d5c6b4dd
size 22066688

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ebf0e8976d76623addfd3f902ede9b9caf627b1f35018bc9a3002f2fe1c8e217
size 59127808

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76837bc159fa286f0f619165871ae9ebf8a397d036633763e6305b19004528c0
size 111518208

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa6086909837a06a1bebc510e6fbdbc814a0cc6004cbcb74070789dc30cad18b
size 4652544

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<h1 align="center">
<a href="https://github.com/Tang1705/CVofSSE" title="CVofSSE Documentation">
<img alt="CV" src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/28.png" width="200px" height="200px" />
<img alt="CV" src="Img/icon.png" width="200px" height="200px" />
</a>
<br />
基于计算机视觉的智慧养老系统
@@ -31,15 +31,15 @@
</div>
基于计算机视觉的智慧养老系统通过(模拟)多组摄像头实时拍摄到的画面,用计算机视觉技术实时分析老人的情感、是否有人摔倒、是否有人闯入禁止区域、老人是否有和义工互动、是否有陌生人出现并追踪陌生人。一旦上述事件发生,该事件会立即插入到数据库中。这些事件数据被实时地更新在报表中,管理人员因此可以迅速做出反应,从而可以提高管理人员的服务水平和管理能力。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/27.png" alt="01" width="50%" height="50%"/></div>
<div class="imgs" align="center" ><img src="Img/system.png" alt="01" width="75%" height="50%"/></div>
本系统分为2部分分别是 Web 用户界面 <a href="http://zhuooyu.cn/" class="fas fa-link" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a> 和基于计算机视觉的摄像头(群组)。其中,系统 Web 用户界面仅供系统管理员使用。系统管理员使用该系统不仅可以管理老人、工作人员和义工的信息包括录入、查看等还可以查看实时监控以及得到实时的事件报警如陌生人入侵、陌生人追踪等。Web 用户界面的功能结构图如下图所示:
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/01.png" alt="02" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/framework.png" alt="02" width="100%" height="100%"/></div>
本文重点介绍该项目中摄像头(群组)负载的计算机视觉任务及其算法实现。根据项目需求,设计了如图所示的系统安装环境。办公室的摄像头用于收集人脸数据;房间的摄像头检测陌生人和老人微笑,走廊的摄像头检测是否有人摔倒,活动室的摄像头放在桌子上,当有义工访问才拿出来使用,同时在活动室安装标定板(用于获得世界坐标系与像素坐标系的映射关系),院子的摄像头监控是否有人闯入禁止区域。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/00.png" alt="01" width="80%" height="80%"/></div>
<div class="imgs" align="center" ><img src="Img/configuration.png" alt="01" width="80%" height="80%"/></div>
<div class="wp-block-qubely-advancedlist aligncenter qubely-block-a3df80"><div class="qubely-block-advanced-list qubely-alignment-left"><ul class="qubely-list qubely-list-type-unordered qubely-list-bullet-check"><li>Nginx-RTMP与直播推流</li></ul></div></div>
@@ -47,7 +47,7 @@
RTMP 在互联网 TCP/IP 五层体系结构中应用层RTMP 协议是基于TCP协议的是面向连接的协议能够为数据的传输提供可靠保障因此数据在网络上传输不会出现丢包的情况。不过这种可靠的保障也会造成一些问题也就是说前面的数据包没有交付到目的地后面的数据也无法进行传输。系统的视频流传输结构如图所示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/02.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="./Img/livestream.png" alt="01" width="100%" height="100%"/></div>
<div class="wp-block-qubely-advancedlist aligncenter qubely-block-a3df80"><div class="qubely-block-advanced-list qubely-alignment-left"><ul class="qubely-list qubely-list-type-unordered qubely-list-bullet-check"><li>单样本学习与人脸识别
</li></ul></div></div>
@@ -60,11 +60,11 @@ RTMP 在互联网 TCP/IP 五层体系结构中应用层RTMP 协议是基于TC
如图所示,传统 CNN 包含卷积层、全连接层等组件,并采用 softmax 多类别分类器和多类交叉熵损失函数。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/03.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/cnn.png" alt="01" width="100%" height="100%"/></div>
孪生神经网络是单样本学习中最具代表性的模型。孪生网络是由两个并行神经网络构成的架构,每个神经网络采用不同的输入,其输出被组合起来以提供一些预测。这个网络的两个子网络相同(不同则为伪孪生神经网络),两个子网络有相同的参数和权重。其目标是寻找两个可比较对象的相似程度(例如,签名验证、人脸识别等)。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/04.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/siamese.png" alt="01" width="100%" height="100%"/></div>
学习像图像这样的复杂输入的向量表示就是降维的一个例子。有效降维的目标是学习一种新的低维表示,它保留了输入的结构,使得输出向量之间的距离能够有意义地捕捉到输入中的差异。然而,向量必须捕获到输入中的不变特征。降维是孪生网络用于解决单样本学习的方法。
@@ -76,15 +76,15 @@ Raia Hadsell 等人在 2006 年发表的一篇题为《学习不变映射的降
Triplet 是一个三元组,这个三元组是这样构成的:从训练数据集中随机选一个样本,该样本称为 Anchor然后再随机选取一个和 Anchor 属于同一类的样本和不同类的样本,这两个样本对应的称为 Positive 和 Negative由此构成一个AnchorPositiveNegative三元组。损失函数对模型进行惩罚减小匹配样本之间的距离增加了非匹配样本之间的距离。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/05.png" alt="01" width="90%" height="90%"/></div>
<div class="imgs" align="center" ><img src="Img/triplets loss.png" alt="01" width="90%" height="90%"/></div>
这种方法是 FaceNet 系统的基础。FaceNet 是一个通用的系统,可以用于人脸验证,识别和聚类,它直接学习图像到欧式空间上点的映射,两张图像所对应的特征的欧式空间上的点的距离直接对应着两个图像的相似程度。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/06.png" alt="01" width="90%" height="90%"/></div>
<div class="imgs" align="center" ><img src="Img/facenet.png" alt="01" width="90%" height="90%"/></div>
在本系统中人脸验证的思路是通过人脸检测器将人脸从图像中提取出来通过Facenet 进行验证。如下图所示:
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/07.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/face.png" alt="01" width="100%" height="100%"/></div>
对比了不同的人脸检测器发现OpenCV中提供的DNN运行速度快对遮挡等情况适用。
@@ -126,18 +126,18 @@ Triplet 是一个三元组,这个三元组是这样构成的:从训练数据
</table>
不同人脸检测器的效果如下图所示
<div class="imgs" align="center" ><img src="https://github.com/Tang1705/image_set/raw/master/CVofSSE/08.gif" alt="01" width="50%" height="50%"/></div>
<div class="imgs" align="center" ><img src="Img/detector.gif" alt="01" width="50%" height="50%"/></div>
此外,从用户角度出发,在建立人脸数据库时,通过 OpenCV 和 win32com 从文字和语音方面进行操作提示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/09.jpg" alt="01" width="70%" height="70%"/></div>
<div class="imgs" align="center" ><img src="Img/win32com.jpg" alt="01" width="70%" height="70%"/></div>
<div class="wp-block-qubely-advancedlist aligncenter qubely-block-a3df80"><div class="qubely-block-advanced-list qubely-alignment-left"><ul class="qubely-list qubely-list-type-unordered qubely-list-bullet-check"><li>Mini-Xception 与微笑检测
</li></ul></div></div>
在微笑检测上我们使用了基于fer2013数据集的Mini-Xecption模型该模型移除了全连接层结合了残差模块和深度可分离卷积减少参数达到实时检测的目的。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/10.png" alt="01" width="60%" height="60%"/></div>
<div class="imgs" align="center" ><img src="Img/mini-xception.png" alt="01" width="60%" height="60%"/></div>
😀 移除全连接层VGG16 中90%的参数位于全连接层,与 AlexNet 相比Mini-Xception 参数从 60M 减少到了 600,000
<div style="margin-top:-2em"></div>
@@ -151,32 +151,32 @@ Triplet 是一个三元组,这个三元组是这样构成的:从训练数据
综上,我们首先建立人脸数据库,通过人脸检测器提取出图片中的人脸进行处理,利用 Facenet 计算新图片中人脸与数据库中人脸的欧式距离 <a href="https://krasserm.github.io/2018/02/07/deep-face-recognition/" class="fas fa-link" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a> ,若最小值大于选定的阈值(基于 KNN 和 SVM则发出陌生人警告反之若新图片中的人脸为老人则通过 Mini-Xception 选择置信度最大的情绪识别结果。算法结构如下图所示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/11.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/algo1.png" alt="01" width="100%" height="100%"/></div>
<div class="wp-block-qubely-advancedlist aligncenter qubely-block-a3df80"><div class="qubely-block-advanced-list qubely-alignment-left"><ul class="qubely-list qubely-list-type-unordered qubely-list-bullet-check"><li>物体运动特征与摔倒检测
</li></ul></div></div>
摔倒检测方面,从单幅图像上来看,我们可以提取出人的高度、宽度和夹角信息。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/12.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/feature.png" alt="01" width="100%" height="100%"/></div>
从时间序列上来看,除了上述特征,我们还可以提取出速度和加速度,摔倒行为的特征表现如图所示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/13.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/sequence.png" alt="01" width="100%" height="100%"/></div>
在 <a href="http://fivedots.coe.psu.ac.th/~kom/?p=622" class="fas fa-link" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a> 中使用的背景差分法,由于易受到摄像头摆动等因素干扰而影响测量准确度。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/14.png" alt="01" width="90%" height="90%"/></div>
<div class="imgs" align="center" ><img src="Img/bs.png" alt="01" width="90%" height="90%"/></div>
故在本项目中使用 OpenPose 提取人体关键点从而提取人体运动特征。OpenPose 是由 C++ 开发的开源库可用于实时人体姿态估计等为了在python 中使用,需要对其进行编译。(在 <a href="https://github.com/Tang1705/IconBattle" target="_blank" class="fab fa-github" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a> 提供了基于 Windows 10 + Python 3.7.4 + vs2017 +cmake 3.18.0 + OpenPose 1.6 + CUDA 10.0 +cudnn -10.0-windows10-x64-v7.6.5.32 的编译结果,自行编译请参考 <a href="https://blog.techbridge.cc/2019/01/18/openpose-installation/" class="fas fa-link" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a>
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/29.png" alt="01" width="80%" height="80%"/></div>
<div class="imgs" align="center" ><img src="Img/kp.png" alt="01" width="80%" height="80%"/></div>
但 OpenPose 在人体姿势极端的情况下,识别准确度下降,为识别摔倒的老人通过挥手臂等方式求救,我们实现了基于人体关键点和背景差分的摔打检测算法,利用人力关键点提取出速度、高度、宽度等描述特征,当发生异常通过背景差分提取出角度特征,当特征连续多次满足摔倒检测阈值时,则发出摔倒报警。算法结构如图所示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/16.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="Img/algo2.png" alt="01" width="100%" height="100%"/></div>
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/17.png" alt="01" width="30%" height="30%"/></div>
<div class="imgs" align="center" ><img src="Img/algo2-1.png" alt="01" width="30%" height="30%"/></div>
该摔倒检测算法的效果如下
@@ -189,7 +189,7 @@ Triplet 是一个三元组,这个三元组是这样构成的:从训练数据
以 <a href="https://www.codecogs.com/eqnedit.php?latex=h(x)=2x^6&plus;2x^5&plus;x^4&plus;3x^3&plus;2x^2&plus;2x&plus;1" target="_blank"><img src="https://latex.codecogs.com/gif.latex?h(x)=2x^6&plus;2x^5&plus;x^4&plus;3x^3&plus;2x^2&plus;2x&plus;1" title="h(x)=2x^6+2x^5+x^4+3x^3+2x^2+2x+1" /></a> 作为本原多项式生成伪随机序列,通过伽罗华域下的四则运算,生成 <a href="https://www.codecogs.com/eqnedit.php?latex=65&space;\times&space;63" target="_blank"><img src="https://latex.codecogs.com/gif.latex?65&space;\times&space;63" title="65 \times 63" /></a> 的伪随机矩阵,窗口大小为 <a href="https://www.codecogs.com/eqnedit.php?latex=2&space;\times&space;3" target="_blank"><img src="https://latex.codecogs.com/gif.latex?2&space;\times&space;3" title="2 \times 3" /></a>。 <a href="https://ieeexplore.ieee.org/document/5342428" target="_blank" class="far fa-file-pdf" aria-hidden="true" style="text-indent: -0.1em;" rel="noopener noreferrer"></a>
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/18.png" alt="01" width="30%" height="30%" hspace="10" /> <img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/19.png" alt="02" width="30%" height="30%" hspace="10" /> <img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/20.png" alt="02" width="30%" height="30%" hspace="10" /></div>
<div class="imgs" align="center" ><img src="Img/gf4-1.png" alt="01" width="30%" height="30%" hspace="10" /> <img src="Img/gf4-2.png" alt="02" width="30%" height="30%" hspace="10" /> <img src="Img/gf4-3.png" alt="02" width="30%" height="30%" hspace="10" /></div>
编码图案以菱形作为基本图案,菱形的角点作为特征点,以红、蓝、绿、黑四种颜色作为菱形的颜色。分别对应矩阵中的不同数值,通过颜色及位置对特征点进行编码,从而可以唯一确定图案中某一角点的位置,进而确定不同角点在世界坐标系下的相对位置。
@@ -202,18 +202,18 @@ Triplet 是一个三元组,这个三元组是这样构成的:从训练数据
标定部分算法结构可参考下面伪代码:
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/21.png" alt="01" width="50%" height="50%"/></div>
<div class="imgs" align="center" ><img src="Img/algo3.png" alt="01" width="50%" height="50%"/></div>
如图分别为拍摄原图,角点位置和颜色分类结果。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/22.png" alt="01" width="30%" height="30%" hspace="10" /> <img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/23.png" alt="02" width="30%" height="30%" hspace="10" /> <img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/24.png" alt="02" width="30%" height="30%" hspace="10" /></div>
<div class="imgs" align="center" ><img src="Img/gf4-1-1.png" alt="01" width="30%" height="30%" hspace="10" /> <img src="Img/gf4-2-1.png" alt="02" width="30%" height="30%" hspace="10" /> <img src="Img/gf4-3-1.png" alt="02" width="30%" height="30%" hspace="10" /></div>
<div class="wp-block-qubely-advancedlist aligncenter qubely-block-a3df80"><div class="qubely-block-advanced-list qubely-alignment-left"><ul class="qubely-list qubely-list-type-unordered qubely-list-bullet-check"><li>移动物体监测与跟踪
</li></ul></div></div>
在禁止区域入侵监测方面,包括物体监测和物体追踪两部分。在本项目中,物体检测的目的是识别出人这个物体,而物体追踪则是追踪画面中检测到的人。在对比了不同物体检测方法(如 R-CNN、YOLO等出于实时性和准确性的考虑选择了质心跟踪算法。其算法步骤如图所示。
<div class="imgs" align="center" ><img src="https://5618.oss-cn-beijing.aliyuncs.com/wordpress/image/05/25.png" alt="01" width="80%" height="80%"/></div>
<div class="imgs" align="center" ><img src="Img/yl.png" alt="01" width="80%" height="80%"/></div>
## Features
- [x] OpenCV 人脸检测器识别人脸,拍照录入人脸信息

BIN
cv_frontend/.DS_Store vendored Normal file

Binary file not shown.

BIN
cv_frontend/assets/.DS_Store vendored Normal file

Binary file not shown.