Feature extraction method and apparatus, and electronic device
By filtering out objects from multiple target objects that are likely to be reported later and extracting their fine-grained features, the problem of computing resource congestion in the case of multiple target objects is solved, and the efficiency and accuracy of feature extraction are improved.
Patent Information
- Application Number
- PCT/CN2024/143490
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-25
- Filing Date
- 2024-12-28
- Publication Date
- 2025-10-30
AI Technical Summary
In the case of multiple target objects, devices with lower computing power cannot extract fine-grained features of multiple target objects at the same time, resulting in congestion of computing resources and affecting the timely reporting of target objects.
By filtering multiple target objects, pre-selected target objects that are likely to be reported in the future are identified, and their fine-grained features are extracted, avoiding the congestion of computing resources caused by extracting fine-grained features of all target objects at the same time.
It effectively solves the problem of computing resource congestion when extracting fine-grained features from multiple targets simultaneously, maximizes the utilization of computing resources, and improves the extraction accuracy and reporting accuracy of fine-grained features.
Smart Images

Figure CN2024143490_30102025_PF_FP_ABST
Abstract
Description
Feature extraction methods, apparatus and electronic devices
[0001] Cross-references to related applications
[0002] This disclosure claims priority to Chinese Patent Application No. 2024105039406, filed on April 25, 2024, entitled “Feature Extraction Method, Apparatus and Electronic Device”, which is incorporated herein by reference in its entirety. Technical Field
[0003] This disclosure relates to the field of image processing technology, and for example to a feature extraction method, apparatus and electronic device. Background Technology
[0004] In some intelligent deployment scenarios, such as monitoring key areas, the current approach mainly involves using cameras to collect images of the monitored area and then detecting, filtering, and tracking the collected images. When an object is detected entering a key area through a certain frame of image, it is necessary to extract the fine-grained features of that object and report it.
[0005] When there is only one object, i.e., a single target object, some devices with lower computing power can effectively extract the fine-grained features of the single target object when it is detected entering a key area through a frame of image. However, when there are multiple objects, i.e., multiple target objects, extracting the fine-grained features of multiple target objects requires more computing resources. This can lead to congestion of computing resources on devices with lower computing power, making it impossible to extract the fine-grained features of multiple target objects simultaneously.
[0006] Therefore, how to solve the problem of computing resource congestion when extracting fine-grained features from multiple target objects simultaneously is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0007] This disclosure provides a feature extraction method, apparatus, and electronic device that can effectively solve the problem of computing resource congestion when extracting fine-grained features from multiple target objects simultaneously.
[0008] This disclosure provides a feature extraction method, including:
[0009] Target detection is performed on the image to be processed to obtain multiple target objects in the image to be processed;
[0010] From the plurality of target objects, at least one pre-selected target object to be reported is determined, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability;
[0011] Extract fine-grained features for each of the pre-selected target objects to be reported.
[0012] According to a feature extraction method provided in this disclosure, determining at least one pre-selected target object to be reported from the plurality of target objects includes:
[0013] If the sequence number of the image to be processed in the image acquired within the acquisition time period is less than or equal to a preset sequence number, for each target object, the weight of the target object is determined based on the first feature information of the target object; wherein, the first feature information includes at least one of the following: whether the fine-grained features of the target object have been extracted, the number of times the target object is detected within the acquisition time period, the number of times the target object moves within the acquisition time period, and the number of times the area of the target detection box corresponding to the target object increases within the acquisition time period;
[0014] Based on the weight of each target object, the pre-selected target objects to be reported are determined from the plurality of target objects.
[0015] According to a feature extraction method provided in this disclosure, determining at least one pre-selected target object to be reported from the plurality of target objects includes:
[0016] If the sequence number of the image to be processed is greater than the preset sequence number in the images acquired within the acquisition time period, for each target object, it is determined whether the fine-grained features of the target object have been extracted;
[0017] From the plurality of target objects, at least one first target object whose fine-grained features have been extracted is determined, and based on the first feature information of each first target object, the weight of each first target object is determined, and a first target object sequence is determined based on the weight of each first target object.
[0018] From the plurality of target objects, at least one second target object whose fine-grained features have not been extracted is determined. Based on the second feature information of each second target object, a sequence of second target objects is determined. The second feature information includes the category to which the second target object belongs and the region where the second target object is located in the image to be processed.
[0019] Based on the first target object sequence and the second target object sequence, the pre-selected target objects to be reported are determined from the plurality of target objects.
[0020] According to a feature extraction method provided in this disclosure, determining the second target object sequence based on the second feature information of each second target object includes:
[0021] For each of the second target objects, a dataset corresponding to the second target object is determined based on the second feature information of the second target object. The dataset includes at least one associated data of at least one historical target object detected in the region based on images prior to the image to be processed. Each associated data includes a historical velocity vector and a corresponding historical time step. The historical time step is the number of frames between the image in which the historical target object was detected and the image in which the historical target object was reported.
[0022] From the at least one second target object, determine at least one third target object whose corresponding dataset includes more than a preset number of associated data, and determine a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object;
[0023] From the at least one second target object, determine at least one fourth target object whose number of associated data included in the corresponding dataset is less than or equal to the preset number, and determine a second sub-target object sequence based on the first feature information of each fourth target object;
[0024] The second target object sequence is determined based on the first sub-target object sequence and the second sub-target object sequence.
[0025] According to a feature extraction method provided in this disclosure, determining a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object includes:
[0026] For each of the third target objects, the distance between the target velocity vector corresponding to the third target object and the historical velocity vector corresponding to each of the historical target objects is determined. All distances are sorted in ascending order. Based on the historical time steps of the historical target objects corresponding to the first preset number of distances, the target time step corresponding to the third target object is determined.
[0027] Based on the target time step corresponding to each of the third target objects, each of the third target objects is sorted to obtain the first sub-target object sequence.
[0028] According to a feature extraction method provided in this disclosure, determining the pre-selected target objects to be reported from the plurality of target objects based on the first target object sequence and the second target object sequence includes:
[0029] Merge the first target object sequence and the second target object sequence in the order of the first target object sequence and the second target object sequence;
[0030] Then, the first P target objects in the merged target object sequence are identified as the pre-selected target objects to be reported.
[0031] According to a feature extraction method provided in this disclosure, the method further includes:
[0032] For each target object, the region division size corresponding to the category to which the target object belongs is determined based on the category to which the target object belongs, the target detection box corresponding to the target object that does not touch the edge of the image to be processed, and the number of detection boxes of the category to which the target object belongs during the acquisition time period;
[0033] Based on the region division size, the image to be processed is divided into regions to obtain the region division result corresponding to the target object;
[0034] Based on the category to which the second target object belongs and the target detection box corresponding to the second target object, the region where the second target object is located in the image to be processed is determined from the region segmentation result.
[0035] According to a feature extraction method provided in this disclosure, the method further includes:
[0036] Determine the difference vector between the center point of the target detection box of the third target object in the image to be processed and the center point of the target detection box of the third target object in the previous frame image;
[0037] Based on the difference vector, the target velocity vector corresponding to the third target object is determined.
[0038] This disclosure also provides a feature extraction apparatus, comprising:
[0039] The detection unit is configured to perform target detection on the image to be processed, thereby obtaining multiple target objects in the image to be processed.
[0040] The first processing unit is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability.
[0041] The extraction unit is configured to extract fine-grained features for each of the pre-selected target objects to be reported.
[0042] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the feature extraction method as described in any of the preceding claims.
[0043] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the feature extraction method as described in any of the preceding claims.
[0044] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the feature extraction method as described in any of the preceding claims. Attached Figure Description
[0045] Figure 1 is a schematic flowchart of a feature extraction method provided in an embodiment of this disclosure;
[0046] Figure 2 is a schematic diagram of a process for determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of the present disclosure;
[0047] Figure 3 is a schematic diagram of another process for determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of the present disclosure;
[0048] Figure 4 is a schematic diagram of another process for determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of the present disclosure;
[0049] Figure 5 is a schematic diagram of a feature extraction device provided in an embodiment of this disclosure;
[0050] Figure 6 is a schematic diagram of the physical structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0051] In the embodiments of this disclosure, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this disclosure, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0052] The technical solutions provided in this disclosure are adaptable to intelligent deployment scenarios. The intelligent deployment algorithm is an algorithm based on artificial intelligence technology used to achieve intelligent security monitoring and management. It primarily uses devices such as high-definition cameras, sensors, and processors to identify and analyze people, vehicles, and objects within the monitored area, thereby achieving functions such as automatic patrolling, PTZ control, two-way voice communication, and location tracking. Simultaneously, the intelligent deployment algorithm can also utilize a wireless network to connect to an upper-level platform, promptly triggering alarms and transmitting data to the upper-level platform for remote monitoring and management.
[0053] In practical applications, intelligent deployment algorithms can be widely used in intelligent transportation systems, highway monitoring, and key area monitoring. In these fields, intelligent deployment algorithms can help users promptly detect abnormal situations through real-time analysis and processing of monitoring data, thereby executing reporting operations to improve security and efficiency.
[0054] Taking the monitoring scenario of a key area as an example, the main process is to collect images of the monitored area through cameras, and then detect, filter and track the collected images. When an object is detected entering the key area through a certain frame of image, it is necessary to extract the fine-grained features of the object and report it.
[0055] When there is only one object, i.e., a single target object, some devices with lower computing power can effectively extract the fine-grained features of the single target object when it is detected entering a critical area through a frame of image. However, when there are multiple objects, i.e., multiple target objects, extracting the fine-grained features of multiple target objects requires more computing resources. This can lead to congestion of computing resources on devices with lower computing power, making it impossible to extract the fine-grained features of multiple target objects simultaneously, thus affecting the timely reporting of target objects.
[0056] To effectively address the computational resource congestion problem that occurs when extracting fine-grained features from multiple target objects simultaneously, this disclosure provides a feature extraction method. This method pre-selects at least one pre-selected target object from multiple target objects that is highly likely to be reported later, and pre-extracts fine-grained features from this pre-selected target object. This effectively avoids computational resource congestion caused by simultaneously extracting fine-grained features from multiple target objects, thus effectively solving the computational resource congestion problem that occurs when extracting fine-grained features from multiple target objects simultaneously.
[0057] For example, in this embodiment of the disclosure, the reporting operation can be performed after the target object enters the critical area, after the target object leaves the critical area, or after the target object crosses the boundary, etc. The specific scenario can be set according to actual needs.
[0058] The feature extraction method provided in this disclosure will be described in detail below through several embodiments. It is understood that these embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0059] Figure 1 is a flowchart illustrating a feature extraction method provided in an embodiment of this disclosure. This method can be executed by software and / or hardware devices. For example, as shown in Figure 1, the feature extraction method may include:
[0060] S101. Perform target detection on the image to be processed to obtain multiple target objects in the image to be processed.
[0061] For example, in this embodiment of the disclosure, when performing object detection on the image to be processed, the object detection can be performed based on a neural network object detection algorithm, such as the Faster R-CNN algorithm, or the YOLO algorithm; or it can be based on other traditional object detection algorithms, such as HOG features and support vector machine algorithm, or SURF features and AdaBoost algorithm. The specific settings can be made according to actual needs, as long as the object detection box corresponding to the target object and the category to which the target object belongs can be detected.
[0062] For example, in this embodiment of the disclosure, multiple initial target objects detected are filtered based on a filtering algorithm to filter out initial target objects that do not meet the requirements, and the filtered initial target objects are tracked based on a tracking algorithm to determine multiple target objects from the filtered initial target objects.
[0063] For example, the filtering algorithm can be a category filtering algorithm, an image quality filtering algorithm, or a completeness filtering algorithm, etc., and the specific algorithm can be set according to actual needs.
[0064] For example, the tracking algorithm can be a multi-object tracking (MOT) algorithm, or any other tracking algorithm, as long as the object being tracked can be determined, i.e., the initial target object's identity document (ID).
[0065] To effectively address the computational resource congestion problem that occurs when extracting fine-grained features from multiple target objects simultaneously, after detecting multiple target objects in the image to be processed, at least one pre-selected target object that is highly likely to be reported can be pre-selected from the multiple target objects. Fine-grained features of at least one pre-selected target object can be pre-extracted, i.e., a portion of the fine-grained features of the pre-selected target objects can be extracted. This is achieved by executing S102 and S103 below. This effectively avoids computational resource congestion caused by extracting fine-grained features from multiple target objects simultaneously, thus effectively solving the computational resource congestion problem that occurs when extracting fine-grained features from multiple target objects simultaneously.
[0066] S102. Determine at least one pre-selected target object to be reported from multiple target objects. The probability that the pre-selected target object to be reported will be subject to a reporting operation is greater than a preset probability.
[0067] The value of the preset probability can be set according to actual needs. Here, the specific value of the preset probability is not further limited in this embodiment.
[0068] It is understood that, in this embodiment of the disclosure, the closer the screening time of the pre-selected target object to be reported is to the subsequent reporting operation time, the more accurately it can reflect the fine-grained characteristics of the pre-selected target object to be reported.
[0069] S103. Extract fine-grained features for each pre-selected target object to be reported.
[0070] For example, in this embodiment of the present disclosure, when extracting fine-grained features of a pre-selected target object to be reported, the image with the best image quality can be determined from all images up to the current image to be processed, starting from the frame image where the pre-selected target object first appears. The fine-grained features of the pre-selected target object to be reported are then extracted based on the best image. Alternatively, the image with the second-best image quality can be determined from all images up to the current image to be processed, starting from the frame image where the pre-selected target object first appears. The fine-grained features of the pre-selected target object to be reported are then extracted based on the second-best image. The specific settings can be configured according to actual needs.
[0071] For example, when determining the image with the best image quality, an existing single-objective priority algorithm can be used to determine the image with the best image quality from the frame image where the pre-selected target object first appears until the current image to be processed. For the specific implementation, please refer to the relevant description of the existing single-objective priority algorithm. Here, the embodiments of this disclosure will not be described in detail.
[0072] For example, in the embodiments of this disclosure, fine-grained features of each pre-selected target object to be reported can be extracted based on a deep learning fine-grained feature extraction model, such as a bilinear convolutional neural network model (Bilinear CNN) or a multi-scale fusion feature extraction model; alternatively, traditional fine-grained feature extraction algorithms, such as the Scale-Invariant Feature Transform (SIFT) extraction algorithm or the Speeded Up Robust Features (SURF) extraction algorithm, can be used to extract fine-grained features of each pre-selected target object to be reported. The specific settings can be configured according to actual needs.
[0073] The above-mentioned method of pre-selecting at least one pre-selected target object from multiple target objects that is highly likely to be reported in the future, and pre-extracting at least one fine-grained feature of the pre-selected target object, can effectively avoid the congestion of computing resources caused by extracting fine-grained features of multiple target objects at the same time. This not only maximizes the use of computing resources, but also improves the extraction accuracy of fine-grained features and the accuracy of reporting.
[0074] As can be seen, in this embodiment of the disclosure, target detection is first performed on the image to be processed to obtain multiple target objects in the image; at least one pre-selected target object to be reported is determined from the multiple target objects, and the probability that the pre-selected target object to be reported will be executed is greater than a preset probability; and fine-grained features of each pre-selected target object to be reported are extracted. In this way, at least one pre-selected target object to be reported is selected from multiple target objects in advance, and fine-grained features of the at least one pre-selected target object to be reported are extracted, thereby effectively solving the problem of computing resource congestion when extracting fine-grained features from multiple target objects at the same time.
[0075] Based on the embodiment shown in Figure 1 above, in S102 above, at least one pre-selected target object to be reported is determined from multiple target objects. For example, see Figure 2. Figure 2 is a flowchart of determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of this disclosure. It can be first determined whether the sequence number of the image to be processed in the image collected within the collection time period is less than or equal to a preset sequence number, and based on the determination result, at least one pre-selected target object to be reported is determined from multiple target objects.
[0076] The preset sequence number can be set according to actual needs. For example, the preset sequence number can be denoted as T, indicating whether the sequence number of the image to be processed is less than or equal to T. When the sequence number of the image to be processed is 1, it means that the image to be processed is the first frame image captured within the acquisition time period; when the sequence number of the image to be processed is 2, it means that the image to be processed is the second frame image captured within the acquisition time period; and when the sequence number of the image to be processed is T, it means that the image to be processed is the Tth frame image captured within the acquisition time period.
[0077] Typically, T is set to 500, 1000, etc., based on experience, and is related to factors such as the complexity of the rules in the application scenario and the number of target objects. It is understandable that in this embodiment of the disclosure, the reason for setting a relatively large T value is to be able to collect sufficient detailed information of the target objects based on the previous T frames of images.
[0078] The above method, by determining whether the sequence number of the image to be processed is less than or equal to the preset sequence number among the images acquired during the acquisition time period, can yield two different judgment results: either the sequence number of the image to be processed is less than or equal to the preset sequence number, or the sequence number of the image to be processed is greater than the preset sequence number. Below, we will describe in detail how to determine at least one pre-selected target object to be reported from multiple target objects, based on these two different judgment results.
[0079] In one possible scenario, if the sequence number of the image to be processed is less than or equal to a preset sequence number among the images acquired within the acquisition time period, at least one pre-selected target object to be reported is determined from multiple target objects. For example, see Figure 3, which is a schematic diagram of another process for determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of this disclosure. The SORT1 algorithm can be used, and the specific algorithm may include:
[0080] S301. For each target object, determine the weight of the target object based on the first feature information of the target object.
[0081] The first feature information includes at least one of the following: whether the fine-grained features of the target object have been extracted, the number of times the target object was detected during the collection period, the number of times the target object moved during the collection period, and the number of times the area of the target detection box corresponding to the target object increased during the collection period.
[0082] For example, when the first feature information includes all the aforementioned feature information, when determining the weight of the target object based on the first feature information of the target object, the weight is determined by whether the fine-grained features of the target object have been extracted. If the fine-grained features of the target object have been extracted, the corresponding weight is -1000; if the fine-grained features of the target object have not been extracted, the corresponding weight is +0. Regarding the number of times the target object is detected within the collection period, if the target object is detected for the first time within the collection period and the fine-grained features have not been extracted, the corresponding weight is +100; if the target object is detected for the second time within the collection period and the fine-grained features have not been extracted, the corresponding weight is +20; and for each subsequent detection and each time the fine-grained features have not been extracted, the corresponding weight decreases by 5, until it reaches 0 and stops decreasing. For the number of moves within the collection period, if the target object moves for the first time within the collection period, the corresponding weight is increased by 10; if the target object moves twice consecutively within the collection period, the corresponding weight is increased by 20; if the target object moves three or more consecutively within the collection period, the corresponding weight is increased by 30. For the number of times the area of the target detection box corresponding to the target object increases within the collection period, if the area of the target detection box corresponding to the target object increases for the first time within the collection period, the corresponding weight is increased by 20; if the area of the target detection box corresponding to the target object increases twice consecutively within the collection period, the corresponding weight is increased by 30; if the area of the target detection box corresponding to the target object increases three or more consecutively within the collection period, the corresponding weight is increased by 40.
[0083] The value of the weight can be set according to actual needs.
[0084] For example, suppose a target object is detected in the image to be processed. This target object is detected continuously in the first, second, third, fourth, and fifth frames. Fine-grained features of the target object are extracted based on the fourth frame. Furthermore, movement is detected in the first three frames (i.e., three consecutive movements) and area increases are detected in the first three frames (i.e., three consecutive area increases). Therefore, the weight of the target image based on the first frame is determined to be 100+10+20=130, the weight based on the second frame is 130+20+20+30=200, the weight based on the third frame is 200+15+30=245, the weight based on the fourth frame is 245+10=255, and the weight based on the fifth frame is 255-1000+5=-740.
[0085] S302. Based on the weight of each target object, determine the pre-selected target objects to be reported from multiple target objects.
[0086] For example, in this embodiment of the disclosure, when determining the pre-selected target objects to be reported from multiple target objects based on the weight of each target object, the multiple target objects can be sorted according to the order of their weights from high to low, and the first P target objects can be determined as at least one pre-selected target object to be reported that is highly likely to be reported in the future; or, the multiple target objects can be sorted according to the order of their weights from low to high, and the last P target objects can be determined as at least one pre-selected target object to be reported that is highly likely to be reported in the future. The specific settings can be configured according to actual needs.
[0087] Wherein, P is determined based on the computing power resources of the device, and the remaining computing power resources of the device can extract fine-grained features of a maximum of P targets.
[0088] Based on the above description, when the sequence number of the image to be processed is less than or equal to the preset sequence number in the images acquired within the acquisition time period, for each target object, the weight of the target object is determined based on the first feature information of the target object; and based on the weight of each target object, at least one pre-selected target object to be reported is determined from multiple target objects that is highly likely to be reported in the future. This allows for the pre-extraction of fine-grained features of the at least one pre-selected target object to be reported, thereby effectively solving the problem of computing resource congestion when extracting fine-grained features from multiple target objects at the same time.
[0089] In another possible scenario, if the sequence number of the image to be processed is greater than a preset sequence number among the images acquired within the acquisition time period, at least one pre-selected target object to be reported is determined from multiple target objects. For example, see Figure 4, which is a flowchart illustrating another method for determining at least one pre-selected target object to be reported from multiple target objects according to an embodiment of this disclosure. The method may include:
[0090] S401. For each target object, determine whether the fine-grained features of the target object have been extracted.
[0091] S402. Determine at least one first target object from multiple target objects whose fine-grained features have been extracted, and determine the weight of each first target object based on the first feature information of each first target object, and determine the first target object sequence based on the weight of each first target object.
[0092] For example, in an embodiment of this disclosure, the SORT1 algorithm may be used to determine the first target object sequence.
[0093] For example, in this embodiment of the present disclosure, when determining the weight of the first target object based on the first feature information of the first target object, the specific implementation is similar to the specific implementation of determining the weight of the target object based on the first feature information of the target object in S301 above. Please refer to the relevant description of determining the weight of the target object based on the first feature information of the target object in S301 above. Here, this embodiment of the present disclosure will not repeat the description.
[0094] For example, in this embodiment of the disclosure, when determining the sequence of first target objects based on the weight of each first target object, at least one first target object can be sorted according to the order of the weight of each first target object from high to low to obtain the sequence of first target objects; or, at least one first target object can be sorted according to the order of the weight of each first target object from low to high. The specific settings can be made according to actual needs.
[0095] S403. Determine at least one second target object from multiple target objects whose fine-grained features have not been extracted, and determine a sequence of second target objects based on the second feature information of each second target object.
[0096] The second feature information includes the category to which the second target object belongs and the region in which the second target object is located in the image to be processed.
[0097] For example, the category to which the second target object belongs can be a person, animal, or vehicle, etc., and can be set according to actual needs. The region where the second target object is located in the image to be processed can be the region where the center point of the second target object is located, or it can be the region where the center point of the target detection box corresponding to the second target object is located.
[0098] For example, in this embodiment of the disclosure, for each target object, the region segmentation size corresponding to the category to which the target object belongs can be determined based on the category to which the target object belongs, the target detection box corresponding to the target object that does not touch the edge of the image to be processed, and the number of detection boxes of the category to which the target object belongs within the acquisition time period; and the image to be processed is segmented into regions based on the region segmentation size to obtain the region segmentation result corresponding to the target object. The region where the second target object is located in the image to be processed is determined, that is, based on the category to which the second target object belongs and the target detection box corresponding to the second target object, the region where the second target object is located in the image to be processed is determined from the region segmentation result.
[0099] For example, the region division size can be denoted as R. The entire image to be processed can be divided into several squares based on the region division size R. Each square can be regarded as a region, and the size of each square is R, as shown in Formula 1 below:
[0100] Among them, R j This represents the region division size corresponding to the category to which the target object of category j belongs. This represents the area of the detection box corresponding to the i-th target object in category j that does not touch the edge of the image to be processed, and I represents the number of detection boxes of the same category within the acquisition time period. Typically, considering that the width and height of an image are generally multiples of 16, the value of the region partitioning size R can be rounded up to 16, and can be set according to actual needs.
[0101] It should be noted that in the embodiments of this disclosure, the area division size is different for target objects under different categories.
[0102] For example, in this embodiment of the disclosure, when determining the sequence of second target objects based on the second feature information of each second target object, for each second target object, a dataset corresponding to the second target object can be determined based on the second feature information of the second target object. The dataset includes at least one associated data of each of at least one historical target object detected within the region based on images prior to the image to be processed. Each associated data includes a historical velocity vector and a corresponding historical time step, where the historical time step is the number of frames between the image in which the historical target object was detected and the image in which the historical target object was reported. It is also determined whether the number of associated data included in the dataset corresponding to each second target object is greater than a preset number. The value of the preset number can be set according to actual needs.
[0103] Each historical velocity vector corresponds to a historical time step. The historical velocity vector corresponding to the historical target object can be determined based on the difference vector between the center point of the detection box of the historical target object in the corresponding historical image and the center point of the detection box in the previous frame of the historical image.
[0104] For example, if the target object is reported in the current frame, the corresponding time step is 0; if the target object is reported in the next frame, the corresponding time step is 1; if the target object is reported in the frame after the next frame, the corresponding time step is 2, and so on.
[0105] For example, in this embodiment of the disclosure, for any dataset, it includes the historical velocity vector and historical time step corresponding to at least one historical target object of the same category and whose center point is located in the same region. For any region, the number of associated data is less than N, where N is estimated by the computing power resources of the device. When the number of associated data is greater than N, the associated data of the earliest added historical target object can be deleted to add the historical velocity vector and historical time step corresponding to the new target object. Typically, N is 30, 50, 100, etc., and can be set according to actual needs.
[0106] For example, in this embodiment of the disclosure, at least one associated data of each of at least one historical target object included in the dataset can be recorded through a queue. Considering that a large dataset would consume significant memory resources and increase subsequent computation, in this embodiment of the disclosure, the longest historical time step that can be recorded is t = Q / P. Here, t represents the longest historical time step recorded in the queue, Q represents the maximum number of target objects for which reporting operations have been performed (a preset value), and P represents the number of at least one pre-selected target objects that are highly likely to be reported later. If the longest historical time step recorded in the queue exceeds t, the associated data of the historical target object recorded at the beginning of the queue is deleted to reduce memory resource consumption and subsequent computation.
[0107] From at least one second target object, determine at least one third target object whose corresponding dataset contains more than a preset number of associated data; and determine a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object; and from at least one second target object, determine at least one fourth target object whose corresponding dataset contains less than or equal to a preset number of associated data, and determine a second sub-target object sequence based on the first feature information of each fourth target object; and then determine a second target object sequence based on the first sub-target object sequence and the second sub-target object sequence.
[0108] For example, in the embodiments of this disclosure, the SORT2 algorithm can be used to determine the first sub-target object sequence, and the SORT1 algorithm can be used to determine the second sub-target object sequence. For specific implementation, please refer to the relevant description below.
[0109] It is understood that, in this embodiment of the disclosure, considering that the SORT2 algorithm is a self-learning-based judgment process, it can learn the time when target objects of the same type are executed reporting operations, and predict the time difference when the current target pre-selected target object to be reported is executed reporting operations based on the learned time when target objects of the same type are executed reporting operations. Therefore, in this embodiment of the disclosure, the SORT2 algorithm can be used to determine the first sub-target object sequence.
[0110] For example, in this embodiment of the disclosure, when determining the first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object, for each third target object, the distance between the target velocity vector corresponding to the third target object and the historical velocity vector corresponding to each historical target object can be determined, all distances are sorted in ascending order, and the target time step corresponding to the third target object is determined based on the historical time steps of the historical target objects corresponding to the first preset number of distances; based on the target time step corresponding to each third target object, each third target object is sorted to obtain the first sub-target object sequence.
[0111] The preset quantity can be set according to actual needs. Assuming the preset quantity can be denoted as K, the value of K is related to the value of N mentioned above. For example, it can be the square root of N. Furthermore, a more detailed and precise value of K can be obtained through cross-validation.
[0112] Here, the specific value of the preset quantity is not further limited in the embodiments disclosed herein.
[0113] For example, in this embodiment of the disclosure, when determining the target velocity vector corresponding to the third target object, the difference vector between the center point of the target detection box of the third target object in the image to be processed and the center point of the target detection box of the third target object in the previous frame image can be determined first; and then the target velocity vector corresponding to the third target object can be determined based on the difference vector. For example, the difference vector can be determined as the target velocity vector corresponding to the third target object.
[0114] It should be noted that, in the embodiments of this disclosure, the method for determining the historical velocity vector corresponding to the historical target object is similar to the method for determining the target velocity vector corresponding to the third target object. Please refer to the relevant description of determining the target velocity vector corresponding to the third target object above. Here, the embodiments of this disclosure will not repeat the description.
[0115] For example, in this embodiment of the disclosure, when determining the target time step corresponding to the third target object based on the historical time steps of the historical target objects corresponding to the previous preset number K distances, the average value of the historical time steps of the historical target objects corresponding to the previous K distances can be calculated and the average value can be determined as the target time step corresponding to the third target object; alternatively, the average value of the historical time steps of the historical target objects corresponding to the previous K distances can be rounded and the rounded value can be determined as the target time step corresponding to the third target object. The specific settings can be made according to actual needs.
[0116] For example, in this embodiment of the disclosure, when sorting each third target object based on the target time step corresponding to each third target object, at least one third target object can be sorted according to the order of the target time steps corresponding to each third target object from high to low to obtain a first sub-target object sequence; or, at least one third target object can be sorted according to the order of the target time steps corresponding to each third target object from low to high to obtain a first sub-target object sequence. The specific settings can be made according to actual needs.
[0117] For example, in this embodiment of the disclosure, when determining the second sub-target object sequence based on the first feature information of each fourth target object, for each fourth target object, the weight of the fourth target object can be determined first based on the first feature information of the fourth target object; and at least one fourth target object can be sorted according to the order of the weights of each fourth target object from high to low to obtain the second sub-target object sequence; or, at least one fourth target object can be sorted according to the order of the weights of each fourth target object from low to high to obtain the second sub-target object sequence. The specific settings can be configured according to actual needs.
[0118] For example, in this embodiment of the present disclosure, when determining the weight of the fourth target object based on the first feature information of the fourth target object, the specific implementation is similar to the specific implementation of determining the weight of the target object based on the first feature information of the target object in S301 above. Please refer to the relevant description of determining the weight of the target object based on the first feature information of the target object in S301 above. Here, this embodiment of the present disclosure will not repeat the description.
[0119] Assuming the first target object sequence is obtained by sorting at least one third target object based on the order of target time steps corresponding to each third target object from high to low, and the first target object sequence includes target object 1 and target object 3 in sequence; the second sub-target object sequence is obtained by sorting at least one fourth target object based on the order of weights of each fourth target object from high to low, and the second target object sequence includes target object 2 and target object 5 in sequence, then based on the first target object sequence and the second sub-target object sequence, the second target object sequence is obtained by including target object 1, target object 3, target object 2 and target object 5 in sequence.
[0120] It should be noted that in this embodiment, there is no specific order between S402 and S403. S402 can be executed first, followed by S403; or S403 can be executed first, followed by S402; or S402 and S403 can be executed simultaneously. The specific order can be set according to actual needs. Here, this embodiment is only used as an example of executing S402 first, followed by S403, but it does not mean that this embodiment is limited to this.
[0121] S404. Based on the first target object sequence and the second target object sequence, determine the pre-selected target objects to be reported from multiple target objects.
[0122] For example, in this embodiment of the disclosure, when determining the pre-selected target objects to be reported from multiple target objects based on the first target object sequence and the second target object sequence, the first target object sequence and the second target object sequence can be merged in the order of the first target object sequence and the second target object sequence, and the first P target objects in the merged target object sequence can be determined as the pre-selected target objects to be reported.
[0123] Assuming the first target object sequence is obtained by sorting at least one first target object based on the order of weight of each first target object from high to low, and the first target object sequence includes target object 4 and target object 6 in sequence, and the second target object sequence includes target object 1, target object 3, target object 2 and target object 5 in sequence, then the merged sequence includes target object 4, target object 6, target object 1, target object 3, target object 2 and target object 5 in sequence.
[0124] Based on the above description, when the sequence number of the image to be processed is greater than the preset sequence number in the images acquired during the acquisition time period, by determining the first target object sequence and the second target object sequence, and based on the first target object sequence and the second target object sequence, at least one pre-selected target object to be reported is determined from multiple target objects that is highly likely to be reported in the future. This allows for the pre-extraction of fine-grained features of the at least one pre-selected target object to be reported, thereby effectively solving the problem of computing resource congestion when extracting fine-grained features from multiple target objects at the same time.
[0125] The feature extraction apparatus provided in this disclosure is described below. The feature extraction apparatus described below can be referred to in correspondence with the feature extraction method described above.
[0126] Figure 5 is a schematic diagram of a feature extraction device provided in an embodiment of this disclosure. For example, as shown in Figure 5, the feature extraction device 50 may include:
[0127] Detection unit 501 is configured to perform target detection on the image to be processed, and obtain multiple target objects in the image to be processed;
[0128] The first processing unit 502 is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability.
[0129] Extraction unit 503 is configured to extract fine-grained features for each of the pre-selected target objects to be reported.
[0130] For example, in this embodiment of the disclosure, the first processing unit 502 is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, including:
[0131] If the sequence number of the image to be processed in the image acquired within the acquisition time period is less than or equal to a preset sequence number, for each target object, the weight of the target object is determined based on the first feature information of the target object; wherein, the first feature information includes at least one of the following: whether the fine-grained features of the target object have been extracted, the number of times the target object is detected within the acquisition time period, the number of times the target object moves within the acquisition time period, and the number of times the area of the target detection box corresponding to the target object increases within the acquisition time period;
[0132] Based on the weight of each target object, the pre-selected target objects to be reported are determined from the plurality of target objects.
[0133] For example, in this embodiment of the disclosure, the first processing unit 502 is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, including:
[0134] If the sequence number of the images acquired within the acquisition time period is greater than a preset sequence number, for each target object, it is determined whether the fine-grained features of the target object have been extracted;
[0135] From the plurality of target objects, at least one first target object whose fine-grained features have been extracted is determined, and based on the first feature information of each first target object, the weight of each first target object is determined, and a first target object sequence is determined based on the weight of each first target object.
[0136] From the plurality of target objects, at least one second target object whose fine-grained features have not been extracted is determined, and a sequence of second target objects is determined based on the second feature information of each second target object, wherein the second feature information includes the category to which the second target object belongs and the region in which the second target object is located in the image to be processed;
[0137] Based on the first target object sequence and the second target object sequence, the pre-selected target objects to be reported are determined from the plurality of target objects.
[0138] For example, in this embodiment of the disclosure, the first processing unit 502 is configured to determine a second target object sequence based on the second feature information of each second target object, including:
[0139] For each of the second target objects, a dataset corresponding to the second target object is determined based on the second feature information of the second target object. The dataset includes at least one associated data of at least one historical target object detected in the region based on images prior to the image to be processed. Each associated data includes a historical velocity vector and a corresponding historical time step. The historical time step is the number of frames between the image in which the historical target object was detected and the image in which the historical target object was reported.
[0140] From the at least one second target object, determine at least one third target object whose number of associated objects in the corresponding dataset is greater than a preset number, and determine a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object;
[0141] From the at least one second target object, determine at least one fourth target object whose number of associated objects in the corresponding dataset is less than or equal to the preset number, and determine a second sub-target object sequence based on the first feature information of each fourth target object;
[0142] The second target object sequence is determined based on the first sub-target object sequence and the second sub-target object sequence.
[0143] For example, in an embodiment of this disclosure, the first processing unit 502 is configured to determine a first sub-target object sequence based on the second feature information of each of the third target objects and the dataset corresponding to the third target object, including:
[0144] For each of the third target objects, the distance between the target velocity vector corresponding to the third target object and the historical velocity vector corresponding to each of the historical target objects is determined. All distances are sorted in ascending order. Based on the historical time steps of the historical target objects corresponding to the first preset number of distances, the target time step corresponding to the third target object is determined.
[0145] Based on the target time step corresponding to each of the third target objects, each of the third target objects is sorted to obtain the first sub-target object sequence.
[0146] For example, in this embodiment of the disclosure, the first processing unit 502 is configured to determine the pre-selected target objects to be reported from the plurality of target objects based on the first target object sequence and the second target object sequence, including:
[0147] Merge the first target object sequence and the second target object sequence in the order of the first target object sequence and the second target object sequence;
[0148] Then, the first P target objects in the merged target object sequence are identified as the pre-selected target objects to be reported.
[0149] For example, in this embodiment of the disclosure, the feature extraction device 50 further includes a second processing unit, a third processing unit, and a fourth processing unit;
[0150] The second processing unit is configured to, for each target object, determine the region division size corresponding to the category to which the target object belongs, the target detection box corresponding to the target object that does not touch the edge of the image to be processed, and the number of detection boxes of the category within the acquisition time period;
[0151] The third processing unit is configured to divide the image to be processed into regions based on the region division size, and obtain the region division result corresponding to the target object.
[0152] The fourth processing unit is configured to determine the region in the image to be processed from the region division result based on the category to which the second target object belongs and the target detection box corresponding to the second target object.
[0153] For example, in this embodiment of the disclosure, the feature extraction device 50 further includes a fifth processing unit and a sixth processing unit;
[0154] The fifth processing unit is configured to determine the difference vector between the center point of the target detection box of the third target object in the image to be processed and the center point of the target detection box of the third target object in the previous frame image.
[0155] The sixth processing unit is configured to determine the target velocity vector corresponding to the third target object based on the difference vector.
[0156] The feature extraction device 50 provided in this embodiment can execute the technical solution of the feature extraction method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the feature extraction method. Please refer to the implementation principle and beneficial effects of the feature extraction method. It will not be repeated here.
[0157] Figure 6 is a schematic diagram of the physical structure of an electronic device provided in an embodiment of this disclosure. As shown in Figure 6, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute the aforementioned feature extraction method. This method includes: performing target detection on an image to be processed to obtain multiple target objects in the image; determining at least one pre-selected target object to be reported from the multiple target objects, wherein the probability of the pre-selected target object to be reported being greater than a preset probability; and extracting fine-grained features from each of the pre-selected target objects to be reported.
[0158] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this disclosure. The aforementioned storage medium includes: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., any medium capable of storing program code.
[0159] On the other hand, this disclosure also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer is able to perform the above-described feature extraction method. The method includes: performing target detection on an image to be processed to obtain a plurality of target objects in the image to be processed; determining at least one pre-selected target object to be reported from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability; and extracting fine-grained features of each of the pre-selected target objects to be reported.
[0160] In another aspect, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the above-described feature extraction method. The method includes: performing target detection on an image to be processed to obtain a plurality of target objects in the image to be processed; determining at least one pre-selected target object to be reported from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability; and extracting fine-grained features of each of the pre-selected target objects to be reported.
[0161] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in each of the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of this disclosure.
Claims
1. A feature extraction method, comprising: Target detection is performed on the image to be processed to obtain multiple target objects in the image to be processed; At least one pre-selected target object to be reported is determined from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability; Extract fine-grained features for each of the pre-selected target objects to be reported.
2. The method according to claim 1, wherein, The step of determining at least one pre-selected target object to be reported from the plurality of target objects includes: If the sequence number of the image to be processed in the image acquired within the acquisition time period is less than or equal to a preset sequence number, for each target object, the weight of the target object is determined based on the first feature information of the target object; wherein, the first feature information includes at least one of the following: whether the fine-grained features of the target object have been extracted, the number of times the target object is detected within the acquisition time period, the number of times the target object moves within the acquisition time period, and the number of times the area of the target detection box corresponding to the target object increases within the acquisition time period; Based on the weight of each target object, the pre-selected target objects to be reported are determined from the plurality of target objects.
3. The method according to claim 1, wherein, The step of determining at least one pre-selected target object to be reported from the plurality of target objects includes: If the sequence number of the images acquired within the acquisition time period is greater than a preset sequence number, for each target object, it is determined whether the fine-grained features of the target object have been extracted; From the plurality of target objects, at least one first target object whose fine-grained features have been extracted is determined, and based on the first feature information of each first target object, the weight of each first target object is determined, and a first target object sequence is determined based on the weight of each first target object. From the plurality of target objects, at least one second target object whose fine-grained features have not been extracted is determined, and a sequence of second target objects is determined based on the second feature information of each second target object, wherein the second feature information includes the category to which the second target object belongs and the region in which the second target object is located in the image to be processed; Based on the first target object sequence and the second target object sequence, the pre-selected target objects to be reported are determined from the plurality of target objects.
4. The method according to claim 3, wherein, The step of determining the second target object sequence based on the second feature information of each second target object includes: For each of the second target objects, a dataset corresponding to the second target object is determined based on the second feature information of the second target object. The dataset includes at least one associated data of at least one historical target object detected in the region based on images prior to the image to be processed. Each associated data includes a historical velocity vector and a corresponding historical time step. The historical time step is the number of frames between the image in which the historical target object was detected and the image in which the historical target object was reported. From the at least one second target object, determine at least one third target object whose corresponding dataset includes more than a preset number of associated data, and determine a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object; From the at least one second target object, determine at least one fourth target object whose number of associated data included in the corresponding dataset is less than or equal to the preset number, and determine a second sub-target object sequence based on the first feature information of each fourth target object; The second target object sequence is determined based on the first sub-target object sequence and the second sub-target object sequence.
5. The method according to claim 4, wherein, The step of determining the first sub-target object sequence based on the second feature information of each of the third target objects and the dataset corresponding to the third target objects includes: For each of the third target objects, the distance between the target velocity vector corresponding to the third target object and the historical velocity vector corresponding to each of the historical target objects is determined. All distances are sorted in ascending order. Based on the historical time steps of the historical target objects corresponding to the first preset number of distances, the target time step corresponding to the third target object is determined. Based on the target time step corresponding to each of the third target objects, each of the third target objects is sorted to obtain the first sub-target object sequence.
6. The method according to claim 3, wherein, The step of determining the pre-selected target objects to be reported from the plurality of target objects based on the first target object sequence and the second target object sequence includes: Merge the first target object sequence and the second target object sequence in the order of the first target object sequence and the second target object sequence; Then, the first P target objects in the merged target object sequence are identified as the pre-selected target objects to be reported.
7. The method according to claim 3, wherein, The method further includes: For each target object, the region division size corresponding to the category to which the target object belongs is determined based on the category to which the target object belongs, the target detection box corresponding to the target object that does not touch the edge of the image to be processed, and the number of detection boxes of the category to which the target object belongs during the acquisition time period; Based on the region division size, the image to be processed is divided into regions to obtain the region division result corresponding to the target object; Based on the category to which the second target object belongs and the target detection box corresponding to the second target object, the region where the second target object is located in the image to be processed is determined from the region segmentation result.
8. The method according to claim 5, wherein, The method further includes: Determine the difference vector between the center point of the target detection box of the third target object in the image to be processed and the center point of the target detection box of the third target object in the previous frame image; Based on the difference vector, the target velocity vector corresponding to the third target object is determined.
9. A feature extraction apparatus, comprising: The detection unit is configured to perform target detection on the image to be processed, thereby obtaining multiple target objects in the image to be processed. The first processing unit is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, wherein the probability that the pre-selected target object to be reported is about to be reported is greater than a preset probability. The extraction unit is configured to extract fine-grained features for each of the pre-selected target objects to be reported.
10. The apparatus according to claim 9, wherein, The first processing unit is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, including: If the sequence number of the image to be processed in the image acquired within the acquisition time period is less than or equal to a preset sequence number, for each target object, the weight of the target object is determined based on the first feature information of the target object; wherein, the first feature information includes at least one of the following: whether the fine-grained features of the target object have been extracted, the number of times the target object is detected within the acquisition time period, the number of times the target object moves within the acquisition time period, and the number of times the area of the target detection box corresponding to the target object increases within the acquisition time period; Based on the weight of each target object, the pre-selected target objects to be reported are determined from the plurality of target objects.
11. The apparatus according to claim 9, wherein, The first processing unit is configured to determine at least one pre-selected target object to be reported from the plurality of target objects, including: If the sequence number of the images acquired within the acquisition time period is greater than a preset sequence number, for each target object, it is determined whether the fine-grained features of the target object have been extracted; From the plurality of target objects, at least one first target object whose fine-grained features have been extracted is determined, and based on the first feature information of each first target object, the weight of each first target object is determined, and a first target object sequence is determined based on the weight of each first target object. From the plurality of target objects, at least one second target object whose fine-grained features have not been extracted is determined, and a sequence of second target objects is determined based on the second feature information of each second target object, wherein the second feature information includes the category to which the second target object belongs and the region in which the second target object is located in the image to be processed; Based on the first target object sequence and the second target object sequence, the pre-selected target objects to be reported are determined from the plurality of target objects.
12. The apparatus according to claim 11, wherein, The first processing unit is configured to determine a sequence of second target objects based on the second feature information of each second target object, including: For each of the second target objects, a dataset corresponding to the second target object is determined based on the second feature information of the second target object. The dataset includes at least one associated data of at least one historical target object detected in the region based on images prior to the image to be processed. Each associated data includes a historical velocity vector and a corresponding historical time step. The historical time step is the number of frames between the image in which the historical target object was detected and the image in which the historical target object was reported. From the at least one second target object, determine at least one third target object whose number of associated objects in the corresponding dataset is greater than a preset number, and determine a first sub-target object sequence based on the second feature information of each third target object and the dataset corresponding to the third target object; From the at least one second target object, determine at least one fourth target object whose number of associated objects in the corresponding dataset is less than or equal to the preset number, and determine a second sub-target object sequence based on the first feature information of each fourth target object; The second target object sequence is determined based on the first sub-target object sequence and the second sub-target object sequence.
13. The apparatus according to claim 12, wherein, The first processing unit is configured to determine a first sub-target object sequence based on the second feature information of each of the third target objects and the dataset corresponding to the third target objects, including: For each of the third target objects, the distance between the target velocity vector corresponding to the third target object and the historical velocity vector corresponding to each of the historical target objects is determined. All distances are sorted in ascending order. Based on the historical time steps of the historical target objects corresponding to the first preset number of distances, the target time step corresponding to the third target object is determined. Based on the target time step corresponding to each of the third target objects, each of the third target objects is sorted to obtain the first sub-target object sequence.
14. The apparatus according to claim 11, wherein, The first processing unit is configured to determine the pre-selected target objects to be reported from the plurality of target objects based on the first target object sequence and the second target object sequence, including: Merge the first target object sequence and the second target object sequence in the order of the first target object sequence and the second target object sequence; Then, the first P target objects in the merged target object sequence are identified as the pre-selected target objects to be reported.
15. The apparatus according to claim 11, wherein, The feature extraction device further includes a second processing unit, a third processing unit, and a fourth processing unit; The second processing unit is configured to, for each target object, determine the region division size corresponding to the category to which the target object belongs, the target detection box corresponding to the target object that does not touch the edge of the image to be processed, and the number of detection boxes of the category within the acquisition time period; The third processing unit is configured to divide the image to be processed into regions based on the region division size, and obtain the region division result corresponding to the target object. The fourth processing unit is configured to determine the region in the image to be processed from the region division result based on the category to which the second target object belongs and the target detection box corresponding to the second target object.
16. The apparatus according to claim 13, wherein, The feature extraction device further includes a fifth processing unit and a sixth processing unit; The fifth processing unit is configured to determine the difference vector between the center point of the target detection box of the third target object in the image to be processed and the center point of the target detection box of the third target object in the previous frame image. The sixth processing unit is configured to determine the target velocity vector corresponding to the third target object based on the difference vector.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the feature extraction method as described in any one of claims 1 to 8.
18. A computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the feature extraction method as described in any one of claims 1 to 8.
19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the feature extraction method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Target identification method and device, electronic equipment and medium
CN115049954A
Object behavior recognition method and device, equipment and medium
CN115439922A
Method and apparatus for detecting object in image
CN115705702A
Multi-target object wandering detection method and system, medium and electronic equipment
CN117237865A
Dynamic target analysis method and apparatus, device, and storage medium
WO2023221770A1