Windows C++ VS2022 OpenVINO 实例分割 Demo

目录

效果

模型信息

项目

代码

下载

其他


Windows C++ VS2022 OpenVINO 实例分割 Demo

效果

模型信息

Model Properties
-------------------------
date:2023-09-07T17:11:46.798385
description:Ultralytics YOLOv8n-seg model trained on coco.yaml
author:Ultralytics
task:segment
license:AGPL-3.0 https://ultralytics.com/license
version:8.0.172
stride:32
batch:1
imgsz:[640, 640]
names:{0: 'person', 1: 'bicycle', 2: 'car', 3: 'motorcycle', 4: 'airplane', 5: 'bus', 6: 'train', 7: 'truck', 8: 'boat', 9: 'traffic light', 10: 'fire hydrant', 11: 'stop sign', 12: 'parking meter', 13: 'bench', 14: 'bird', 15: 'cat', 16: 'dog', 17: 'horse', 18: 'sheep', 19: 'cow', 20: 'elephant', 21: 'bear', 22: 'zebra', 23: 'giraffe', 24: 'backpack', 25: 'umbrella', 26: 'handbag', 27: 'tie', 28: 'suitcase', 29: 'frisbee', 30: 'skis', 31: 'snowboard', 32: 'sports ball', 33: 'kite', 34: 'baseball bat', 35: 'baseball glove', 36: 'skateboard', 37: 'surfboard', 38: 'tennis racket', 39: 'bottle', 40: 'wine glass', 41: 'cup', 42: 'fork', 43: 'knife', 44: 'spoon', 45: 'bowl', 46: 'banana', 47: 'apple', 48: 'sandwich', 49: 'orange', 50: 'broccoli', 51: 'carrot', 52: 'hot dog', 53: 'pizza', 54: 'donut', 55: 'cake', 56: 'chair', 57: 'couch', 58: 'potted plant', 59: 'bed', 60: 'dining table', 61: 'toilet', 62: 'tv', 63: 'laptop', 64: 'mouse', 65: 'remote', 66: 'keyboard', 67: 'cell phone', 68: 'microwave', 69: 'oven', 70: 'toaster', 71: 'sink', 72: 'refrigerator', 73: 'book', 74: 'clock', 75: 'vase', 76: 'scissors', 77: 'teddy bear', 78: 'hair drier', 79: 'toothbrush'}
---------------------------------------------------------------

Inputs
-------------------------
name:images
tensor:Float[1, 3, 640, 640]
---------------------------------------------------------------

Outputs
-------------------------
name:output0
tensor:Float[1, 116, 8400]
name:output1
tensor:Float[1, 32, 160, 160]
---------------------------------------------------------------

项目

代码

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
 
#include <openvino/openvino.hpp> //openvino header file
#include <opencv2/opencv.hpp>    //opencv header file
 
#include  <direct.h>  
#include  <stdio.h> 
 
using namespace cv;
using namespace dnn;
 
std::vector<Scalar> colors = { Scalar(255, 0, 0), Scalar(255, 0, 255), Scalar(170, 0, 255), Scalar(255, 0, 85),
                                   Scalar(255, 0, 170), Scalar(85, 255, 0), Scalar(255, 170, 0), Scalar(0, 255, 0),
                                   Scalar(255, 255, 0), Scalar(0, 255, 85), Scalar(170, 255, 0), Scalar(0, 85, 255),
                                   Scalar(0, 255, 170), Scalar(0, 0, 255), Scalar(0, 255, 255), Scalar(85, 0, 255) };
 
const std::vector<std::string> class_names = {
    "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light",
    "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow",
    "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee",
    "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard",
    "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple",
    "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch",
    "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone",
    "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear",
    "hair drier", "toothbrush" };
 
// Keep the ratio before resize
Mat letterbox(const cv::Mat& source)
{
    int col = source.cols;
    int row = source.rows;
    int _max = MAX(col, row);
    Mat result = Mat::zeros(_max, _max, CV_8UC3);
    source.copyTo(result(Rect(0, 0, col, row)));
    return result;
}
 
float sigmoid_function(float a) {
    float b = 1. / (1. + exp(-a));
    return b;
}
 
