短视频app源码,加载网络模型与读取各层信息
2021/8/17 14:36:09
本文主要是介绍短视频app源码,加载网络模型与读取各层信息,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
短视频app源码,加载网络模型与读取各层信息实现的相关代码
#include<iostream> #include<opencv2\opencv.hpp> #include<opencv2\dnn.hpp> using namespace cv::dnn; using namespace std; using namespace cv; string model = "D:/opencv-4.1.0/models/ssd/MobileNetSSD_deploy.caffemodel"; string cfg = "D:/opencv-4.1.0/models/ssd/MobileNetSSD_deploy.prototxt"; int main() { Net net; net= readNetFromCaffe(cfg, model); vector<string>layer_names = net.getLayerNames(); for (int i = 0; i < layer_names.size(); i++) { int id = net.getLayerId(layer_names[i]); auto layer = net.getLayer(id); printf("layer_id:%d,type:%s,name:%s\n", id, layer->type.c_str(), layer->name.c_str()); } waitKey(0); return 0; }
以上就是 短视频app源码,加载网络模型与读取各层信息实现的相关代码,更多内容欢迎关注之后的文章
这篇关于短视频app源码,加载网络模型与读取各层信息的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-26结对编程到底难不难?答案在这里
- 2024-06-19《2023版Java工程师》课程升级公告
- 2024-06-15matplotlib作图不显示3D图,怎么办?
- 2024-06-1503-Loki 日志监控
- 2024-06-1504-让LLM理解知识 -Prompt
- 2024-06-05做软件测试需要懂代码吗?
- 2024-06-0514-ShardingSphere的分布式主键实现
- 2024-06-03为什么以及如何要进行架构设计权衡?
- 2024-05-31全网首发第二弹!软考2024年5月《软件设计师》真题+解析+答案!(11-20题)
- 2024-05-31全网首发!软考2024年5月《软件设计师》真题+解析+答案!(21-30题)