# alg **Repository Path**: wybest645769/alg ## Basic Information - **Project Name**: alg - **Description**: No description available - **Primary Language**: Python - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-12-18 - **Last Updated**: 2023-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Alg-Python #### Huey ## 算法描述 |算法名称|编码类型|报警描述| |---|---|---| |抽烟检测|01|Smoke Warning| |安全帽检测|02|Helmet Warning| |戴口罩检测|03|Mask Warning| |烟雾检测|04|Smog Warning| |火焰检测|05|Fire Warning| |手套检测|06|Glove Warning| |人流检测|07|PersonCnt Warning| |跌倒检测|08|Fall Warning| |离岗检测|09|Leave Warning| |睡岗检测|10|Sleep Warning| |打电话检测|11|Phone Warning| |反光衣检测|12|Reflective Warning| |电瓶车检测|13|Electromobile Warning| |动作识别|14|Action Warning| ## Minio 功能:用于存放算法运行的图片 'endpoint': '192.168.1.133:9000', 'access_key': 'minioadmin', 'secret_key': 'minioadmin', 'secure': False ## 消息推送 功能:用于算法处理结果的实时推送 ### Socket推送 #### 客户端 host = "192.168.1.133" port = 8895 #### 服务端 host = "192.168.1.133" port = 6666 buffer_size = 10240 address = (host, port) ### Http推送 http_url = "http://192.168.1.91:8098/yxyTest/saveData" ## Http接口 功能:用于接收服务端的任务调用、任务状态查询、任务暂停 任务调用:http://192.168.1.133:10000/task_start 任务状态查询: http://192.168.1.133:10000/task_statue 任务暂停:http://192.168.1.133:10000/task_pasuse 算法查询:http://192.168.1.133:10000/get_alg ## 通信协议拟定 ### 任务调用 Post { "inputUrl": "rtsp://admin:123uestc@192.168.1.32:554/h264/ch1/main/av_stream", "cameraId": "yxy-office", "alg":{ "mask": {"var": 50.0, "conf": 0.5, "iou": 0.5, "devId": "cuda:7", "pointList": "(509,203)(1313,201)(1317,955)(505,961)", "ydTime": 5, "lgTime": 100, "sleepTime": 60, "czTime": 5, "personNumber": 0 } } } Get { "code": 200, "data": "Alg running", "msg": "操作成功" } ### 任务状态查询 Post { "inputUrl": "rtsp://admin:123uestc@192.168.1.32:554/h264/ch1/main/av_stream", "cameraId": "yxy-office" } Get { "code": 200, "data": true, "msg": "操作成功" } ### 任务暂停 Post { "inputUrl": "rtsp://admin:123uestc@192.168.1.32:554/h264/ch1/main/av_stream", "cameraId": "yxy-office" } Get { "code": 200, "data": false, "msg": "操作成功" } ### 算法查询 { "code": 200, "data": "smoke, helmet, mask, fire, smnog, glove, personCnt, leave, sleep, fall, phone, reflective, electromobile", "msg": "操作成功" } ### 报警推送 { 'orgCode': '123456', 'alarmCode': '03', 'alarmRemark': 'Mask Warning', 'alarmCamera': 'yxy-office', 'alarmImg': 'http://192.168.1.133:9000/test/rtsp_img/office/1.jpg, 'alarmbjImg': ['http://192.168.1.133:9000/test/bj_img/office/2.jpg'], 'alarmTime': '2023-04-24-14:36:00.745', 'licence': 'uestc_up' }