Pedestrian attribute warning method, system and device based on video stream and medium

By detecting and identifying pedestrians in the video stream, using the pre-trained pedestrian attribute classification model to obtain pedestrian attributes, and combining cumulative frame counts and manual prior knowledge to alarm, the problem of low accuracy of pedestrian attribute alarm in the existing technology is solved, and higher accuracy and robustness are achieved.

CN119832588APending Publication Date: 2025-04-15CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411756325.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The methods used in the prior art to obtain pedestrian attributes are easily affected by factors such as pedestrian clarity, angle and frame count, resulting in low accuracy of pedestrian attribute alarms.

Method used

By obtaining the current frame in the video stream, detecting and identifying pedestrians, extracting the pedestrian images and inputting them into the pre-trained pedestrian attribute classification model, obtaining appearance attributes and uncertain attributes. Based on the cumulative frame count and manual prior knowledge, the final pedestrian attribute is determined and the alarm is issued.

Benefits of technology

It improves the accuracy and robustness of pedestrian attribute alarms, reduces error results caused by problems such as fuzzy and angle, and enhances the ability to identify pedestrian attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832588A_ABST
    Figure CN119832588A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and discloses a pedestrian attribute warning method, system and device based on a video stream and a medium, and the method comprises the steps: obtaining a current frame in the video stream; detecting all pedestrians in the current frame; extracting an image of each pedestrian from the current frame, and inputting the image of each pedestrian into a pedestrian attribute classification model to obtain an appearance attribute set and an uncertain attribute set of each pedestrian; according to the appearance attribute set of the target pedestrian, determining the cumulative occurrence frequency of each appearance attribute; and when the accumulated frame number of the target identifier reaches a threshold value, for each class of appearance attributes corresponding to the target identifier, taking the appearance attribute with the highest accumulated occurrence frequency in the class of appearance attributes as the final class of appearance attributes of the target pedestrian, and giving an alarm according to the final class of appearance attributes. According to the method, the pedestrian attribute accuracy and robustness of the alarm are improved through the modes of appearance attribute frequency accumulation, artificial priori knowledge, uncertain attribute addition and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a pedestrian attribute warning method, system, equipment and medium based on video stream. Background Art

[0002] In monitoring and security scenarios such as smart parks and smart cities, a series of violation events are usually set up, such as illegal parking of vehicles, pedestrians entering by mistake, pedestrians smoking, etc.

[0003] In the related technology, the attributes of the person responsible for the violation are obtained in order to quickly find the corresponding person responsible for the violation. At present, the following two methods are mainly used to obtain the attributes of the person responsible for the violation: First, when a violation occurs, an alarm is immediately issued, and the attributes of the pedestrians in the current alarm frame are used as the attributes of the person responsible for the violation. However, the accuracy of the pedestrian attributes obtained by this method is low and is easily affected by factors such as the clarity and angle of the pedestrians in the current frame. Second, a voting method is adopted to vote on the results of consecutive frames of the same pedestrian, and the attributes with the most occurrences are taken as the attributes of the pedestrians in the current alarm. However, this method may be affected by the clarity and angle of pedestrians in certain frames and produce erroneous results, and is also easily affected by the number of frames. Summary of the invention

[0004] In view of this, the present invention provides a pedestrian attribute warning method, system, device and medium based on video stream to solve the problem that the two methods used in the related art are easily affected by factors such as the clarity, angle and frame number of the pedestrian in the current frame, resulting in low accuracy of the pedestrian attributes in the final warning.

[0005] In a first aspect, the present invention provides a pedestrian attribute warning method based on a video stream, the method comprising:

[0006] Get the current frame in the video stream;

[0007] Detect all pedestrians in the current frame and assign a unique identifier to each pedestrian;

[0008] Extract the image of each pedestrian from the current frame, input each pedestrian's image into the pre-trained pedestrian attribute classification model, and obtain the appearance attribute set and uncertain attribute set of each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian whose image is blurred or the angle is tricky and cannot be recognized;

[0009] According to the appearance attribute set of the target pedestrian, determine the cumulative number of occurrences of each appearance attribute corresponding to the target identification of the target pedestrian;

[0010] The cumulative number of occurrences of the appearance attribute is the number of reference frames that meet the first condition in multiple reference frames, the first condition being: a target pedestrian with a target identifier and the appearance attribute appears in a reference frame, and the reference frame is one of the following: a current frame, a frame before the current frame in a video stream;

[0011] When the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, the appearance attribute with the largest cumulative occurrence in the type of appearance attributes is used as the final type of appearance attribute of the target pedestrian, and the target pedestrian is warned with the final type of appearance attribute;

[0012] The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

[0013] In an optional implementation, before alerting the target pedestrian with the final class appearance attribute, the method further includes:

[0014] Artificial prior knowledge is used to identify the logical relationship between each type of appearance attributes;

[0015] According to the logical relationship between each type of appearance attributes, updating the final type of appearance attributes;

[0016] The updated final class appearance attributes are used to warn the target pedestrian.

[0017] In an optional implementation, the pre-trained pedestrian attribute classification model is determined based on a sample data set and a pedestrian attribute classification model;

[0018] The pedestrian attribute classification model is determined based on a CNN network;

[0019] The sample data set is determined based on an uncertain attribute set and different types of appearance attribute sets.

[0020] In an optional implementation, the threshold is 50 frames.

[0021] In a second aspect, the present invention provides a pedestrian attribute warning system based on video stream, the system comprising:

[0022] An image frame acquisition module is used to acquire the current frame in the video stream;

[0023] Pedestrian detection module, used to detect all pedestrians in the current frame and assign a unique identifier to each pedestrian;

[0024] The attribute acquisition module is used to extract the image of each pedestrian from the current frame, and input each pedestrian's image into the pre-trained pedestrian attribute classification model to obtain the appearance attribute set and uncertain attribute set of each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian whose image is blurred or the angle is tricky and cannot be identified;

[0025] The cumulative number determination module is used to determine the cumulative number of appearance attributes corresponding to the target identification of the target pedestrian according to the set of appearance attributes of the target pedestrian; wherein the cumulative number of appearance attributes is the number of reference frames that meet the first condition in multiple reference frames, and the first condition is: the target pedestrian with the target identification and the appearance attribute appears in the reference frame, and the reference frame is one of the following: the current frame, and the frame before the current frame in the video stream;

[0026] A pedestrian warning module, for when the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, the appearance attribute with the largest cumulative number of appearance attributes is used as the final type appearance attribute of the target pedestrian, and the target pedestrian is warned with the final type appearance attribute;

[0027] The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

[0028] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 is a flow chart of a method for warning pedestrian attributes based on video stream according to an embodiment of the present invention;

[0032] Figure 2 is a structural block diagram of a pedestrian attribute warning system based on video stream according to an embodiment of the present invention;

[0033] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0035] In monitoring and security scenarios such as smart parks and smart cities, a series of violation events are usually set up, such as illegal parking of vehicles, pedestrians entering by mistake, pedestrians smoking, etc.

[0036] In the related technology, the algorithm model based on neural network training is deployed on the edge box or cloud after engineering, and the real-time stream of the camera is called for detection to detect violations. After the violation is discovered, it is necessary to promptly report the violation and correctly broadcast the attributes of the person responsible for the violation, such as the vehicle license plate, color, model, or the age and gender of the pedestrian who mistakenly enters the restricted area, so as to quickly find the corresponding person responsible for the violation. For example, in the smart park scenario, it is necessary to warn pedestrians who mistakenly enter the designated area. For pedestrians who mistakenly enter, it is necessary to broadcast and drive them away in time. At this time, it is necessary to accurately know the attributes of the pedestrians who need to be driven away. For example: "Middle-aged women wearing hats and masks, please leave the pedestrian restricted area." Here, wearing a hat, wearing a mask, middle-aged, and female are the attributes of pedestrians. Through the combination of multiple attributes, almost the only alarm object can be found.

[0037] Among them, the pedestrian attributes of the main responsible person of the violation event are obtained mainly in the following two ways: First, when a violation event occurs, an alarm is immediately issued, and the pedestrian attributes of the current alarm frame are used as the attributes of the main responsible person of the violation event for alarm. However, the accuracy of pedestrian attributes obtained by this method is low and is easily affected by factors such as the clarity and angle of the pedestrian in the current frame. Second, a voting method is adopted to vote on the consecutive frame results of the same pedestrian, and the attribute with the most occurrences is taken as the pedestrian attribute of the current alarm. However, this method will be affected by the clarity and angle of pedestrians in some frames and produce wrong results, and is also easily affected by the number of frames.

[0038] In view of this, the present invention provides a pedestrian attribute warning method based on video stream, which is applied to various scenarios such as smart parks and smart campuses. The accuracy and robustness of the pedestrian attributes of the warning are improved by accumulating attribute times, artificial prior knowledge, and adding uncertain attributes.

[0039] According to an embodiment of the present invention, a pedestrian attribute warning method based on video stream is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] Figure 1 FIG. 1 is a flow chart of a method for warning pedestrian attributes based on video stream according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0041] Step S101, obtaining the current frame in the video stream.

[0042] The video stream is a media video stream or a real-time stream of a camera. Each frame in the video stream represents an image. The current frame can be represented as the image corresponding to the target frame extracted at the current moment.

[0043] Step S102: Detect all pedestrians in the current frame and assign a unique identifier to each pedestrian.

[0044] Specifically, the unique identifier may be track id, which is the tracking sequence number of all pedestrians in the current frame and may be sorted starting from 0.

[0045] In some optional implementations, the tracking numbers of all pedestrians in the current frame may be assigned a track id to each pedestrian using the DeepStream tracking algorithm.

[0046] Step S103, extracting the image of each pedestrian from the current frame, and inputting the image of each pedestrian into a pre-trained pedestrian attribute classification model, respectively, to obtain a set of appearance attributes and a set of uncertain attributes for each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian when the image is blurred or the angle is tricky and the image cannot be identified.

[0047] The pre-training may mean that the pre-training of the pedestrian attribute classification model is completed before the first execution of step S103.

[0048] In addition, the pedestrian attribute classification model may also be pre-trained and fine-tuned. Fine-tuned may mean that the pedestrian attribute classification model is fine-tuned before the first execution of step S103.

[0049] In some optional implementations, the DeepStream framework can be used to deploy a pedestrian detection + pedestrian attribute recognition service. After assigning a track id to each pedestrian, the image of each pedestrian is extracted from the current frame and sent to a pre-trained pedestrian attribute classification model for pedestrian attribute recognition.

[0050] DeepStream is a streaming analysis toolkit for building AI-driven applications. It mainly takes streaming data as input, which can be from USB or CSI cameras, videos from files, or streams based on real-time streaming, and outputs streaming results. The main function of DeepStream is to perform video stream analysis, which can provide functions such as target tracking and target detection.

[0051] As an example, the image of each pedestrian may be an image of the pedestrian bounded by a target box, or an image of the pedestrian bounded by a stroked outline of the pedestrian.

[0052] In step S103, the appearance attributes may include: gender, whether wearing glasses, hair length, face position, whether wearing a helmet, whether smoking, whether making a phone call, whether wearing a hat, whether wearing a mask, whether having a beard, the age of the pedestrian, whether smiling, etc.

[0053] Step S104, determining the cumulative number of occurrences of each appearance attribute corresponding to the target identification of the target pedestrian according to the appearance attribute set of the target pedestrian;

[0054] Among them, the cumulative number of occurrences of appearance attributes is the number of reference frames that meet the first condition in multiple reference frames, and the first condition is: a target pedestrian with target identification and appearance attributes appears in the reference frame, and the reference frame is one of the following: the current frame, and the frame before the current frame in the video stream.

[0055] It should be noted that the cumulative number of occurrences of each uncertain attribute ("unsure" attribute) corresponding to the target pedestrian's target identification is not included in the statistics. Only the cumulative number of occurrences of each appearance attribute corresponding to the target pedestrian's target identification needs to be counted.

[0056] Step S105, when the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, the appearance attribute with the largest cumulative occurrence in each type of appearance attribute is used as the final type of appearance attribute of the target pedestrian, and the target pedestrian is warned with the final type of appearance attribute.

[0057] The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

[0058] In some optional implementations, a cache space is applied for each track id to cache each appearance attribute of each track id and the cumulative number of occurrences of the corresponding appearance attribute, and after caching the appearance attributes of a track id and the cumulative number of occurrences of the corresponding appearance attributes, the cumulative number of occurrences of the corresponding appearance attributes in the cache are continuously updated by accumulation.

[0059] As an example, assume that the total number of frames before the current frame in the video stream is 78 frames. In these 78 frames, the target pedestrian with track id 235 has appeared 78 times. In these 78 times, the target pedestrian's "gender" attribute is detected, and 68 frames are identified as male, and 10 frames are identified as female, which can be expressed as "[Male: 68, Female: 10]". Assuming that in the current frame, the recognition result is female, the appearance attribute in the cache with track id 235 and the cumulative number of appearances become "[Male: 68, Female: 11]". Similarly, other appearance attributes are accumulated in this way.

[0060] Assume that the threshold of the alarm condition is 80 frames, and the appearance attributes and cumulative appearance times in the cache of track id 235 corresponding to the current frame become "[Male: 82, Female: 11]". At this time, the cumulative appearance times of the target pedestrian with track id 235 up to the current frame are 80 times, which meets the alarm condition. At this time, when the alarm is issued for the "gender" attribute of the target pedestrian with track id 235, "Male" is used as the final appearance attribute for the alarm. Similarly, other appearance attributes are all alarmed in this way.

[0061] The embodiment of the present invention eliminates erroneous attribute results caused by various accidental factors such as pedestrian angle and pedestrian quality through the method of cumulative counting of appearance attributes, reduces the randomness of the results, and increases the accuracy of the results; and, excludes uncertain attributes from statistics, which can reduce erroneous results caused by certain accidental factors and further improve the accuracy and robustness of the alarm.

[0062] In some optional implementations, before alerting the target pedestrian with the final class appearance attribute, the pedestrian attribute alerting method based on the video stream further includes:

[0063] Artificial prior knowledge is used to identify the logical relationship between each type of appearance attributes;

[0064] According to the logical relationship between each type of appearance attributes, update the final type of appearance attributes;

[0065] The updated final class appearance attributes are used to warn the target pedestrian.

[0066] As an example, assuming that the threshold of the alarm condition is still 80 frames, when the cumulative number of appearances of the target pedestrian with track ID 235 reaches 80 times, the "gender" attribute in the track ID cache and the cumulative number of appearances are "[male: 18, female: 62]". At this time, the alarm will not be issued according to female as the final "gender" attribute. Before this, some logical relationships between each type of appearance attributes need to be set in advance based on artificial prior knowledge, such as: women must not have beards, men must have short hair, etc. When the "Whether has a beard" attribute in the track id cache and the cumulative number of occurrences are found to be "[With beard: 50, Without beard: 30]", based on logical relationships such as "Women must not have beards", if "Women" is used as the reference appearance attribute, then "Without beard" in the "Whether has a beard" attribute will be used as the final appearance attribute alarm. If "With beard" is used as the reference appearance attribute, then "Female" in the "Gender" attribute will be used as the final appearance attribute alarm. At this time, there can be two appearance attributes for the output alarm, "Without beard" and "Female", "With beard" and "Male".

[0067] It should be noted that the logical relationship can be set to multiple, and the appearance attribute of the unique final class can be determined based on the multiple logical relationships to issue an alarm.

[0068] The embodiment of the present invention further reduces the erroneous results of the pedestrian attribute classification model caused by some external reasons through some artificial prior knowledge.

[0069] In some optional implementations, the pre-trained pedestrian attribute classification model is determined based on the sample data set and the pedestrian attribute classification model;

[0070] The pedestrian attribute classification model is determined based on the CNN network;

[0071] The sample data set is determined based on the uncertain attribute set and different types of appearance attribute sets.

[0072] In some optional implementations, the sample data set can be collected through a large amount of open source pedestrian attribute data, or it can be manually labeled according to some business attributes or sent to a labeling company for labeling, ensuring that each type of appearance attribute has at least 50,000+ training data, and each type of appearance attribute must include an uncertain attribute.

[0073] The pedestrian attribute classification model can use CNN networks such as resnet to train a multi-task pedestrian attribute network. Through continuous iterative optimization, the accuracy of each type of appearance attribute on the verification machine is guaranteed to exceed 95%.

[0074] In some optional implementations, the threshold is 50 frames.

[0075] The embodiment of the present invention reduces the influence of human attributes caused by blur and angle problems on the final result by counting the cumulative number of appearance attributes, adding uncertain attributes and artificial prior knowledge, and further improves the accuracy of the pedestrian attribute classification model.

[0076] As an example, before the track id reaches the alarm condition, the results of N frames have been accumulated, preferably N is 50. Through the accumulated results of N frames, the appearance attributes of a track id can be determined. In the real data and the corresponding annotations, this method is compared with the traditional method, and the accuracy rate is increased from 85% to 95%.

[0077] In this embodiment, a pedestrian attribute warning system based on video stream is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0078] This embodiment provides a pedestrian attribute warning system based on video stream, such as Figure 2 As shown, including:

[0079] The image frame acquisition module 201 is used to acquire the current frame in the video stream;

[0080] A pedestrian detection module 202 is used to detect all pedestrians in the current frame and assign a unique identifier to each pedestrian;

[0081] The attribute acquisition module 203 is used to extract the image of each pedestrian from the current frame, and input the image of each pedestrian into the pre-trained pedestrian attribute classification model to obtain the appearance attribute set and the uncertain attribute set of each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian whose image is blurred or the angle is tricky and cannot be recognized;

[0082] The cumulative number determination module 204 is used to determine the cumulative number of appearance attributes corresponding to the target identification of the target pedestrian according to the set of appearance attributes of the target pedestrian; wherein the cumulative number of appearance attributes is the number of reference frames that meet the first condition in multiple reference frames, and the first condition is: the target pedestrian with the target identification and the appearance attribute appears in the reference frame, and the reference frame is one of the following: the current frame, and the frame before the current frame in the video stream;

[0083] The pedestrian warning module 205 is used for, when the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, taking the appearance attribute with the largest cumulative number of appearance attributes as the final type appearance attribute of the target pedestrian, and warning the target pedestrian with the final type appearance attribute;

[0084] The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

[0085] In some optional implementations, a video stream-based pedestrian attribute warning system further includes a final appearance attribute updating module 206 .

[0086] The final class appearance attribute updating module 206 includes:

[0087] The logical relationship determination unit 2061 is used to identify the logical relationship between each type of appearance attributes using artificial prior knowledge.

[0088] an appearance attribute updating unit 2062, for updating the final class appearance attribute according to the logical relationship between each class appearance attribute;

[0089] The warning unit 2063 is used to warn the target pedestrian using the updated final class appearance attributes.

[0090] In some optional implementations, the pre-trained pedestrian attribute classification model is determined based on the sample data set and the pedestrian attribute classification model;

[0091] The pedestrian attribute classification model is determined based on the CNN network;

[0092] The sample data set is determined based on the uncertain attribute set and different types of appearance attribute sets.

[0093] In some optional implementations, the threshold is 50 frames.

[0094] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0095] In this embodiment, a pedestrian attribute warning system based on video stream is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0096] The embodiment of the present invention also provides a computer device having the above Figure 2 The pedestrian attribute warning system based on video stream is shown.

[0097] See also Figure 3 , the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.

[0098] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0099] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0100] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0101] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0102] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0103] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0104] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0105] A portion of the embodiments of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in a computer-readable medium includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which the computer program instructions are executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0106] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A pedestrian attribute warning method based on video stream, characterized in that: The method comprises: Get the current frame in the video stream; Detect all pedestrians in the current frame and assign a unique identifier to each pedestrian; Extract the image of each pedestrian from the current frame, input each pedestrian's image into the pre-trained pedestrian attribute classification model, and obtain the appearance attribute set and uncertain attribute set of each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian whose image is blurred or the angle is tricky and cannot be recognized; According to the appearance attribute set of the target pedestrian, determine the cumulative number of occurrences of each appearance attribute corresponding to the target identification of the target pedestrian; The cumulative number of occurrences of the appearance attribute is the number of reference frames that meet the first condition in multiple reference frames, the first condition being: a target pedestrian with a target identifier and the appearance attribute appears in a reference frame, and the reference frame is one of the following: a current frame, a frame before the current frame in a video stream; When the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, the appearance attribute with the largest cumulative occurrence in the type of appearance attributes is used as the final type of appearance attribute of the target pedestrian, and the target pedestrian is warned with the final type of appearance attribute; The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

2. The method according to claim 1, characterized in that Before warning the target pedestrian with the final class appearance attribute, the method further includes: Artificial prior knowledge is used to identify the logical relationship between each type of appearance attributes; According to the logical relationship between each type of appearance attributes, updating the final type of appearance attributes; The updated final class appearance attributes are used to warn the target pedestrian.

3. The method according to claim 1, characterized in that The pre-trained pedestrian attribute classification model is determined based on the sample data set and the pedestrian attribute classification model; The pedestrian attribute classification model is determined based on a CNN network; The sample data set is determined based on an uncertain attribute set and different types of appearance attribute sets.

4. The method according to claim 1, characterized in that: The threshold is 50 frames.

5. A pedestrian attribute warning system based on video stream, characterized in that: The system comprises: An image frame acquisition module is used to acquire the current frame in the video stream; Pedestrian detection module, used to detect all pedestrians in the current frame and assign a unique identifier to each pedestrian; The attribute acquisition module is used to extract the image of each pedestrian from the current frame, and input each pedestrian's image into the pre-trained pedestrian attribute classification model to obtain the appearance attribute set and uncertain attribute set of each pedestrian; each appearance attribute represents the appearance feature of the pedestrian; each uncertain attribute represents the appearance feature of the pedestrian whose image is blurred or the angle is tricky and cannot be identified; The cumulative number determination module is used to determine the cumulative number of appearance attributes corresponding to the target identification of the target pedestrian according to the set of appearance attributes of the target pedestrian; wherein the cumulative number of appearance attributes is the number of reference frames that meet the first condition in multiple reference frames, and the first condition is: the target pedestrian with the target identification and the appearance attribute appears in the reference frame, and the reference frame is one of the following: the current frame, and the frame before the current frame in the video stream; A pedestrian warning module, for when the cumulative number of frames corresponding to the target identification of the target pedestrian reaches a threshold, for each type of appearance attribute corresponding to the target identification, the appearance attribute with the largest cumulative number of appearance attributes is used as the final type appearance attribute of the target pedestrian, and the target pedestrian is warned with the final type appearance attribute; The accumulated number of frames is the number of reference frames that meet the second condition, and the second condition is that a target pedestrian with a target identifier appears in the reference frame.

6. An electronic device, characterized in that: include: a memory storing computer-readable instructions; A processor reads the computer-readable instructions stored in the memory to execute the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 4.