current position：Home>Target tracking actual combat deepsort+yolov5 (on)
Target tracking actual combat deepsort+yolov5 (on)
携手创作,共同成长！这是我参与「掘金日新计划 · 8 月更文挑战」的第4天,点击查看活动详情 >>
The main purpose of today is to quickly get started with target tracking,In the previous words, I briefly talked about the Kalman filter,Then due to blogging issues,Not finished.I wanted to do a series,But it's hard to sort out,And to be honest, there are some things I don't understand.当然这并不影响我们使用,Abstract to continuehappy,Like you don't understandSpringBoot 或者Django底层一样,Still wide enough to make a website.
First of all, what we are talking about here is actually the whole project,是两个部分,One is the tracking part of the target,There is also the recognition and detection part of the target.We need to detect an item first,We can follow,At the same time, this algorithm is also based on the target detection algorithm.
The relationship between them is like this：
Then there is not much to say about target detection here.
You can refer to these blog posts：
So we are mainly heredeepsort的一个情况.
Speaking of this stuff, I have to talk about it firstsort算法.
Earlier when talking about the list tracking,我们说到了卡尔曼滤波 But this just solves a problem,It is the position where we predict that the next box of the modified object may exist,After that we calculate someIOUMake sure that this next box is our target object,So as to determine his trajectory to complete the target tracking.
But what we assumed earlier was a single-objective case,If it is multi-target,It also involves the question of how to assign a tracked target.That is, give the target a different label,Then recognize after predicting his trajectory,Determine which target this trajectory is for.
所以这个sortThe algorithm actually has two parts,That is, in order to complete one of our target tracking.
一个是匈牙利算法,The purpose is to determine who is who,One is that Kalman tracks in order to predict a state of the object.
deepsort 是在sortA lot of other work is done on the basis of the algorithm.
由于sortThe algorithm is still a rough tracking algorithm,When an object is occluded,Especially easy to lose your ownID.而Deepsort算法在sort算法的基础上增加了级联匹配(MatchingCascade)和新轨迹的确认(confirmed).TracksDivided into confirmation state(confirmed),and indeterminate state(unconfirmed),新产生的Tracksis indeterminate：UnconfirmedTracks必须要和DetectionsMatch a certain number of times in a row（默认是3)can be converted into a confirmed state.ConfirmedTracks必须和DetectionsiA certain number of consecutive mismatches（默认30次）,才会被删除.
Then his algorithm flow is probably like this: (Know the picture of the big guy）
Our words here today,Let's do a brief introduction first,After that, let's be like beforeyoloSame as how to train your own model,Then complete one of your needs.
We focus on seeing this firstdeep_sort Here I first give a description of these parameters.
（1）It contains the directory path of the feature extraction weights;
Then we will open it laterdeepsort文件夹,You can see these things：
ckpt.t7：This is the weights file for a feature extraction network,This weight file will be generated after the feature extraction network is trained,It is convenient to extract features in the target frame during target tracking,Avoid while target trackingID交换.
evaluate.py：Calculate feature extraction model accuracy.
feature_extractor.py：提取对应boundingbox中的特征, Get a fixed-dimensional feature,作为该bounding box的代表,供计算相似度时使用.
model.py：Feature extraction network model,The model is used to extract training features to extract network weights. train.py：Train the feature extraction networkpython文件
test.py：Test the performance of the trained feature extraction network
then in additionsortThe algorithm corresponds to this thing detection.py：Save a detection box detected by the target,As well as the confidence of the box and the acquired features;At the same time, the conversion methods of various formats of the frame are also provided.
iou_matching.py：Calculate between two boxesIOU.
kalman_filter.py：Relevant code for Kalman filter,It mainly uses Kalman filtering to predict the trajectory information of the detection frame.
linear_assignment.py：The Hungarian algorithm is used to match the predicted trajectory box and the detection box for the best matching effect.
nn_matching.py：By calculating the Euclidean distance、Cosine distance equidistant to calculate the nearest collar distance.
preprocessing.py：Non-maximum suppression code,Use the non-maximum suppression algorithm to output the optimal detection frame.
track.py：The main storage is track information,This includes the position and velocity information of the track box,track boxID和状态,There are three states,One is deterministic、不确定态、Delete state three states.
tracker.py：All track information is saved,Responsible for initializing the first frame,卡尔曼滤波的预测和更新,负责级联匹配,IOU匹配.
So go back to our root directory：
deep_sort/deep_sort/deep_sort.py：deepsortthe overall package,实现一个deepsortAn overall effect of tracking.
deep_sort/utils：Mainly there are some various tools herepython代码,For example the frame tool,Log saving tools and more.
author[the_way_inf],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Cross compiling under Linux to generate windows program
- JavaSE methods recursive exercises 】 【 create and use of the array
- vue-quill-editor rich text editor will clear spaces for content, filter empty strings, spaces; solution
- Constants and Preprocessors in C
- Use idea to create a multi-module Maven project (inheritance and dependencies between modules)
- Several ways of intercepting List
-  Java operation mode, program structure and notepad++
- Implementation of Permutation and Combination Algorithm in Java
- sql error injection
- Object-Oriented Programming
guess what you like
15 tips about SQL optimization
[Short Answer Questions] JavaWeb must ask 10 short answer questions
How to turn on the wireless screen mirroring function in win7
Operation and maintenance practice - the latest Nginx binary build and compile lua-nginx-module dynamic link Lua script access Redis database read static resources implicit display
Win7 wireless network list does not show up Win7 network connection icon disappears what to do
[Java Interview] This Internet high-frequency interview question stumped 80% of programmers?When does the index expire?
Win7 and win10 which takes up less resources Win7 and win10 take up resources in detail
The Voyager Digital: $is expected to start from August 11 to restore rapidly
windows cannot communicate with the device or resource (primary dns server)
- The get/post request tool (apifox/postman/browser) can request through but the java code can't solve the problem
- "Docker Basics: 2. Docker Installation" includes premise description, basic composition of Docker, Docker platform architecture diagram (architecture version), installation steps, Alibaba Cloud image acceleration, eternal HelloWorld, and underlying princi
- Spring Cloud Gateway integrates Nacos and Swagger to aggregate Api documents
- `Algorithmic Knowledge` Average
- Example of using ElasticsearchRestTemplate in SpringBoot, (add, delete, modify, highlight, id, paginate, time range, and multi-condition queries)
- Ubuntu encountered ERROR: configuration failed for package 'rJava' when installing xlsx package
- Openresty+nginx image server configuration, add http_image_filter_module module
- How to make Zuul support WebSocket
- What does this picture represent?
- "Docker Basics: 3. Docker Common Commands" includes help startup commands, mirroring commands, and mirroring to create containers, which is the fundamental premise (download a CentOS or ubuntu mirror demo), container commands, and a small summary
- Remember to configure the expiration time of @Cacheable (Redis specifies the expiration time of certain Cache Keys)
- [Deployment] Deploy the back-end project to the Pagoda Linux cloud server Java SpringBoot
- `Algorithm knowledge` Prime numbers
- Springcloud gateway gateway+authentication service+token mode, entrance layer authentication unified microservice authentication [design practice]
- (5) Backward compatibility problems in compilation
- Go native development blog project series (the third)
- Blog project (4, initialization)
- See three years of CRUD programmers how to solve the database deadlock
- Kettle Demand Reappears - 100 million details
- Deep understanding of volatile, Synchronized, and already the underlying implementation principle
- Spring common annotation analysis
- Docker quickly builds a PHP+Nginx+Mysql environment and steps on the pit diary
- Mac's own software - play with focus search
- What is the principle of the second type of dictionary method?
- Implementing a caching mechanism using soft references
- Vue entry page for the first time, how to distinguish between created and activated?
- Things to do with your new mac notebook
- [Java Interview] After 7 years of work, I went to the byte interview and turned around on this question. Could you please tell me your understanding of the time wheel?
- Optimization, genetic algorithm (ga)
- Advanced Guide to Algorithm Competition Recursive Implementation of Permutation Enumeration
- How to use the second type of dictionary method?
- mac Maven error No compiler is provided in this environment. Perhaps you are running on a JRE rat
- [Help] In the vue2 that the vue3 project is connected to as a subsystem, the whole project using el-drawer reports an error?
- Redis basis
- 【Macbook software sharing｜Use skills】Dry goods
- Advanced Guide to Algorithm Competition Recursive Implementation of Exponential Enumeration
- JAVA based - 11 - encapsulated inherited polymorphism - nine five small jean-marie le pen
- Trend Micro Written Test Review (Algorithm Question 2)
- Multilayer Perceptron - MLP