int main(int argc, char* argv[])
{
 
    char   buffer[100];
    _getcwd(buffer, 100);
    std::cout << "当前路径:" << buffer << std::endl;
 
    // -------- Step 1. Initialize OpenVINO Runtime Core --------
    ov::Core core;
 
    // -------- Step 2. Compile the Model --------
    String model_path = String(buffer) + "\\yolov8n-seg.xml";
    auto compiled_model = core.compile_model(model_path, "CPU");
 
    // -------- Step 3. Create an Inference Request --------
    ov::InferRequest infer_request = compiled_model.create_infer_request();
 
    // -------- Step 4.Read a picture file and do the preprocess --------
    Mat img = cv::imread("bus.jpg");
    // Preprocess the image
    Mat letterbox_img = letterbox(img);
    float scale = letterbox_img.size[0] / 640.0;
    Mat blob = blobFromImage(letterbox_img, 1.0 / 255.0, Size(640, 640), Scalar(), true);
 
    // -------- Step 5. Feed the blob into the input node of the Model -------
    // Get input port for model with one input
    auto input_port = compiled_model.input();
    // Create tensor from external memory
    ov::Tensor input_tensor(input_port.get_element_type(), input_port.get_shape(), blob.ptr(0));
    // Set input tensor for model with one input
    infer_request.set_input_tensor(input_tensor);
 
    // -------- Step 6. Start inference --------
    infer_request.infer();
 
    // -------- Step 7. Get the inference result --------
    auto output0 = infer_request.get_output_tensor(0); //output0
    auto output1 = infer_request.get_output_tensor(1); //otuput1
    auto output0_shape = output0.get_shape();
    auto output1_shape = output1.get_shape();
    std::cout << "The shape of output0:" << output0_shape << std::endl;
    std::cout << "The shape of output1:" << output1_shape << std::endl;
 
    // -------- Step 8. Postprocess the result --------
    Mat output_buffer(output0_shape[1], output0_shape[2], CV_32F, output0.data<float>());
    Mat proto(32, 25600, CV_32F, output1.data<float>()); //[32,25600]
    transpose(output_buffer, output_buffer); //[8400,116]
    float score_threshold = 0.25;
    float nms_threshold = 0.5;
    std::vector<int> class_ids;
    std::vector<float> class_scores;
    std::vector<Rect> boxes;
    std::vector<Mat> mask_confs;
    // Figure out the bbox, class_id and class_score
    for (int i = 0; i < output_buffer.rows; i++) {
        Mat classes_scores = output_buffer.row(i).colRange(4, 84);
        Point class_id;
        double maxClassScore;
        minMaxLoc(classes_scores, 0, &maxClassScore, 0, &class_id);
 
        if (maxClassScore > score_threshold) {
            class_scores.push_back(maxClassScore);
            class_ids.push_back(class_id.x);
            float cx = output_buffer.at<float>(i, 0);
            float cy = output_buffer.at<float>(i, 1);
            float w = output_buffer.at<float>(i, 2);
            float h = output_buffer.at<float>(i, 3);
 
            int left = int((cx - 0.5 * w) * scale);
            int top = int((cy - 0.5 * h) * scale);
            int width = int(w * scale);
            int height = int(h * scale);
 
            cv::Mat mask_conf = output_buffer.row(i).colRange(84, 116);
            mask_confs.push_back(mask_conf);
            boxes.push_back(Rect(left, top, width, height));
        }
    }
    //NMS
    std::vector<int> indices;
    NMSBoxes(boxes, class_scores, score_threshold, nms_threshold, indices);
 
    // -------- Visualize the detection results -----------
    cv::Mat rgb_mask = cv::Mat::zeros(img.size(), CV_8UC3);
    cv::Mat masked_img;
    cv::RNG rng;
 
    for (size_t i = 0; i < indices.size(); i++) {
        // Visualize the objects
        int index = indices[i];
        int class_id = class_ids[index];
        rectangle(img, boxes[index], colors[class_id % 16], 2, 8);
        std::string label = class_names[class_id] + ":" + std::to_string(class_scores[index]).substr(0, 4);
        Size textSize = cv::getTextSize(label, FONT_HERSHEY_SIMPLEX, 0.5, 1, 0);
        Rect textBox(boxes[index].tl().x, boxes[index].tl().y - 15, textSize.width, textSize.height + 5);
        cv::rectangle(img, textBox, colors[class_id % 16], FILLED);
        putText(img, label, Point(boxes[index].tl().x, boxes[index].tl().y - 5), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255, 255, 255));
 
        // Visualize the Masks
        Mat m = mask_confs[index] * proto;
        for (int col = 0; col < m.cols; col++) {
            m.at<float>(0, col) = sigmoid_function(m.at<float>(0, col));
        }
 
        cv::Mat m1 = m.reshape(1, 160); // 1x25600 -> 160x160
 
        int x1 = std::max(0, boxes[index].x);
        int y1 = std::max(0, boxes[index].y);
        int x2 = std::max(0, boxes[index].br().x);
        int y2 = std::max(0, boxes[index].br().y);
 
        int mx1 = int(x1 / scale * 0.25);
        int my1 = int(y1 / scale * 0.25);
        int mx2 = int(x2 / scale * 0.25);
        int my2 = int(y2 / scale * 0.25);
 
        cv::Mat mask_roi = m1(cv::Range(my1, my2), cv::Range(mx1, mx2));
        cv::Mat rm, det_mask;
        cv::resize(mask_roi, rm, cv::Size(x2 - x1, y2 - y1));
 
        for (int r = 0; r < rm.rows; r++) {
            for (int c = 0; c < rm.cols; c++) {
                float pv = rm.at<float>(r, c);
                if (pv > 0.5) {
                    rm.at<float>(r, c) = 1.0;
                }
                else {
                    rm.at<float>(r, c) = 0.0;
                }
            }
        }
        rm = rm * rng.uniform(0, 255);
        rm.convertTo(det_mask, CV_8UC1);
        if ((y1 + det_mask.rows) >= img.rows) {
            y2 = img.rows - 1;
        }
        if ((x1 + det_mask.cols) >= img.cols) {
            x2 = img.cols - 1;
        }
 
        cv::Mat mask = cv::Mat::zeros(cv::Size(img.cols, img.rows), CV_8UC1);
       
        det_mask= det_mask( cv::Range(0, y2 - y1), cv::Range(0, x2 - x1));
 
        Rect roi(x1, y1, x2 - x1, y2 - y1);
        det_mask.copyTo(Mat(mask, roi));
        
        add(rgb_mask, cv::Scalar(rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255)), rgb_mask, mask);
        
        addWeighted(img, 0.5, rgb_mask, 0.5, 0, masked_img);
    }
 
    namedWindow("YOLOv8-Seg OpenVINO Inference C++ Demo", WINDOW_AUTOSIZE);
    imshow("YOLOv8-Seg OpenVINO Inference C++ Demo", masked_img);
    waitKey(0);
    destroyAllWindows();
    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>#include <openvino/openvino.hpp> //openvino header file
