OpenMMlab exports the yolov3 model and uses onnxruntime and tensorrt for inference

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 […]

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 […]

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 […]

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 * […]