# OpenKnowledge **Repository Path**: quantchi/open-knowledge ## Basic Information - **Project Name**: OpenKnowledge - **Description**: OpenKnowledge是面向视频感知开源技术体系,基于知识图谱,对视频感知相关领域技术、算法、模型等开源资源进行管理的框架,用户可以根据需求通过定义的多种查询方式检索并选择所需数据资源,根据指示下载、使用相关资源,满足任务需求。 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-12-05 - **Last Updated**: 2022-05-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OpenKnowledge ## 介绍 OpenKnowledge是面向视频感知开源技术体系,基于知识图谱,对视频感知相关领域技术、算法、模型等开源资源进行管理的框架,用户可以根据需求通过定义的多种查询方式检索并选择所需数据资源,根据指示下载、使用相关资源,满足任务需求。 ## 已有模型清单 1. 人车目标检测工程 2. 场景感知-车道线 ## 使用说明 ### 模型查询 1. 根据领域查询对应模型 ``` curl -H "Content-Type: application/json" -X POST -d '{"query_type": "field", "value":"视频感知应用场景"}' http://localhost:8185/query { "codes": 200, "msg": "Model Card: model name is 交通工具检测model, path is 视频感知应用场景 -> 智能交通监测 -> 交通物体目标检测 -> 交通工具检测 -> 交通工具检测model\n example code is at https://gitee.com/quantchi/open-knowledge/raw/master/codes/人车目标检测codes.zip, pretrained models are at ['https://gitee.com/quantchi/open-knowledge/raw/master/models/人车目标检测工程/yolov5s.pt']\n \n Model Card: model name is 车道线检测model, path is 视频感知应用场景 -> 智能交通监测 -> 交通物体目标检测 -> 车道线检测 -> 车道线检测model\n example code is at https://gitee.com/quantchi/open-knowledge/raw/master/codes/场景感知-车道线codes.zip, pretrained models are at ['https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-640-640.onnx', 'https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-320-320.onnx', 'https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-1280-1280.onnx']\n \n " } ``` 2. 根据任务查询对应模型 ``` curl -H "Content-Type: application/json" -X POST -d '{"query_type": "task", "value":"交通物体目标检测"}' http://localhost:8185/query { "codes": 200, "msg": "Model Card: model name is 交通工具检测model, path is 视频感知应用场景 -> 智能交通监测 -> 交通物体目标检测 -> 交通工具检测 -> 交通工具检测model\n example code is at https://gitee.com/quantchi/open-knowledge/raw/master/codes/人车目标检测codes.zip, pretrained models are at ['https://gitee.com/quantchi/open-knowledge/raw/master/models/人车目标检测工程/yolov5s.pt']\n \n Model Card: model name is 车道线检测model, path is 视频感知应用场景 -> 智能交通监测 -> 交通物体目标检测 -> 车道线检测 -> 车道线检测model\n example code is at https://gitee.com/quantchi/open-knowledge/raw/master/codes/场景感知-车道线codes.zip, pretrained models are at ['https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-640-640.onnx', 'https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-320-320.onnx', 'https://gitee.com/quantchi/open-knowledge/raw/master/models/场景感知-车道线/yolop-1280-1280.onnx']\n \n " } ``` 3. 根据检测目标查询对应模型 ``` curl -H "Content-Type: application/json" -X POST -d '{"query_type": "object", "value":"自行车"}' http://localhost:8185/query { "codes": 200, "msg": "Model Card: model name is 交通工具检测model, path is 视频感知应用场景 -> 智能交通监测 -> 交通物体目标检测 -> 交通工具检测 -> 交通工具检测model\n example code is at https://gitee.com/quantchi/open-knowledge/raw/master/codes/人车目标检测codes.zip, pretrained models are at ['https://gitee.com/quantchi/open-knowledge/raw/master/models/人车目标检测工程/yolov5s.pt']\n \n " } ``` ### 下载模型 根据curl返回结果中的提示,从链接下载样例代码和预训练模型。 例如 `wget -c https://gitee.com/quantchi/open-knowledge/raw/master/codes/人车目标检测codes.zip -O 人车目标检测codes.zip`。 ### 使用模型 解压样例代码,将预训练模型放置于样例代码文件夹中的pretrained_models文件夹中,运行`python example.py`。