CN113343060B - Object detection method and device, electronic equipment and storage medium - Google Patents

Object detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113343060B
CN113343060B CN202110699106.5A CN202110699106A CN113343060B CN 113343060 B CN113343060 B CN 113343060B CN 202110699106 A CN202110699106 A CN 202110699106A CN 113343060 B CN113343060 B CN 113343060B
Authority
CN
China
Prior art keywords
track
detected
data
track chain
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110699106.5A
Other languages
Chinese (zh)
Other versions
CN113343060A (en
Inventor
赵海川
毛德义
李想
张丹丹
朴元奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to CN202110699106.5A priority Critical patent/CN113343060B/en
Publication of CN113343060A publication Critical patent/CN113343060A/en
Application granted granted Critical
Publication of CN113343060B publication Critical patent/CN113343060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification

Abstract

The application provides an object detection method and device, electronic equipment and a storage medium; the method comprises the following steps: determining a first track data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location; in the first track data set, determining at least one second track data with acquisition time within a preset time period; in the at least one second track data, determining at least one target track chain of which the spatial position of the image acquisition equipment of the track data enters a preset area from other areas; and determining the number of the objects to be detected of each identity type based on the identity types of the objects to be detected and the at least one target track chain.

Description

Object detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of image processing, and relates to, but is not limited to, an object detection method and device, electronic equipment and a storage medium.
Background
For large-scale view data acquired in a specific scene, the view analysis system in the related art cannot effectively mine track information of potential objects in the data, and cannot effectively play the value of the data.
Disclosure of Invention
The embodiment of the application provides an object detection technical scheme.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides an object detection method, which comprises the following steps:
determining a first track data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location;
in the first track data set, determining at least one second track data with acquisition time within a preset time period;
in the at least one second track data, determining at least one target track chain of which the spatial position of the image acquisition equipment of the track data enters a preset area from other areas;
and determining the number of the objects to be detected of each identity type based on the identity types of the objects to be detected and the at least one target track chain.
In some embodiments, the acquiring a first set of trajectory data for a plurality of objects to be detected within different time-space ranges includes: acquiring image data of the plurality of objects to be detected in the different time space ranges; a first set of trajectory data is determined that includes trajectories of each of the objects to be detected within the different time-space ranges based on image data of the plurality of objects to be detected. Thus, a plurality of first track data sets of the objects to be detected are obtained, and objects flowing into the target area from other areas can be conveniently screened out through the first track data sets.
In some embodiments, the determining, based on the image data of the plurality of objects to be detected, a first set of trajectory data including trajectories of each object to be detected within the different time-space ranges includes: performing track reduction on image data corresponding to the same object to be detected to obtain a plurality of tracks; wherein the track points in each track belong to the same object to be detected; based on a preset identity library, determining the identity and the identity type of each object to be detected; labeling the track corresponding to each object to be detected by adopting the identity mark and the identity type of each object to be detected to obtain the labeled track of each object to be detected; the first trajectory data set is determined based on the annotated trajectories of the plurality of objects to be detected. Therefore, the image data required by the current application scene can be more completely counted, and the source data is enriched.
In some embodiments, the performing trajectory restoration on the image data corresponding to the same object to be detected to obtain a plurality of trajectories includes: clustering the image data corresponding to the same object to be detected to obtain multi-class image data; wherein, each type of image data belongs to the same object to be detected; and taking each frame of image data in any type of image data as a track point to form a track of an object to be detected to which the image data belong so as to obtain the tracks. Therefore, the track of the object to be detected is restored in different time space ranges by clustering the object to be detected, so that the track of the object is obtained, and the track of each object to be detected can be effectively restored.
In some embodiments, in the at least one second track data, determining at least one target track chain of the spatial position of the image capturing device of the track data from the other region into the preset region includes: splitting the at least one second track data by adopting a preset unit duration to obtain a plurality of time tuples; wherein each time tuple comprises at least: the acquisition time of the track data in each tuple, the spatial position of the image acquisition equipment, and the identity mark and the identity type of the corresponding object to be detected; based on the identity mark and the identity type of each object to be detected, track data in the plurality of time tuples are read to obtain a first track chain set comprising a first track chain of each object to be detected; wherein each first track chain comprises: track data within the plurality of time tuples ordered by acquisition time of the track data; and filtering out track chains which do not meet preset conditions in the first track chain set to obtain the at least one target track chain. Therefore, the track data is segmented by taking the day as granularity, so that a plurality of time tuples are obtained, the track data is conveniently read from the time tuples in a distributed mode, and the track data reading speed can be improved.
In some embodiments, the filtering out the track chains that do not meet the preset condition in the first track chain set to obtain the at least one target track chain includes: determining the spatial position of each image acquisition device in any first track chain; and filtering out the first track chains of which the spatial positions of each image acquisition device do not meet preset conditions from the first track chain set to obtain the at least one target track chain. Therefore, the spatial position of each image acquisition device in one track chain is analyzed to determine whether the track chain needs to be filtered, and the track chain can be more in line with the target track chain of the application scene.
In some embodiments, the filtering the first track chain in the first track chain set, where the spatial position of each image capturing device does not meet the preset condition, to obtain the at least one target track chain includes: filtering any one of the first track chains in the first track chain set to obtain a second track chain set under the condition that the spatial position of each image acquisition device in any one of the first track chains is not in the preset area; filtering out target second track chains in the second track chain set to obtain a third track chain set; the target second track chain characterizes that the space position of each image acquisition device in the track chain of any object to be detected is in the preset area; and in the third track chain set, determining the at least one target track chain based on a matching relationship between the spatial position of each image acquisition device in any third track chain and the preset area. Thus, a plurality of target track chains meeting preset conditions are more accurately analyzed.
In some embodiments, the determining, in the third track chain set, the at least one target track chain based on a matching relationship between a spatial position of each image capturing device in any third track chain and the preset area includes: in any third track chain, determining acquisition positions of the image acquisition devices of the first N track data and acquisition positions of the image acquisition devices of the rest track data on a time sequence; wherein, the value of N is more than 0 and less than the total number of tracks included in any one of the third track chains; determining any one of the third track chains as a target third track chain in response to the acquisition positions of the image acquisition devices of the first N track data being in the preset area and the acquisition positions of the image acquisition devices of the remaining track data not being in the preset area; and filtering out the target third track chain in the third track chain set to obtain the at least one target track chain. Therefore, based on a distributed computing mode, a target track chain which flows into a preset area purely can be screened from massive image data, and further analysis of objects flowing into the preset area is facilitated.
In some embodiments, the determining the number of objects to be detected for each identity type based on the identity types of the plurality of objects to be detected and the at least one target track chain includes: determining the identity type of the object to be detected corresponding to each target track chain to obtain an identity type set; grouping the at least one target track chain based on each identity type in the identity type set to obtain a target track chain group corresponding to each identity type; and determining the number of the objects to be detected of each identity type in the target track chain group corresponding to each identity type. Thus, based on specific application scenes, the identity types needing statistics are set, and the scenes which can be dealt with are wider.
An embodiment of the present application provides an object detection apparatus, including:
the first determining module is used for determining a first track data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location;
the second determining module is used for determining at least one second track data with the acquisition time within a preset time period in the first track data set;
A third determining module, configured to determine, in the at least one second track data, at least one target track chain in which a spatial position of an image capturing device of the track data enters a preset area from another area;
and the fourth determining module is used for determining the number of the objects to be detected of each identity type based on the identity types of the objects to be detected and the at least one target track chain.
The embodiment of the application provides a computer storage medium, on which computer executable instructions are stored, which can implement the above-mentioned object detection method after being executed.
The embodiment of the application provides a computer device, which comprises a memory and a processor, wherein the memory stores computer executable instructions, and the processor can realize the object detection method when running the computer executable instructions on the memory.
The embodiment of the application provides an object detection method and device, electronic equipment and storage medium, wherein for a plurality of first track data sets of objects to be detected, firstly, track data meeting a preset time period and having a spatial position of image acquisition equipment in a preset area, namely at least one second track data, are screened out from a large number of first track data sets; then, at least one target track chain flowing into a preset area from other areas is screened out from at least one second track data; and finally, counting the target track chain according to the identity types to obtain the number of the objects of each identity type. Therefore, the number of the objects of each identity type flowing into the preset area can be effectively counted by analyzing the preset time and the objects flowing into the preset area, so that the performance of analyzing a large amount of track data is improved.
Drawings
Fig. 1 is a schematic implementation flow chart of an object detection method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another implementation of the object detection method according to the embodiment of the present application;
fig. 3 is a schematic implementation flow chart of a person detection method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an object detection device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a composition structure of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the embodiments of the present application to be more apparent, the following detailed description of the specific technical solutions of the present invention will be further described with reference to the accompanying drawings in the embodiments of the present application. The following examples are illustrative of the present application, but are not intended to limit the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
Before further describing embodiments of the present application in detail, the terms and expressions that are referred to in the embodiments of the present application are described, and are suitable for the following explanation.
1) Distributed queries may access data from a variety of disparate data sources, which may be stored on the same or different computers.
2) The clustering analysis aims to aggregate data into a plurality of different clusters according to the similarity between data objects on the premise of no priori knowledge, so that elements in the same cluster are similar as much as possible, and element differences in different clusters are as large as possible.
The following describes exemplary applications of the object detection device provided in the embodiments of the present application, where the device provided in the embodiments of the present application may be implemented as a notebook computer, a tablet computer, a desktop computer, a mobile device (e.g., a personal digital assistant, a dedicated messaging device, a portable game device) and other various types of user terminals with data processing functions, and may also be implemented as a server. In the following, an exemplary application when the device is implemented as a terminal or a server will be described.
The method may be applied to a computer device, and the functions performed by the method may be performed by a processor in the computer device invoking program code, which may of course be stored in a computer storage medium, where it is seen that the computer device comprises at least a processor and a storage medium.
An embodiment of the present application provides an object detection method, as shown in fig. 1, and is described with reference to steps shown in fig. 1:
step S101, determining a first track data set of a plurality of objects to be detected in different time-space ranges.
In some embodiments, the spatio-temporal range includes: time period and spatial location. The spatial position refers to the position of the region where the image acquisition device of the trajectory data is located. The different time-space ranges include: different time periods and different spatial positions. The object to be detected may be any movable object that needs to be counted and enter a preset area, such as an animal, a person or a vehicle. The first track data set comprises first track data of each object to be detected in different time ranges. The track points in one first track data correspond to the same object, but one object may have two or more first track data due to the change of the acquisition angle in the image acquisition process. The first track data may include image data acquired by an object at different acquisition times and different acquisition positions, so that the first track data set includes image data acquired by a plurality of objects at different acquisition times and different acquisition positions.
Step S102, determining at least one second track data with acquisition time within a preset time period in the first track data set.
In some embodiments, the first trajectory data includes image data acquired by an object to be detected at different acquisition times and different acquisition positions; in this way, in the first track data set, for each first track data, data of the acquisition time of the image data in the first track data in a preset time period is determined, and second track data is obtained. Thus, a second trace data is: image data of an object to be detected within a preset time period; based on the above, the at least one second track data is image data of the plurality of objects to be detected within a preset time period. In a specific example, the preset time period is 2021, 6, 10, and 2021, 6, 20, and in each first track data, track data of the first track data, which is 2021, 6, 10, and 2021, 6, 20, is determined, and the track data is taken as second track data, so as to obtain at least one second track data.
Step S103, determining, in the at least one second track data, at least one target track chain of which the spatial position of the image capturing device of the track data enters the preset area from the other area.
In some embodiments, the other regions are different from the preset regions, and the other regions may be regions outside any one or more preset regions. For each second track data, determining the spatial positions of all image acquisition devices in the second track data respectively; if the spatial positions of the image acquisition devices enter a preset area from other areas, determining the second track data as a target track chain, and obtaining at least one target track chain. In this way, by analyzing the spatial position of the image acquisition device of the plurality of image data in the at least one second trajectory data, the trajectory data, i.e. the target trajectory chain, which is purely flowing into the predetermined area can be determined.
Step S104, determining the number of the objects to be detected of each identity type based on the identity types of the objects to be detected and the at least one target track chain.
In some embodiments, the identity types of the plurality of objects to be detected are used to represent the type of the object to be detected under the current application scenario, for example, taking the object to be detected as a person, if the current application scenario is that an adult who flows into the preset area is detected, the identity types of the person include: old people, children, adults, etc. Or taking an object to be detected as an animal as an example, if the current application scene is a wild animal migrated from other areas to a preset area, the identity types of the animal include: wild animals of each variety, and the like. In this way, the number of the objects to be detected corresponding to each identity type in the target track chains is counted according to the identity type of the objects to be detected, so that the objects of each identity type flowing into the preset area from other areas can be accurately determined.
In the embodiment of the application, for a plurality of acquired first track data sets of objects to be detected, first, track data which meet a preset time period and are in a preset area in the spatial position of the image acquisition equipment, namely at least one second track data, are screened out from a large number of first track data sets; then, at least one target track chain flowing into a preset area from other areas is screened out from at least one second track data; and finally, counting the target track chain according to the identity types to obtain the number of the objects of each identity type. Therefore, the number of the objects of each identity type flowing into the preset area can be effectively counted by analyzing the preset time and the objects flowing into the preset area, so that the performance of analyzing a large amount of track data is improved.
In some embodiments, the track of the object to be detected in the different time space ranges is formed by capturing the image data of the object in the different time space ranges, that is, the above step S101 may be implemented by the steps shown in fig. 2, and the following description is made in connection with fig. 1 and 2:
step S201, acquiring image data of the plurality of objects to be detected in the different time space ranges.
In some embodiments, the image data includes a picture capable of identifying the identity of the object to be detected, for example, the object to be detected is a person or an animal, and then the image data includes a facial image; if the object to be detected is a vehicle, the image data is an image or the like including identification information of the vehicle (such as a license plate number or a logo or the like).
Step S202, determining a first track data set including tracks of each object to be detected in the different time space ranges based on the image data of the plurality of objects to be detected.
In some embodiments, multiple classes of image data are obtained by clustering the image data of multiple objects to be detected; wherein one type of image data corresponds to the same object to be detected; thus, the first track data of the object to be detected, to which each type of image data belongs, can be formed by taking the image data of each type as a track point. Therefore, by collecting the image data collected in different ranges, a first track data is formed for each object to be detected, so that a plurality of first track data sets of the objects to be detected are obtained, and objects flowing into the target area from other areas can be conveniently screened out through the first track data sets.
In some possible implementations, the identity labeling of the image data of the object to be detected is achieved by clustering the first track data set and performing the collision with a preset identity library, so that the identity of the object is carried in the first track data, that is, the step S202 may be achieved through the following steps S221 to 224 (not shown in the drawing):
in step S221, the image data corresponding to the same object to be detected is subjected to track reduction to obtain a plurality of tracks.
In some embodiments, the track points in each track belong to the same object to be detected. And clustering the image data corresponding to the same object to be detected to realize track restoration.
In some possible implementations, track restoration is performed on massive images based on a track restoration technology of large-scale distributed clustering, so as to obtain a plurality of tracks. Taking an object to be detected as a person as an example, then the image data of the object to be detected is a face image, and carrying out track restoration on a large number of face images based on a face track restoration technology of large-scale distributed clustering to obtain a plurality of face tracks; the step S221 may be implemented by:
the first step is to cluster the image data corresponding to the same object to be detected to obtain multiple types of image data.
In some embodiments, clustering all image data according to whether the image data belong to the same object to be detected, so as to obtain multiple types of image data; thus, each type of image data corresponds to an object to be detected. Taking an object to be detected as a person as an example, clustering the image data belonging to the same person to obtain multiple types of image data, wherein each type of image data corresponds to one person; in this way, image data including face images, which are captured for a plurality of persons, are clustered into image data for each person.
And secondly, taking each frame of image data in any type of image data as a track point to form a track of an object to be detected to which the image data belong, so as to obtain the tracks.
In some embodiments, in the image data of the class, each acquired frame of image is used as a track point, and the track points are connected to form a track of an object to be detected to which the image data of the class belongs; thus, one track formed by the object to be detected in different time space ranges is obtained, and tracks of a plurality of objects to be detected are obtained. Therefore, the track of the object to be detected is restored in different time space ranges by clustering the object to be detected, so that the track of the object is obtained, and the track of each object to be detected can be effectively restored.
Step S222, determining the identity and the identity type of each object to be detected based on a preset identity library.
In some embodiments, comparing the class center characteristics of each track obtained by clustering with the preset identity library characteristics; and labeling the identity of each track according to the comparison result. Because the features in the preset identity library carry the identity mark and the identity type of the object, the identity information and the identity type of the features in the comparison can be used for marking the identity label for the track after the comparison.
And S223, labeling the track corresponding to each object to be detected by adopting the identity mark and the identity type of each object to be detected, and obtaining the labeled track of each object to be detected.
In some embodiments, the track is marked based on the identity and the identity type in the preset identity library, so that a marked track carrying the identity and the identity type of the object to be detected is obtained.
In some possible implementations, identity marking is performed on the plurality of track sets based on the identity marking and deduplication technology of large-scale distributed clustering and collision, so as to obtain marked tracks. The marked track is expressed in the form of a track (Tracks) table, and the Tracks table comprises a plurality of image data, a space-time information key value (key) corresponding to each image data and a track identifier (clusters_id). The image data included in each marked track corresponds to the same identity, i.e. the image data included in one marked track corresponds to the same object. Because the mass image data is obtained by snapshot, different image data of the same object can be clustered into different track sets under the influence of image quality and snapshot angle, and therefore the same identity corresponds to at least one marked track.
Step S224, determining the first track data set based on the marked tracks of the plurality of objects to be detected.
In some embodiments, the marked track of each object to be detected is used as first track data of the object to be detected; wherein, the representation form of the first track data is: (entity_id, entity_type_code, idcard, captured_date, captured_time, device_area_code). Wherein, the entity_id is the archive ID of the object corresponding to the shooting data, namely the object ID; the entity_type_code is the archive type code of the object corresponding to the snapshot image data; the idc is the identity of the object corresponding to the snapshot image data; capturedate is the snapshot date corresponding to the snapshot image data; captured_time is the snapshot time corresponding to the snapshot image data; the device_area_code is a region code where the camera corresponding to the shooting data is located.
In a specific example, taking an object to be detected as a person, and the image data as face data, first track data of the person includes (entity_id, entity_type_code, idc, captured_date, captured_time, device_area_code). The entity_id is an archive ID corresponding to face shooting data, namely a person ID; the entity_type_code is a file type code corresponding to the face shooting data; the idc is an identity card number corresponding to face shooting data, namely a unique identifier of a person; capturedate is a snapshot date corresponding to the face shooting data; captured_time is the snapshot time corresponding to the face shooting data; the device_area_code is a region code where the camera corresponding to the face shooting data is located.
The above steps S221 to S224 provide a way to realize "determining the first track data set including the track of each object to be detected in the different time space ranges based on the image data of the plurality of objects to be detected", in which the plurality of tracks are obtained by performing track restoration on the image data of the object to be detected first; carrying out identity marking on the tracks to obtain tracks carrying at least identity marks and identity types, and further obtaining track data of each object in different time space ranges; therefore, the image data required by the current application scene can be more completely counted, and the source data is enriched.
In some embodiments, to facilitate data analysis in a distributed manner, track data within a preset period of time is divided into a plurality of time tuples, so that statistical analysis of the data is implemented based on the time tuples, that is, the above step S103 may be implemented by the following steps S131 to 133 (not shown in the drawings):
step S131, splitting the at least one second track data by using a preset unit duration to obtain a plurality of time tuples.
In some embodiments, each time tuple includes at least: the acquisition time of the track data in each tuple, the spatial position of the image acquisition equipment, and the identity identification and the identity type of the corresponding object to be detected. The preset unit duration may be a unit of one day, and the slicing is performed on at least one second track data, so as to obtain a time tuple with a duration of one day, where the time tuple includes: the idc of an object, the image data acquired for the object during the day (each image data carrying the acquisition instant) and the area code of the spatial location of the image acquisition device of the image data. If the preset time period is 12 days, splitting at least one second track data in the preset time period by taking the days as a unit to obtain 12 time tuples.
Step S132, based on the identity and the identity type of each object to be detected, reads the track data in the plurality of time tuples to obtain a first track chain set including the first track chain of each object to be detected.
In some embodiments, track data of the plurality of time tuples are read in a distributed manner according to the identity and the identity type of each object to be detected, so as to obtain a first track chain of the detected object. The first track chain includes: track data within the plurality of time tuples ordered by acquisition time of the track data; the data form of the first track chain is { idc, entity_type_code, [ (capturetime, device_area_code) ] }; i.e. a first track chain represents all track data of an object to be detected of a certain identity type under a preset area within a preset time period.
And step S133, filtering out track chains which do not meet preset conditions in the first track chain set to obtain the at least one target track chain.
In some embodiments, the preset condition may be set based on a current application scenario, for example, the current application scenario is that a wild animal that flows into a certain area is counted, and then the preset condition is that the spatial position of the image capturing device is in the area, so that a track chain that does not meet the preset condition is that the spatial position of the image capturing device is not in the area. If the current application scene is complex, a complex preset condition can be further set, for example, the current application scene is a person counting the person flowing into a preset area from the foreign area, the preset condition is that the spatial positions of the image acquisition equipment are all other areas of the foreign area before a certain period, and the spatial positions of the image acquisition equipment are all in the preset area after the certain period; therefore, the track chains which do not meet the preset conditions can be accurately determined, and further the track chains which do not meet the preset conditions are filtered out from the first track chain set, so that the target track chains which meet the current application scene can be obtained. Therefore, the track data is segmented by taking the day as granularity, so that a plurality of time tuples are obtained, the track data is conveniently read from the time tuples in a distributed mode, and the track data reading speed can be improved.
In some embodiments, in a first track chain, by analyzing the spatial position of each image capturing device, it can be accurately determined whether the track chain is a target track chain, that is, the step S133 may be implemented by:
in a first step, the spatial position of each image acquisition device in any one of the first trajectory chains is determined.
In some embodiments, for any one of the first track chains, the spatial location of the image acquisition device in the track chain that acquired each image data is determined. Taking an object to be detected as a person as an example, any first track chain is used for determining the spatial position of the image acquisition device of each face data in the first track chain of the person in a preset time period and all face data in a preset area by taking a person of a certain type as a certain person, so as to judge whether the spatial position meets a preset condition.
And a second step of filtering out the first track chains of which the spatial positions of each image acquisition device do not meet preset conditions from the first track chain set to obtain the at least one target track chain.
In some embodiments, in the first track chain set, a first track chain in which the spatial position of each image acquisition device in one chain does not meet the preset condition is found, and filtered out, so that a target track chain meeting the preset condition is obtained. Therefore, the spatial position of each image acquisition device in one track chain is analyzed to determine whether the track chain needs to be filtered, and the track chain can be more in line with the target track chain of the application scene.
In some possible implementations, by adopting a distributed manner, filtering track chains in the first track chain set layer by layer, where the track chains do not meet a preset condition, the target track chain is obtained, which may be implemented by the following steps:
in the first step, under the condition that the spatial position of each image acquisition device in any first track chain is not in the preset area, any first track chain is filtered out from the first track chain set, and a second track chain set is obtained.
In some embodiments, if all the spatial positions of the image acquisition devices in the first track chain are not in the preset area, it is indicated that the object to be detected corresponding to the first track chain never enters or exits the preset area; thus, in the first track set, the first track chain which is used for filtering the object to be detected and enters the preset area is obtained, and the track chain which is used for entering the preset area, namely the second track chain set, is obtained. Thus, the objects to be detected corresponding to each second track chain are objects entering and exiting the preset area in the preset time period, for example, objects entering from a certain area to the preset area and not exiting from the preset area in the preset time period, objects always entering the preset area in the preset time period, objects exiting from the preset area to other areas in the preset time period, objects entering from other areas to the preset area and exiting from the preset area in the preset time period, and the like.
And a second step of filtering out a target second track chain in the second track chain set to obtain a third track chain set.
In some embodiments, the spatial position of each image capturing device in the track chain of the target second track chain represents any object to be detected is in the preset area, which indicates that the object to be detected corresponding to the target second track chain never exits the preset area, that is, is always in the preset area within a preset time period. Thus, in the second track chain set, the track chains of the objects to be detected, which are all in the preset area, are filtered out, so that the track chains of the objects to be detected, which come through the preset area, namely the third track chain set, are obtained. Thus, the object to be detected corresponding to each third track chain is an object that is not always in the target area within the preset time period, for example, an object that enters the preset area from other areas and an object that exits from the preset area to other areas.
And thirdly, determining the at least one target track chain based on a matching relation between the spatial position of each image acquisition device in any third track chain and the preset area in the third track chain set.
In some embodiments, the matching relationship between the spatial position of each image capturing device in any third track chain and the preset area includes: the spatial position of each image acquisition device in any third track chain is in a preset area or not. By analyzing the track chains of the objects which are not always in the target area, the spatial positions of the image acquisition equipment in the third track chain are determined to be in the preset area and the spatial positions of the image acquisition equipment in the third track chain are determined to be not in the preset area, so that the target track chain can be accurately analyzed. Therefore, track chains with spatial positions of the image equipment not in the preset area and track chains with spatial positions of the image acquisition equipment in the preset area are sequentially filtered out from the first track chain set, and therefore a plurality of target track chains meeting preset conditions are more accurately analyzed.
In some embodiments, by analyzing the acquisition positions of the image acquisition devices of the first N track data and the acquisition positions of the image acquisition devices of the subsequent track data in a third track chain, a target track chain that flows into a preset area purely can be obtained, which can be achieved by the following procedures:
First, in any one of the third trajectory chains, the acquisition positions of the image acquisition devices of the first N trajectory data on the time series and the acquisition positions of the image acquisition devices of the remaining trajectory data are determined.
In some embodiments, N has a value greater than 0 and less than the total number of tracks included in any one of the third track chains. Since the track data included in one third track chain is: the method comprises the steps that an object to be detected of a certain identity type is in a preset time period, the spatial position of acquisition equipment of partial image data is in a plurality of track data of a preset area, and the data form is as follows: { the end_type_code, [ (capturejtime, device_area_code) ] } the first N pieces of track data on the time series are one third track chain { the end, the end_type_code, [ (capturejtime, device_area_code) ] } the capturejtime is arranged in the first N pieces of track data (for example, the first N pieces of capture time capturejtime are capturejtime 1, capturejtime 2, ··n), and the corresponding first N pieces of track data are { the end, the end_type_code, [ (capturejtime 1, device_area_code) ], { the end, the end_type_code, [ (capturejtime, device_2·code) } N). The acquisition positions of the image acquisition devices of the first N track data are as follows: acquiring the acquisition position of an image acquisition device for acquiring image data at an acquisition time captured_time1; acquiring the acquisition position of an image acquisition device for acquiring image data at an acquisition time captured_time2; and the acquisition position of the image acquisition device for acquiring the image data at the acquisition time capturetimeN. The acquisition position of the image acquisition device of the residual track data is the acquisition position of the image acquisition device of the last track data except the first N track data in the third track chain.
And secondly, determining any third track chain as a target third track chain in response to the fact that the acquisition positions of the image acquisition devices of the first N track data are in the preset area and the acquisition positions of the image acquisition devices of the residual track data are not in the preset area.
In some embodiments, if the area code corresponding to the acquisition position of the image acquisition device of the first N track data is the same as the area code of the preset area, that is, the acquisition position of the image acquisition device of the first N track data is illustrated in the preset area; and the region code corresponding to the acquisition position of the image acquisition device of the residual track data in the third track chain is different from the region code of the preset region, which indicates that the acquisition position of the image acquisition device of the residual track data is not in the preset region; further, it is explained that the object to be detected corresponding to the third track chain does not return to the preset area after exiting from the preset area in the preset time period. Such a third track chain is determined as a target third track chain.
And finally, filtering out the target third track chain in the third track chain set to obtain the at least one target track chain.
In some embodiments, filtering the target third track chain in the third track chain set, that is, filtering the objects which do not enter the preset area after exiting the preset area within the preset time period from the several objects to be detected corresponding to the third track chain set; thus, an object that has flowed into the target region in a pure manner can be obtained, and the trajectory chain of the object that has flowed into the target region in a pure manner can be used as the target trajectory chain, thereby obtaining at least one target trajectory chain.
In the embodiment of the application, the spatial positions of the image acquisition devices of the first N track data arranged according to the time sequence in any third track chain and the spatial positions of the image acquisition devices of the following track data are analyzed; and filtering out the track chains which do not enter the preset area after exiting from the preset area in the preset time period, thereby obtaining the target track chains which flow into the preset area purely. Therefore, based on a distributed computing mode, a target track chain which flows into a preset area purely can be screened from massive image data, and further analysis of objects flowing into the preset area is facilitated.
In some embodiments, by counting the objects to be detected of each identity type in the plurality of target track chains, the objects to be detected of each identity type flowing into the preset area can be obtained, that is, the above step S104 may be implemented by the following steps S141 to 143 (not shown in the drawing):
Step S141, determining the identity type of the object to be detected corresponding to each target track chain to obtain an identity type set.
Here, since each track data carries the identity identifier and the identity type of the object to be detected, for the plurality of target track chains, the identity type of the object to be detected corresponding to each target track chain can be determined, so that the identity type set included in the plurality of target track chains is obtained. In a specific example, taking an object to be detected as a person, the identity type of the person includes the profile type of the person (for example, a class a person profile type, a class B person profile type, a class C person profile type, etc., where the types of the persons to which A, B, C belong are different), and the identity type of each person is determined in at least one target track chain; thereby obtaining the profile type of the at least one person to which the at least one target track chain belongs.
Step S142, based on each identity type in the set of identity types, grouping the at least one target track chain to obtain a target track chain group corresponding to each identity type.
Here, at least one target track chain is grouped per identity type, i.e. there are several identity types, i.e. at least one target face track set is grouped into several groups. Taking the object to be detected as a person as an example, the identity type of the person comprises the profile type of the person, and then, if there are several types of identity profiles, at least one target track chain is divided into several groups, and one profile type corresponds to one group of target track chain groups.
Step S143, determining the number of objects to be detected of each identity type in the target track chain group corresponding to each identity type.
Here, in a group of target track chains, there are several target track chains analyzed, and the several target track chains correspond to several objects to be detected, thereby obtaining the number of objects to be detected for each identity type. Since the track data in one target track chain corresponds to the same object to be detected, if two or more target track chains belonging to the same object to be detected do not exist in the target track chain group, there are several target track chains in the target track chain group corresponding to each identity type, i.e. there are several objects to be detected. If two or more target track chains belonging to the same object to be detected exist in the target track chain group, counting the number of the actually corresponding objects to be detected in the target track chain group to obtain the number of the objects to be detected of the identity type.
In the embodiment of the application, the to-be-detected objects of each identity type flowing into the preset area can be accurately counted by counting the to-be-detected objects corresponding to the target track chain group of each identity type; thus, based on specific application scenes, identity types needing statistics can be set, and scenes which can be dealt with are wider.
In the following, an exemplary application of the embodiment of the present application in an actual application scenario will be described, where an object to be detected is a person, and image data is face data of the person, and a distributed preset event situation awareness for large-scale track information is described.
The track information of each person formed based on the collected large-scale face image data can reflect the behavior characteristics of one person to a certain extent. However, the behavior characteristics of each person are very complex through large-scale face data analysis: on one hand, the human face track is restored from the mass data; another aspect is to abstract the commonality of each type of behavior pattern and analyze which types of people are in line with a particular behavior pattern based on face track information. To accomplish these two analyses, efficient computational analysis of mass data is required, and high expansibility is provided, which is in response to the continuous expansion of urban detection systems and data sizes.
Based on the above, the embodiment of the application provides a personnel detection method, which can analyze inflow distribution situations of the type personnel to be detected in the target space-time range of the target area by counting the preset time and the shooting data of the inflow target personnel in the preset area, so as to realize situation awareness of the preset event; the preset event may be an event that is set by the user autonomously and needs to be detected, for example, the number of type a personnel that flow into the target area is analyzed, and the like.
In some embodiments, personnel detection is achieved by the following three steps:
the first step, carrying out track reduction on the face data to obtain a plurality of track sets.
In one possible implementation, a face track reduction technology based on large-scale distributed clustering performs track reduction on massive face data to obtain a plurality of track sets.
And secondly, carrying out identity marking on the plurality of track sets obtained in the first step.
In some possible implementations, the trajectories of the plurality of objects to be detected are identified based on large-scale distributed clustering and collision identification and deduplication techniques.
Thirdly, carrying out distributed query on the track of the personnel to be detected after the identity marking, and analyzing the type distribution situation of the personnel to be detected flowing into the target area within a specified time range.
After the first and second steps, the data is characterized as a track table.
In some possible implementations, the third step may be implemented by:
and step 1, a track table is used for representing snap track data of a person to be detected, and corresponding space-time information and attribution entity_id are attached.
The trajectory data of each person is expressed in the form of (entity_id, entity_type_code, idcard, captured_date, captured_time, device_area_code), wherein:
The entity_id is an archive identifier (Identity document, ID) corresponding to the face shooting data, namely a person ID.
The entity_type_code is an archive type code corresponding to the face shooting data.
The idc is the identification card number corresponding to the face shooting data, namely the unique identification of the person.
capturedate is the snapshot date corresponding to the face shooting data.
The captured_time is the snapshot time corresponding to the face shooting data.
The device_area_code is a region code where the camera corresponding to the face shooting data is located.
Step 2, inputting the time period [ (t) needing analysis 1 ,t 2 )]And a section code entry_area_code and a top_k of a return result.
Will be time period [ (t) 1 ,t 2 )]Slicing with day granularity, splitting into time tuples (computed_date), and counting by distributed memoryThe track data of the computing engine (spark distributed) within the reading designated time range is [ (id card, entity_type_code, capturetime, device_area_code)]。
And 3, grouping the track data in the step 2 based on the idc and the entity_type_code, and performing positive sequence sorting based on the capturetime to obtain a track chain { idc, entity_type_code, [ (capturetime, device_area_code) ] of each person in a specified time range.
And 4, filtering out the personnel and the track thereof, wherein the personnel and the track thereof do not contain the target entity_area_code in the track chain in the step 3, namely filtering out the personnel which do not enter and exit the target area within the specified time range.
And 5, filtering out personnel and the track of the target entity_area_code, namely filtering out personnel which are always in the target area within the specified time range, of each track of the track chain in the step 3.
And 6, filtering out the identity_area_codes of N tracks in front of the track chain in the step 3, wherein the identity_area_codes of all tracks are target identity_area_codes, and the identity_area_codes of all the tracks behind are not personnel of the target identity_area_codes and the tracks thereof, namely filtering out personnel which exit from the target area and do not enter any more in a specified time range. A pure inflow track chain { idc, entity_type_code, [ (capturetime, device_area_code) ] } is obtained.
And 7, grouping the pure inflow track chain in the step 6 based on the entity_type_code, and counting inflow times of each type of personnel.
Fig. 3 is a schematic implementation flow chart of the personnel detection method provided in the embodiment of the present application, and the following description is made with reference to the steps shown in fig. 3:
step S301, obtaining an input situation awareness condition.
In some possible implementations, the situation awareness condition may be set based on an application scenario of the person detection method or a specific type of the object to be detected, for example, the situation awareness condition includes: the time period [ (t) where the trajectory data is located 1 ,t 2 )]Archive type code (entity_type_code) corresponding to face shooting data and first K tracks needing to output final statistics of personsTrace sets.
Step S302, slicing the track data of the object to be detected, which is snapped, with the granularity of days as granularity, to obtain track sets of a plurality of time tuples.
In some possible implementations, the set of trajectories for the plurality of time tuples includes:
[(idcard 1,entity_type_code 1,captured_time 1,devince_area_code 1),
(idcard 2,entity_type_code 2,captured_time 1,devince_area_code 2),
(idcard 3,entity_type_code 3,captured_time 1,devince_area_code 1),
(idcard 4,entity_type_code 4,captured_time 1,devince_area_code 2),
(idcard 5,entity_type_code 5,captured_time 1,devince_area_code 2),
(idcard 1,entity_type_code 1,captured_time 2,devince_area_code 1),
(idcard 2,entity_type_code 2,captured_time 2,devince_area_code 2),
(idcard 3,entity_type_code 3,captured_time 2,devince_area_code 2),
(idcard 4,entity_type_code 4,captured_time 2,devince_area_code 1),
(idcard 5,entity_type_code 5,captured_time 2,devince_area_code 1),
(idcard 5,entity_type_code 5,captured_time 3,devince_area_code 3),
......];
step S303, calling the distributed computing framework to execute the information query task.
In some possible implementations, the distributed computing framework may be spark distributed, that is, the distributed computing framework is adopted, track data in a specified time range is read, and information query is performed.
And S304, filtering the track sets of the time tuples by adopting a called distributed computing framework according to the file ID, the file type code and the target zone code to obtain the track data set of the pure inflow personnel.
In some possible implementations, the trajectory data set of pure inflow people includes:
[(idcard 4,entity_type_code 4,captured_time 1,devince_area_code 2),
(idcard 5,entity_type_code 5,captured_time 1,devince_area_code 2),
(idcard 4,entity_type_code 4,captured_time 2,devince_area_code 1),
(idcard 5,entity_type_code 5,captured_time 2,devince_area_code 1),
(idcard 5,entity_type_code 5,captured_time 3,devince_area_code 3),
......];
step S305, grouping the track data sets of the pure inflow people based on the file type codes, and counting inflow times of each type of people.
Step S306, outputting the counted personnel times of each file type code.
In a specific example, inflow distribution situation of the person to be detected in the target space-time range of the target area can be analyzed by counting the preset time and face image data of the person to be detected flowing in the preset area, so that situation sensing of the flowing of the person is realized. For example, an entertainment activity is held in a certain area for a certain period of time, and the situation that the person to be detected flows into the activity can be intelligently perceived by analyzing the track situation of the person to be detected in the area in near real time.
In the embodiment of the application, the number of the types of the personnel reaching the target area in the specific target time can be obtained through the situation analysis of the personnel flow based on the large-scale track information; for example, the number of class a people, the number of class B people, the number of class C people, etc.
An embodiment of the present application provides an object detection device, fig. 4 is a schematic structural diagram of the object detection device according to the embodiment of the present application, as shown in fig. 4, where the object detection device 400 includes:
a first determining module 401, configured to determine a first trajectory data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location;
A second determining module 402, configured to determine, in the first track data set, at least one second track data whose acquisition time is within a preset period of time;
a third determining module 403, configured to determine, in the at least one second track data, at least one target track chain in which a spatial position of an image capturing device of the track data enters a preset area from another area;
a fourth determining module 404, configured to determine the number of objects to be detected of each identity type based on the identity types of the plurality of objects to be detected and the at least one target track chain.
In some embodiments, the first determining module 401 includes:
the first acquisition submodule is used for acquiring image data of the plurality of objects to be detected in the different time space ranges;
a first determination sub-module for determining a first set of trajectory data comprising trajectories of each object to be detected within the different time-space ranges based on image data of the plurality of objects to be detected.
In some embodiments, the first determining sub-module comprises:
the first track reduction unit is used for carrying out track reduction on the image data corresponding to the same object to be detected to obtain a plurality of tracks; wherein the track points in each track belong to the same object to be detected;
The first determining unit is used for determining the identity mark and the identity type of each object to be detected based on a preset identity library;
the first labeling unit is used for labeling the track corresponding to each object to be detected by adopting the identity mark and the identity type of each object to be detected, so as to obtain the labeled track of each object to be detected;
and the second determining unit is used for determining the first track data set based on the marked tracks of the plurality of objects to be detected.
In some embodiments, the first trajectory restoration unit includes:
the first clustering subunit is used for clustering the image data corresponding to the same object to be detected to obtain multi-class image data; wherein, each type of image data belongs to the same object to be detected;
the first forming subunit is configured to form a track of an object to be detected to which any type of image data belongs by using each frame of image data in any type of image data as a track point, so as to obtain the multiple tracks.
In some embodiments, the third determining module 403 includes:
the first splitting module is used for splitting the at least one second track data by adopting a preset unit duration to obtain a plurality of time tuples; wherein each time tuple comprises at least: the acquisition time of the track data in each tuple, the spatial position of the image acquisition equipment, and the identity mark and the identity type of the corresponding object to be detected;
The first reading sub-module is used for reading the track data in the plurality of time tuples based on the identity mark and the identity type of each object to be detected to obtain a first track chain set comprising a first track chain of each object to be detected; wherein each first track chain comprises: track data within the plurality of time tuples ordered by acquisition time of the track data;
and the first filtering submodule is used for filtering out track chains which do not meet preset conditions in the first track chain set to obtain the at least one target track chain.
In some embodiments, the first filtering sub-module includes:
a third determining unit, configured to determine a spatial position of each image capturing device in any one of the first track chains;
the first filtering unit is used for filtering out the first track chains of which the space positions of each image acquisition device do not meet preset conditions in the first track chain set to obtain the at least one target track chain.
In some embodiments, the first filter unit comprises:
the first filtering subunit is configured to filter any one of the first track chains in the first track chain set to obtain a second track chain set when the spatial position of each image acquisition device in any one of the first track chains is not in the preset area;
The second filtering subunit is used for filtering out a target second track chain in the second track chain set to obtain a third track chain set; the target second track chain characterizes that the space position of each image acquisition device in the track chain of any object to be detected is in the preset area;
the first determining subunit is configured to determine, in the third track chain set, the at least one target track chain based on a matching relationship between a spatial position of each image capturing device in any one of the third track chains and the preset area.
In some embodiments, the first determining subunit is further configured to: in any third track chain, determining acquisition positions of the image acquisition devices of the first N track data and acquisition positions of the image acquisition devices of the rest track data on a time sequence; wherein, the value of N is more than 0 and less than the total number of tracks included in any one of the third track chains; determining any one of the third track chains as a target third track chain in response to the acquisition positions of the image acquisition devices of the first N track data being in the preset area and the acquisition positions of the image acquisition devices of the remaining track data not being in the preset area; and filtering out the target third track chain in the third track chain set to obtain the at least one target track chain.
In some embodiments, the fourth determination module 404 includes:
the second determining submodule is used for determining the identity type of the object to be detected corresponding to each target track chain to obtain an identity type set;
the first grouping sub-module is used for grouping the at least one target track chain based on each identity type in the identity type set to obtain a target track chain group corresponding to each identity type;
and the third determining submodule is used for determining the number of the objects to be detected of each identity type in the target track chain group corresponding to each identity type.
It should be noted that the description of the above device embodiments is similar to the description of the method embodiments described above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
In the embodiment of the present application, if the object detection method is implemented in the form of a software functional module and sold or used as a separate product, the object detection method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or portions contributing to the prior art may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a terminal, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the application further provides a computer program product, which comprises computer executable instructions, and the computer executable instructions can implement the steps in the object detection method provided by the embodiment of the application after being executed.
The present embodiment further provides a computer storage medium having stored thereon computer executable instructions which when executed by a processor implement the steps of the object detection method provided in the above embodiment.
An embodiment of the present application provides a computer device, fig. 5 is a schematic diagram of a composition structure of the computer device according to the embodiment of the present application, as shown in fig. 5, and the computer device 500 includes: a processor 501, at least one communication bus, a communication interface 502, at least one external communication interface and a memory 503. Wherein the communication interface 502 is configured to enable connection communication between these components. The communication interface 502 may include a display screen, and the external communication interface may include a standard wired interface and a wireless interface, among others. Wherein the processor 501 is configured to execute an image processing program in a memory to implement the steps of the object detection method provided in the above embodiment.
The description of the above embodiments of the object detection apparatus, the computer device and the storage medium is similar to the description of the above embodiments of the method, and has similar technical descriptions and beneficial effects to those of the corresponding embodiments of the method, which are limited in space and can be described in the above embodiments of the method, so that the description is omitted herein. For technical details not disclosed in the embodiments of the object detection apparatus, the computer device and the storage medium of the present application, please refer to the description of the method embodiments of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units. Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the integrated units described above may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partly contributing to the prior art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk. The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. An object detection method, the method comprising:
determining a first track data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location;
in the first track data set, determining at least one second track data with acquisition time within a preset time period;
in the at least one second track data, determining at least one target track chain of which the spatial position of the image acquisition equipment of the track data enters a preset area from other areas; determining the number of the objects to be detected of each identity type based on the identity types of the plurality of objects to be detected and the at least one target track chain;
wherein, in the at least one second track data, determining at least one target track chain of the spatial position of the image acquisition device of the track data entering the preset area from the other area includes:
splitting the at least one second track data by adopting a preset unit duration to obtain a plurality of time tuples; wherein each time tuple comprises at least: the acquisition time of the track data in each time tuple, the spatial position of the image acquisition equipment, and the identity mark and the identity type of the corresponding object to be detected;
Based on the identity mark and the identity type of each object to be detected, track data in the plurality of time tuples are read to obtain a first track chain set comprising a first track chain of each object to be detected; wherein each first track chain comprises: track data within the plurality of time tuples ordered by acquisition time of the track data;
and filtering out track chains which do not meet preset conditions in the first track chain set to obtain at least one target track chain.
2. The method of claim 1, wherein the determining a first set of trajectory data for a plurality of objects to be detected within different time-space ranges comprises:
acquiring image data of the plurality of objects to be detected in the different time space ranges;
a first set of trajectory data is determined that includes trajectories of each of the objects to be detected within the different time-space ranges based on image data of the plurality of objects to be detected.
3. The method of claim 2, wherein the determining a first set of trajectory data including trajectories of each object to be detected within the different time-space ranges based on image data of the plurality of objects to be detected comprises:
Performing track reduction on image data corresponding to the same object to be detected to obtain a plurality of tracks; wherein the track points in each track belong to the same object to be detected;
based on a preset identity library, determining the identity and the identity type of each object to be detected;
labeling the track corresponding to each object to be detected by adopting the identity mark and the identity type of each object to be detected to obtain the labeled track of each object to be detected;
the first trajectory data set is determined based on the annotated trajectories of the plurality of objects to be detected.
4. A method according to claim 3, wherein the performing track reduction on the image data corresponding to the same object to be detected to obtain a plurality of tracks includes:
clustering the image data corresponding to the same object to be detected to obtain multi-class image data; wherein, each type of image data belongs to the same object to be detected;
and taking each frame of image data in any type of image data as a track point to form a track of an object to be detected to which the image data belong so as to obtain the tracks.
5. The method according to claim 1, wherein filtering out the track chains that do not meet the preset condition in the first track chain set to obtain the at least one target track chain includes:
Determining the spatial position of each image acquisition device in any first track chain;
and filtering out the first track chains of which the spatial positions of each image acquisition device do not meet preset conditions from the first track chain set to obtain the at least one target track chain.
6. The method according to claim 5, wherein filtering the first track chain in the first track chain set, where the spatial position of each image capturing device does not meet the preset condition, to obtain the at least one target track chain includes:
filtering any one of the first track chains in the first track chain set to obtain a second track chain set under the condition that the spatial position of each image acquisition device in any one of the first track chains is not in the preset area;
filtering out target second track chains in the second track chain set to obtain a third track chain set; the target second track chain characterizes that the space position of each image acquisition device in the track chain of any object to be detected is in the preset area;
and in the third track chain set, determining the at least one target track chain based on a matching relationship between the spatial position of each image acquisition device in any third track chain and the preset area.
7. The method of claim 6, wherein the determining the at least one target track chain in the third track chain set based on a matching relationship between a spatial position of each image capturing device in any one third track chain and the preset region comprises:
in any third track chain, determining acquisition positions of the image acquisition devices of the first N track data and acquisition positions of the image acquisition devices of the rest track data on a time sequence; wherein, the value of N is more than 0 and less than the total number of tracks included in any one of the third track chains;
determining any one of the third track chains as a target third track chain in response to the acquisition positions of the image acquisition devices of the first N track data being in the preset area and the acquisition positions of the image acquisition devices of the remaining track data not being in the preset area;
and filtering out the target third track chain in the third track chain set to obtain the at least one target track chain.
8. The method according to any one of claims 1 to 4, wherein said determining the number of objects to be detected for each identity type based on the identity type of the plurality of objects to be detected and the at least one target track chain comprises:
Determining the identity type of the object to be detected corresponding to each target track chain to obtain an identity type set;
grouping the at least one target track chain based on each identity type in the identity type set to obtain a target track chain group corresponding to each identity type;
and determining the number of the objects to be detected of each identity type in the target track chain group corresponding to each identity type.
9. An object detection apparatus, the apparatus comprising:
the first determining module is used for determining a first track data set of a plurality of objects to be detected in different time space ranges; wherein the spatio-temporal range comprises: time period and spatial location;
the second determining module is used for determining at least one second track data with the acquisition time within a preset time period in the first track data set;
a third determining module, configured to determine, in the at least one second track data, at least one target track chain in which a spatial position of an image capturing device of the track data enters a preset area from another area; a fourth determining module, configured to determine, based on the identity types of the plurality of objects to be detected and the at least one target track chain, a number of objects to be detected of each identity type;
Wherein the third determining module includes:
the first splitting module is used for splitting the at least one second track data by adopting a preset unit duration to obtain a plurality of time tuples; wherein each time tuple comprises at least: the acquisition time of the track data in each time tuple, the spatial position of the image acquisition equipment, and the identity mark and the identity type of the corresponding object to be detected;
the first reading sub-module is used for reading the track data in the plurality of time tuples based on the identity mark and the identity type of each object to be detected to obtain a first track chain set comprising a first track chain of each object to be detected; wherein each first track chain comprises: track data within the plurality of time tuples ordered by acquisition time of the track data;
and the first filtering submodule is used for filtering out track chains which do not meet preset conditions in the first track chain set to obtain at least one target track chain.
10. A computer storage medium having stored thereon computer executable instructions which, when executed, enable the object detection method of any one of claims 1 to 8.
11. A computer device comprising a memory having stored thereon computer executable instructions and a processor capable of implementing the object detection method of any of claims 1 to 8 when the computer executable instructions on the memory are executed by the processor.
CN202110699106.5A 2021-06-23 2021-06-23 Object detection method and device, electronic equipment and storage medium Active CN113343060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110699106.5A CN113343060B (en) 2021-06-23 2021-06-23 Object detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110699106.5A CN113343060B (en) 2021-06-23 2021-06-23 Object detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113343060A CN113343060A (en) 2021-09-03
CN113343060B true CN113343060B (en) 2023-05-09

