<!--
 * @Author: Your Name lishengyin@sz-sunwin.com
 * @Date: 2022-11-13 19:21:56
 * @LastEditors: Your Name lishengyin@sz-sunwin.com
 * @LastEditTime: 2022-11-13 19:25:50
 * @FilePath: /worddoc/miva/miva.md
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
# miva

项目应用场景为地铁列车上,考虑到硬件统合性能和功耗限制等因素, 选择的是**Jetson Xavire NX**, 软件则基于Deepstream进行开发.

## 1.软件仓库

统一采用docker镜像 + docker-compose的部署方式.

| 仓库 | 地址 |
| --- | --- |
| 部署仓库 | http://git.siwill.com/lishengyin/MIVA.git | 
| 软件仓库 | http://git.siwill.com/lishengyin/MIVAS.git |

## 2.流程说明

miva主要与Netty(本地应用后端)、 PIS系统进行通信, 大致的流程为, 客流密度分析系统结束到关门信号5s后, 至多同时分析12路摄像头, 规定时间内得出结果, 统合运算后将客流密数据传输给PIS系统.

## 3.配置说明

配置方面主要包含config.ini、config_infer_primary_yoloV5.txt两个文件.

**config.ini配置说明**

```ini
[Netty]
Netty_ip = 47.112.106.146
Netty_port = 94
Netty_IdName = Netty

[PIS]
PIS_ip = 192.168.31.95
PIS_port = 9082
PIS_IdName = PIS

[MySql]
sql_ip = 127.0.0.1
sql_port = 3306
user = root
password = 123456
character = utf8mb4

[USER]
device_id = 1
```

**config_infer_primary_yoloV5.txt**

> 请参考gsd.md

## 4.部署框架

主要使用Deepstream, 自行学习, 使用场景上并未要求实时处理, 因为Jetson系列CPU和GPU是内存共享的形态, 所以在处理一次数据后就要将一些资源释放掉, 不然内存会一直处于占满的情况, 功耗就不符合要求, **核心就在于该释放的资源一定要释放掉**.


## 5.参考资料

- [GStreamer系列 - 基本介绍](https://www.cnblogs.com/xleng/p/10948838.html)
- [NVIDIA查看CPU、内存、GPU、DLA使用情况](https://blog.csdn.net/zong596568821xp/article/details/80268034)
- [DeepStream介绍](https://www.jianshu.com/p/aeaa36e92ca8)
- [DeepStream: 新一代智能城市视频分析](https://blog.csdn.net/yiran103/article/details/79166257)
- [初步学习DeepStream](https://blog.csdn.net/Tosonw/article/details/104154090)
- [使用Deepstream部署你的YOLOV4模型](https://zhuanlan.zhihu.com/p/299183571?utm_source=wechat_session)
- [NVIDIA DeepStream笔记(一)](https://cloud.tencent.com/developer/article/1457105)
- [下面是在deepstream使用过程中碰到的一些坑](https://www.cnblogs.com/xiaozhi_5638/p/10949404.html)
- [在Jetson Nano上进行视频分析的DeepStream入门](https://download.csdn.net/download/xp192/12537488?utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control)
- [deepstream数据流分析工具包安装和使用](https://blog.csdn.net/qq_41987977/article/details/105994564)
- [英伟达DeepStream学习笔记1——概述](https://blog.csdn.net/mao_hui_fei/article/details/115617448?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.control&spm=1001.2101.3001.4242)
- [DeepStream Yolov5](https://github.com/dongdongdong1217/yolov5-deepstream-test3)
- [DeepStream5.0系列之环境安装](https://blog.csdn.net/zong596568821xp/article/details/105966383)
- [NVIDIA JETSON TX2 使用Jetpack4.4刷机指南](https://blog.csdn.net/qq_40695642/article/details/107936625)
- [TX2开发之刷机JetPack4.4](https://www.weixiuzhan.cn/news/show-32142.html)

PIS Test String: (Close door)
fd0301c0a80194003001020304011417030f01020301010102030405060708090a0b0c00000000000000000000fffffe