#include <opencv2/opencv.hpp>    //opencv header file#include  <direct.h>  
#include  <stdio.h> using namespace cv;
using namespace dnn;std::vector<Scalar> colors = { Scalar(255, 0, 0), Scalar(255, 0, 255), Scalar(170, 0, 255), Scalar(255, 0, 85),Scalar(255, 0, 170), Scalar(85, 255, 0), Scalar(255, 170, 0), Scalar(0, 255, 0),Scalar(255, 255, 0), Scalar(0, 255, 85), Scalar(170, 255, 0), Scalar(0, 85, 255),Scalar(0, 255, 170), Scalar(0, 0, 255), Scalar(0, 255, 255), Scalar(85, 0, 255) };const std::vector<std::string> class_names = {"person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light","fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow","elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee","skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard","tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple","sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch","potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone","microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear","hair drier", "toothbrush" };// Keep the ratio before resize
Mat letterbox(const cv::Mat& source)
{int col = source.cols;int row = source.rows;int _max = MAX(col, row);Mat result = Mat::zeros(_max, _max, CV_8UC3);source.copyTo(result(Rect(0, 0, col, row)));return result;
}float sigmoid_function(float a) {float b = 1. / (1. + exp(-a));return b;
}int main(int argc, char* argv[])
{char   buffer[100];_getcwd(buffer, 100);std::cout << "当前路径:" << buffer << std::endl;// -------- Step 1. Initialize OpenVINO Runtime Core --------ov::Core core;// -------- Step 2. Compile the Model --------String model_path = String(buffer) + "\\yolov8n-seg.xml";auto compiled_model = core.compile_model(model_path, "CPU");// -------- Step 3. Create an Inference Request --------ov::InferRequest infer_request = compiled_model.create_infer_request();// -------- Step 4.Read a picture file and do the preprocess --------Mat img = cv::imread("bus.jpg");// Preprocess the imageMat letterbox_img = letterbox(img);float scale = letterbox_img.size[0] / 640.0;Mat blob = blobFromImage(letterbox_img, 1.0 / 255.0, Size(640, 640), Scalar(), true);// -------- Step 5. Feed the blob into the input node of the Model -------// Get input port for model with one inputauto input_port = compiled_model.input();// Create tensor from external memoryov::Tensor input_tensor(input_port.get_element_type(), input_port.get_shape(), blob.ptr(0));// Set input tensor for model with one inputinfer_request.set_input_tensor(input_tensor);// -------- Step 6. Start inference --------infer_request.infer();// -------- Step 7. Get the inference result --------auto output0 = infer_request.get_output_tensor(0); //output0auto output1 = infer_request.get_output_tensor(1); //otuput1auto output0_shape = output0.get_shape();auto output1_shape = output1.get_shape();std::cout << "The shape of output0:" << output0_shape << std::endl;std::cout << "The shape of output1:" << output1_shape << std::endl;// -------- Step 8. Postprocess the result --------Mat output_buffer(output0_shape[1], output0_shape[2], CV_32F, output0.data<float>());Mat proto(32, 25600, CV_32F, output1.data<float>()); //[32,25600]transpose(output_buffer, output_buffer); //[8400,116]float score_threshold = 0.25;float nms_threshold = 0.5;std::vector<int> class_ids;std::vector<float> class_scores;std::vector<Rect> boxes;std::vector<Mat> mask_confs;// Figure out the bbox, class_id and class_scorefor (int i = 0; i < output_buffer.rows; i++) {Mat classes_scores = output_buffer.row(i).colRange(4, 84);Point class_id;double maxClassScore;minMaxLoc(classes_scores, 0, &maxClassScore, 0, &class_id);if (maxClassScore > score_threshold) {class_scores.push_back(maxClassScore);class_ids.push_back(class_id.x);float cx = output_buffer.at<float>(i, 0);float cy = output_buffer.at<float>(i, 1);float w = output_buffer.at<float>(i, 2);float h = output_buffer.at<float>(i, 3);int left = int((cx - 0.5 * w) * scale);int top = int((cy - 0.5 * h) * scale);int width = int(w * scale);int height = int(h * scale);cv::Mat mask_conf = output_buffer.row(i).colRange(84, 116);mask_confs.push_back(mask_conf);boxes.push_back(Rect(left, top, width, height));}}//NMSstd::vector<int> indices;NMSBoxes(boxes, class_scores, score_threshold, nms_threshold, indices);// -------- Visualize the detection results -----------cv::Mat rgb_mask = cv::Mat::zeros(img.size(), CV_8UC3);cv::Mat masked_img;cv::RNG rng;for (size_t i = 0; i < indices.size(); i++) {// Visualize the objectsint index = indices[i];int class_id = class_ids[index];rectangle(img, boxes[index], colors[class_id % 16], 2, 8);std::string label = class_names[class_id] + ":" + std::to_string(class_scores[index]).substr(0, 4);Size textSize = cv::getTextSize(label, FONT_HERSHEY_SIMPLEX, 0.5, 1, 0);Rect textBox(boxes[index].tl().x, boxes[index].tl().y - 15, textSize.width, textSize.height + 5);cv::rectangle(img, textBox, colors[class_id % 16], FILLED);putText(img, label, Point(boxes[index].tl().x, boxes[index].tl().y - 5), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255, 255, 255));// Visualize the MasksMat m = mask_confs[index] * proto;for (int col = 0; col < m.cols; col++) {m.at<float>(0, col) = sigmoid_function(m.at<float>(0, col));}cv::Mat m1 = m.reshape(1, 160); // 1x25600 -> 160x160int x1 = std::max(0, boxes[index].x);int y1 = std::max(0, boxes[index].y);int x2 = std::max(0, boxes[index].br().x);int y2 = std::max(0, boxes[index].br().y);int mx1 = int(x1 / scale * 0.25);int my1 = int(y1 / scale * 0.25);int mx2 = int(x2 / scale * 0.25);int my2 = int(y2 / scale * 0.25);cv::Mat mask_roi = m1(cv::Range(my1, my2), cv::Range(mx1, mx2));cv::Mat rm, det_mask;cv::resize(mask_roi, rm, cv::Size(x2 - x1, y2 - y1));for (int r = 0; r < rm.rows; r++) {for (int c = 0; c < rm.cols; c++) {float pv = rm.at<float>(r, c);if (pv > 0.5) {rm.at<float>(r, c) = 1.0;}else {rm.at<float>(r, c) = 0.0;}}}rm = rm * rng.uniform(0, 255);rm.convertTo(det_mask, CV_8UC1);if ((y1 + det_mask.rows) >= img.rows) {y2 = img.rows - 1;}if ((x1 + det_mask.cols) >= img.cols) {x2 = img.cols - 1;}cv::Mat mask = cv::Mat::zeros(cv::Size(img.cols, img.rows), CV_8UC1);det_mask= det_mask( cv::Range(0, y2 - y1), cv::Range(0, x2 - x1));Rect roi(x1, y1, x2 - x1, y2 - y1);det_mask.copyTo(Mat(mask, roi));add(rgb_mask, cv::Scalar(rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255)), rgb_mask, mask);addWeighted(img, 0.5, rgb_mask, 0.5, 0, masked_img);}namedWindow("YOLOv8-Seg OpenVINO Inference C++ Demo", WINDOW_AUTOSIZE);imshow("YOLOv8-Seg OpenVINO Inference C++ Demo", masked_img);waitKey(0);destroyAllWindows();return 0;
}

下载

 源码下载

其他

环境配置参考:https://lw112190.blog.csdn.net/article/details/132827809

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/230039.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

为开发者设计的幻灯片演示工具Slidev

什么是 Slidev &#xff1f; Slidev 是专为程序员打造的演示文稿工具。该项目是基于 Web 的幻灯片制作和演示工具&#xff0c;让用户可以使用 纯文本 Markdown 语法制作幻灯片&#xff0c;支持导出为 PDF 或 PNG 格式的文件&#xff0c;或以单页面展示幻灯片。对于大多数不擅长…

Linux 中的 waitqueue 机制详解

源码基于&#xff1a;Linux5.10 0. 前言 等待队列&#xff08;waitqueue&#xff09; 这个机制在Linux 内核中使用的频率很高&#xff0c;与进程调度机制紧密相关联&#xff0c;可以用来同步对系统资源的访问、异步事件通知、跨进程通信等。网上关于等待队列使用的优秀文章也很…

Nginx location+Nginx rewrite(重写)(新版)

Nginx locationNginx rewrite(重写) Nginx locationNginx rewrite(重写)一、location1、常用的Nginx 正则表达式2、location的类型3、location 的匹配规则4、location 优先级5、location 示例说明5.1只修改网页路径5.2修改nginx配置文件和网页路径5.3一般前缀5.4正则匹配5.5前缀…

百分比组件 - elementui改动

<el-slider v-model"value2" style"width: 87%;position: absolute;bottom: 9px;" disabled :show-tooltip"false"></el-slider>value2: 0,// 百分比条 ::v-deep .el-slider__runway.disabled .el-slider__bar {background-color: #…

linux应急响应基础和常用命令

linux应急响应 linux应急响应基础和常用命令基于linux系统本身进行应急响应。 系统基础信息获取 获取linux服务器基本信息 命令&#xff1a; uname -a内存cpu信息 cat /proc/cpuinfo cat /proc/meminfo lscpu free -m lsmod #查看载入的模块信息进程查看 动态进程查看 …

7.实现任务的rebalance

1.设计 1.1 背景 系统启动后&#xff0c;所有任务都在被执行&#xff0c;如果这时某个节点宕机&#xff0c;那它负责的任务就不能执行了&#xff0c;这对有稳定性要求的任务是不能接受的&#xff0c;所以系统要实现rebalance的功能。 1.2 设计 下面是Job分配与执行的业务点…

基于PyCharm实现串口GUI编程

工具效果如下如所示 下面简单介绍一下操作流程 1.打开PyCharm软件 2.创建一个工程 3.给该工程命名 4.在main.py里面黏贴如下的代码 # This is a sample Python script. # Press ShiftF10 to execute it or replace it with your code. # Press Double Shift to search everyw…

【LeetCode刷题笔记(3)】【Python】【最长连续序列】【中等】

文章目录 最长连续序列题目描述示例示例 1示例 2 提示 解决方案解决方案1&#xff1a;【集合去重】【遍历数组查找元素】避免无效计数方案1的可行性分析 解决方案2&#xff1a;【集合去重】 【遍历集合查找元素】运行结果复杂度分析 结束语 最长连续序列 最长连续序列 题目描述…

c语言 文件与文件操作

&#x1f3e0; 一.引言 我们日常生活中会将我们制作的ppt,word等存放在文件里进行归类&#xff0c;你是否知道我们能用cC语言对文件进行操作呢(比如文件的打开&#xff0c;关闭和读写等)&#xff1f;那接下来跟博主一起来学习下吧。 &#x1f3e0;二.什么是文件 磁盘上的文件就…

<VR串流线方案> PICO 4 Pro VR串流线方案 Oculus Quest2 Link串流线方案

虚拟现实技术(英文名称&#xff1a;Virtual Reality&#xff0c;缩写为VR)&#xff0c;又称虚拟实境或灵境技术&#xff0c;是20世纪发展起来的一项全新的实用技术。虚拟现实技术囊括计算机、电子信息、仿真技术&#xff0c;其基本实现方式是以计算机技术为主&#xff0c;利用并…

MES系统工单进度查询:提升生产控制与监控

在MES系统中&#xff0c;工单进度查询是一个至关重要的功能&#xff0c;它为企业提供了实时、准确地追踪和监控生产工单进度的能力。 一、MES系统工单进度查询的重要性 1. 实时监控生产进度&#xff1a;通过工单进度查询&#xff0c;企业能够随时了解每个工单的进展情况&#…

qt实现基本文件操作

先通过ui界面实现基本框架 接下来就要实现每个按键的功能了 我们先来实现新建的的功能&#xff0c;我们右键新建键&#xff0c;可以发现没有转到槽的功能&#xff0c;因此我们要自己写connect来建立关系。 private slots:void newActionSlot(); 在.h文件中加上槽函数。 conne…

【ZYNQ学习】PL第一课

这节课讲什么&#xff1f; 这节课的名字本来是想写为LED&#xff0c;但这一课里除了LED也有按键&#xff0c;又想换为GPIO控制&#xff0c;但关于PL的GPIO控制&#xff0c;不应该这么草率和简单&#xff0c;而且这一课有很多和ZYNQ或者PL关联性不强的东西要说。 所以我写了删删…

【Go】基于GoFiber从零开始搭建一个GoWeb后台管理系统(四)用户管理、部门管理模块

第一篇&#xff1a;【Go】基于GoFiber从零开始搭建一个GoWeb后台管理系统&#xff08;一&#xff09;搭建项目 第二篇&#xff1a;【Go】基于GoFiber从零开始搭建一个GoWeb后台管理系统&#xff08;二&#xff09;日志输出中间件、校验token中间件、配置路由、基础工具函数。 …

眼镜店验光配镜处方单打印管理系统软件教程

一、前言 1、眼镜店原始的手写处方单逐步被电脑打印单取代 2、使用电脑开单&#xff0c;记录可以保存可以查询&#xff0c;而且同一个人配镜可以对比之前的信息 软件下载或技术支持可以点击最下方官网卡片 如上图&#xff0c;该软件有顾客信息模块&#xff0c;旧镜检查模块…

Acre1-6000电气火灾监控系统在工矿企业的应用——安科瑞 顾烊宇

摘要&#xff1a;主要介绍了电气火灾的主要原因、几种电气火灾监控系统的构成和设立意义。参照各规范&#xff0c;讨论了宜设立电气火灾监控系统的场所。该系统的设立可大大减少电气火灾事故的发生&#xff0c;对保证人们的生命财产安全具有重要意义。 关键词:电气火灾&#x…

极智开发 | macwindows本地部署安装AIGC绘图工具Stable Diffusion WebUI

欢迎关注我的公众号 [极智视界],获取我的更多经验分享 大家好,我是极智视界,本文分享一下 mac&windows本地部署安装AIGC绘图工具Stable Diffusion WebUI。 邀您加入我的知识星球「极智视界」,星球内有超多好玩的项目实战源码和资源下载,链接:https://t.zsxq.com/0ai…

Redis-对象

参考资料 极客时间Redis&#xff08;亚风&#xff09; Redis对象 String • 基本编码⽅式是RAW&#xff0c;基于简单动态字符串&#xff08;SDS&#xff09;实现&#xff0c;存储上限为512mb。 • 如果存储的SDS⻓度⼩于44字节&#xff0c;则会采⽤EMBSTR编码&#xff0c;此…

2023年国家基地“楚慧杯”网络空间安全实践能力竞赛 Wp 一点WP

MISC 参考文章&#xff1a; 天权信安“”2023年国家基地“楚慧杯”网络安全实践能力竞赛初赛WriteUp ez-zip 使用脚本解套娃压缩包 import io import zipfilewith open("4096.zip", "rb") as f:data f.read()info "666"while True:with zi…

AttributeError: module ‘jax‘ has no attribute ‘Array‘解决方案

大家好&#xff0c;我是爱编程的喵喵。双985硕士毕业&#xff0c;现担任全栈工程师一职&#xff0c;热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。…