Family

ID=77478357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110699106.5A Active CN113343060B (en) 2021-06-23 2021-06-23 Object detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113343060B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185964A (en) * 2021-12-03 2022-03-15 深圳市商汤科技有限公司 Data processing method, device, equipment, storage medium and program product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231755B (en) * 2007-01-25 2013-03-06 上海遥薇(集团)有限公司 Moving target tracking and quantity statistics method
CN111784729B (en) * 2020-07-01 2023-09-05 杭州海康威视数字技术股份有限公司 Object tracking method and device, electronic equipment and storage medium
CN112561971A (en) * 2020-12-16 2021-03-26 珠海格力电器股份有限公司 People flow statistical method, device, equipment and storage medium
CN112966652A (en) * 2021-03-26 2021-06-15 北京市商汤科技开发有限公司 Trajectory convergence method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113343060A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN106354816B (en) video image processing method and device
CN108446681B (en) Pedestrian analysis method, device, terminal and storage medium
TW202115648A (en) Behavioral analysis methods, electronic devices and computer storage medium
CN113052079B (en) Regional passenger flow statistical method, system, equipment and medium based on face clustering
CN102902960B (en) Leave-behind object detection method based on Gaussian modelling and target contour
JP6489170B2 (en) Analysis device, analysis method, and program
CN111414949A (en) Picture clustering method and device, electronic equipment and storage medium
CN109784220B (en) Method and device for determining passerby track
CN112232178A (en) Region footfall point judgment method, system, device and medium based on portrait gathering
CN113343060B (en) Object detection method and device, electronic equipment and storage medium
CN113468283A (en) Data processing method, device, equipment and storage medium
CN110717358A (en) Visitor number counting method and device, electronic equipment and storage medium
CN111476685B (en) Behavior analysis method, device and equipment
Kwon et al. Toward an online continual learning architecture for intrusion detection of video surveillance
CN111400550A (en) Target motion trajectory construction method and device and computer storage medium
Liu et al. Video content analysis for compliance audit in finance and security industry
CN109783663B (en) Archiving method and device
CN113468284A (en) Object detection method and device, electronic equipment and storage medium
CN112560711A (en) Method, system, device and storage medium for judging traffic violation of non-motor vehicle
US20190370531A1 (en) Data processing apparatus, data processing method, and non-transitory storage medium
Liu et al. Automated player identification and indexing using two-stage deep learning network
CN114359543A (en) Object detection method and device, electronic equipment and storage medium
CN114817607A (en) Image detection method, device, equipment and storage medium
CN112270257A (en) Motion trajectory determination method and device and computer readable storage medium
Wang Event-driven traffic ticketing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant