Export onnx file Use script directly import torch from mmdet.apis import init_detector, inference_detector config_file = ‘./configs/yolo/yolov3_mobilenetv2_8xb24-ms-416-300e_coco.py’ checkpoint_file = ‘yolov3_mobilenetv2_mstrain-416_300e_coco_20210718_010823-f68a07b3.pth’ model = init_detector(config_file, checkpoint_file, device=’cpu’) # or device=’cuda:0′ torch.onnx.export(model, (torch.zeros(1, 3, 416, 416),), “yolov3.onnx”, opset_version=11) The exported onnx structure is as follows: The output is the output of three different levels of detection heads. If you […]
Tag: ime
Three basic algorithms for sorting with time complexity n^2
Foreword: Bubble sort, selection sort, and insertion sort are all sorting algorithms with a time complexity of n^2. They are also the basis for us to learn other sorting algorithms later. Next, I will explain these three sorting algorithms to you in as much detail as possible. Time and optimization plan, if you have gained […]
Use cdc technology to synchronize data in real time (canal) – monitor local data and synchronize data to the cloud database through MQ
Use cdc technology to synchronize data in real time (canal) – monitor local data and synchronize data to the cloud database through MQ 1. Download the canal package and modify the configuration file conf -> instance.properties under example canal.instance.master.address=192.168.8.211:3306 Change the connection database path canal.instance.dbUsername=root user account to connect to the database canal.instance.dbPassword=123456 User password […]
A completely decoupled time slice polling framework structure
1. The importance of program framework Many people, especially beginners, tend to think about writing bit by bit when writing code. They don’t have an overall plan at the beginning, which leads to more and more messy code later and constant bugs. In the end, the code seems to run without any problems (there may […]
Data structure (C language) experiment-singly linked list
Singly linked list without head node Inverted linked list Assume that the linear table (a1, a2, a3,…an) is stored in a singly linked list without a head node, Please design the algorithm function linklist reverse1(linklist head) and void reverse2(linklist *head) inverts the head of a singly linked list without a head node in place, Make […]
Data structure – time complexity and space complexity
1. Algorithm efficiency 1.1 Complexity of algorithm After the algorithm is written into an executable program, it takes time, resources and space to run. ( Memory ) resource . therefore Measuring the quality of an algorithm, generally Measured from two dimensions: time and space , namely time complexity and space complexity. Time complexity mainly measures […]
[Elementary Data Structure] Time Complexity and Space Complexity of Algorithms
Hello readers! Now I will briefly talk about a basic knowledge point in data structure based on C language: the time complexity and space complexity of the algorithm. I hope it will be helpful to you. Table of Contents 1. What is a data structure? 2. What is an algorithm? 3. Time complexity 3.1 The […]
Algorithm time complexity and space complexity and space complexity
When we usually do math problems, there are simple methods and complex methods for the same problem. And the same goes for our computer programs. When an algorithm is written as an executable program, it requires time resources and space (memory) resources when running. Therefore, measuring the quality of an algorithm is generally measured from […]
About using Android Service for the first time
First, understand what is service? My personal understanding of service is that it is an activity without an interface. It runs some events in the background of your mobile phone that do not need to be displayed to the user. For example: you have clearly exited the app, but some apps will still pop up […]
Experiment 4-Implementation and application of semaphore
Implementation and application of semaphore Corresponding experiment manual: https://hoverwinter.gitbooks.io/hit-oslab-manual/content/sy4_sem.html Supplementary knowledge Semaphore operations Reference links: https://c.biancheng.net/view/8632.html https://www.cnblogs.com/Suzkfly/p/14351449.html head File: #include<fcntl.h> #include<sys/stat.h> #include<semaphore.h> Operation function: //Open the named semaphore sem_t * sem_open(const char * name, int oflag, mode_t mode, unsigned int value); //Close the semaphore int sem_close(sem_t * sem); //Delete semaphore file int sem_unlink(const cahr * […]