CN115294600A - Method, system, electronic device and storage medium for pedestrian clothing color identification - Google Patents

Method, system, electronic device and storage medium for pedestrian clothing color identification Download PDF

Info

Publication number
CN115294600A
CN115294600A CN202210768732.XA CN202210768732A CN115294600A CN 115294600 A CN115294600 A CN 115294600A CN 202210768732 A CN202210768732 A CN 202210768732A CN 115294600 A CN115294600 A CN 115294600A
Authority
CN
China
Prior art keywords
image
label
trousers
color
pedestrian
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.)
Pending
Application number
CN202210768732.XA
Other languages
Chinese (zh)
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.)
Wuhan Zhongzhi Digital Technology Co ltd
Original Assignee
Wuhan Zhongzhi Digital Technology 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 Wuhan Zhongzhi Digital Technology Co ltd filed Critical Wuhan Zhongzhi Digital Technology Co ltd
Priority to CN202210768732.XA priority Critical patent/CN115294600A/en
Publication of CN115294600A publication Critical patent/CN115294600A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a method, a system, an electronic device and a storage medium for identifying colors of clothes of pedestrians, comprising the following steps: acquiring a pedestrian image from a training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image; performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image; inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result. The usability of pedestrian dressing color identification is improved; the identification of pedestrian shielding and false detection is increased, and the reliability of pedestrian dressing color identification is improved.

Description

Method, system, electronic device and storage medium for pedestrian clothing color identification
Technical Field
The present application relates to the field of color recognition, and in particular, to a method, a system, an electronic device, and a storage medium for recognizing a color of a pedestrian garment.
Background
Due to the wide application of video monitoring in security and protection in various places, the fine identification of pedestrians is particularly important. Pedestrian clothing color is an important attribute in monitoring systems, and is also the most prominent feature of appearance for pedestrians. The pedestrian clothing color identification aims at identifying the colors of the coat and trousers of the pedestrian in the video or image, and the accurate color identification can greatly improve the efficiency of finding the pedestrian.
The existing pedestrian clothing color identification method based on deep learning can generally obtain higher accuracy than the traditional identification method. However, the existing methods are all multi-classification methods, the identification result is a specific certain color, the method has a good effect on the upper and lower body clothes with pure colors, and the method is not applicable to the condition that the upper body or the lower body is mixed with colors. In addition, the existing deep learning pedestrian color identification method cannot overcome the condition that the pedestrian is shielded or misdetected in the pedestrian image, and when the pedestrian is shielded or misdetected, the identified color is the color of a shielding object or a misdetected object, so that the reliability of clothes color identification and retrieval is greatly reduced.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method, a system, electronic equipment and a storage medium for identifying colors of clothes worn by pedestrians, and the color multi-label model is adopted to overcome the problem that a common color multi-classification model has a good pure color classification effect but cannot handle the mixed color condition, so that the usability of identifying colors of clothes worn by pedestrians is improved; the identification of pedestrian shielding and false detection is increased, and the reliability of pedestrian dressing color identification is improved.
In a first aspect, there is provided a method of pedestrian clothing color identification, the method comprising:
acquiring a pedestrian image from a training image through a preset training algorithm;
dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image;
inputting the label coat image and the label trousers image into a preset convolution neural network to obtain color characteristics;
and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
In one possible implementation, the inputting the labeled jacket image and the labeled trousers image into a preset convolutional neural network to obtain the color characteristics includes:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and the adjusted label trousers image to obtain color features;
the resnet18 model is trained by a back-propagation algorithm with the average two-class cross entropy loss of the labels as the target loss function, and the training is done when the loss is no longer reduced.
In another possible implementation manner, the inputting the image to be recognized into the convolutional neural network trained by the color feature to obtain the result of color recognition includes:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and adopting a logistic regression binary classification algorithm to activate a function through sigmoid
Figure BDA0003723108890000021
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, comprising: and if the probability value is greater than a preset probability value threshold, the identification result is a label corresponding to the probability value.
In another possible implementation, two-class cross entropy is employedWhen the convolutional neural network is trained by loss, the loss function of a single sample is as follows: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure BDA0003723108890000022
m is the number of samples.
In a second aspect, there is provided a system for pedestrian clothing color identification, the system comprising:
the pedestrian image acquisition module is used for acquiring a pedestrian image from the training image through a preset training algorithm;
an image dividing module for dividing the pedestrian image into a jacket image and a trousers image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
the label labeling module is used for performing color label labeling on the coat image and the trousers image to obtain a labeled coat image and a labeled trousers image;
the color feature acquisition module is used for inputting the label jacket image and the label trousers image into a preset convolutional neural network to acquire color features;
and the color recognition result acquisition module is used for inputting the image to be recognized into the convolutional neural network trained by the color characteristics to acquire a color recognition result.
In one possible implementation, the inputting the labeled jacket image and the labeled trousers image into a preset convolutional neural network to obtain the color characteristics includes:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and label trousers image to obtain color features;
training the resnet18 model with the average two-class cross entropy loss of the labels as the target loss function through a back propagation algorithm, and completing the training when the loss is not reduced any more.
In another possible implementation manner, the inputting the image to be recognized into the convolutional neural network trained by the color feature to obtain the result of color recognition includes:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and adopting a logistic regression binary classification algorithm to activate a function through sigmoid
Figure BDA0003723108890000031
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, comprising: and if the probability value is larger than a preset probability value threshold, the identified result is a label corresponding to the probability value.
In another possible implementation, when the convolutional neural network is trained by using two-class cross entropy loss, the loss function of a single sample is: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure BDA0003723108890000041
m is the number of samples.
In a third aspect, an electronic device is provided, which includes a memory, a processor and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method for identifying the color of the pedestrian clothing provided in the first aspect is implemented.
In a fourth aspect, a non-transitory computer readable storage medium is provided, on which a computer program is stored, which computer program, when executed by a processor, implements the method of pedestrian clothing color identification as provided in the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a flow chart of a method for pedestrian clothing color identification according to one embodiment of the present invention;
FIG. 2 is a block diagram of a system for pedestrian clothing color identification according to one embodiment of the present invention;
fig. 3 is a schematic physical structure diagram of an electronic device according to the present invention.
Detailed description of the invention
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar modules or modules having the same or similar functionality throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, modules, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, modules, components, and/or groups thereof. It will be understood that when a module is referred to as being "connected" or "coupled" to another module, it can be directly connected or coupled to the other module or intervening modules may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any module and all combinations of one or more of the associated listed items.
To make the objectives, technical solutions and advantages of the present application more clear, the following detailed description of the implementations of the present application will be made with reference to the accompanying drawings.
The technical solutions of the present application and the technical solutions of the present application, for example, and solving the above technical problems, will be described in detail with specific examples below. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for identifying colors of clothing of a pedestrian according to an embodiment of the present invention, the method including:
101, acquiring a pedestrian image from a training image through a preset training algorithm;
step 102, dividing the pedestrian image into a jacket image and a trousers image in the height direction, wherein the jacket image comprises: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
103, labeling color labels on the jacket image and the trousers image to obtain a labeled jacket image and a labeled trousers image;
step 104, inputting the label coat image and the label trousers image into a preset convolutional neural network to obtain color characteristics;
and 105, inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
In the embodiment of the invention, each frame of image in the monitoring video under different scenes and time is obtained to be the training image, the yolov5 algorithm is adopted to detect the training image, the deepsort tracking algorithm is utilized to track and snapshot in combination with the detection result, and the snapshot pedestrian detection result is collected and stored. And ensuring that the collected pedestrian detection images comprise non-blocking pedestrian detection images, blocking pedestrian detection images and false-detection pedestrian images.
And for the pedestrian image, dividing the image into a jacket image area and a trousers image area in the height direction, wherein the jacket area is the height position where the height from the upper edge of the image to the whole image accounts for 0.4, the trousers area is the height position where the height from the lower edge of the image to the upper part accounts for 0.45 of the whole image height, and the blocked image and the erroneously detected jacket and trousers image are also intercepted in the same way.
And for the intercepted jacket image and the intercepted trousers image, dividing the jacket image and the intercepted trousers image into 11 types of labels according to 10 colors of black, gray, white, red, orange, yellow, green, cyan, blue and purple and shielding or false detection, and sequentially carrying out multi-label labeling on all the intercepted jacket image and trousers image. If the color or the occlusion or the false detection exists in the intercepted image, the corresponding label is marked as 1, otherwise, the corresponding label is marked as 0.
Wherein, the inputting the label jacket image and the label trousers image into a preset convolution neural network to obtain the color characteristics comprises:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and the adjusted label trousers image to obtain color features;
training the resnet18 model with the average two-class cross entropy loss of the labels as the target loss function through a back propagation algorithm, and completing the training when the loss is not reduced any more.
The inputting the image to be recognized into the convolutional neural network trained by the color features to obtain the result of color recognition, including:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and adopting a logistic regression binary classification algorithm to activate a function through sigmoid
Figure BDA0003723108890000061
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, comprising: and if the probability value is greater than a preset probability value threshold, the identification result is a label corresponding to the probability value.
When the convolutional neural network is trained by adopting the two-classification cross entropy loss, the loss function of a single sample is as follows: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure BDA0003723108890000062
m is the number of samples.
According to the embodiment of the invention, the pedestrian image is obtained from the training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a trousers image in the height direction; performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image; inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result. The color multi-label model is adopted to overcome the problem that a common color multi-classification model has good pure color classification effect but cannot process the mixed color condition, and the usability of pedestrian dressing color identification is improved; the identification of pedestrian shielding and false detection is increased, and the reliability of pedestrian dressing color identification is improved.
As shown in fig. 2, an embodiment of the present invention provides a system for pedestrian clothing color identification, the system comprising:
a pedestrian image obtaining module 201, configured to obtain a pedestrian image from a training image through a preset training algorithm;
an image dividing module 202, configured to divide the pedestrian image into a jacket image and a trousers image in a height direction, where the jacket image includes: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
the label labeling module 203 is used for performing color label labeling on the jacket image and the trousers image to obtain a labeled jacket image and a labeled trousers image;
a color feature obtaining module 204, configured to input the labeled jacket image and the labeled trousers image into a preset convolutional neural network, so as to obtain a color feature;
the color recognition result obtaining module 205 is configured to input the image to be recognized into the convolutional neural network trained by the color feature, and obtain a color recognition result.
In the embodiment of the invention, each frame of image in the monitoring video under different scenes and time is obtained as the training image, the yolov5 algorithm is adopted to detect the training image, the deepsort tracking algorithm is utilized to track and snapshot by combining the detection result, and the snapshot pedestrian detection result is collected and stored. And ensuring that the collected pedestrian detection images comprise non-blocking pedestrian detection images, blocking pedestrian detection images and false-detection pedestrian images.
For the pedestrian image, the image is divided into a jacket image area and a trousers image area in the height direction, wherein the jacket area is a height position where the height of the upper edge of the image to the whole image accounts for 0.4, the trousers area is a height position where the height of the lower edge of the image from the lower edge upwards accounts for 0.45 of the whole image height, and the blocked image and the image of the jacket and trousers area which is detected by mistake are also intercepted in the same way.
And for the intercepted jacket image and the intercepted trousers image, dividing the jacket image and the intercepted trousers image into 11 types of labels according to 10 colors of black, gray, white, red, orange, yellow, green, cyan, blue and purple and shielding or false detection, and sequentially carrying out multi-label labeling on all the intercepted jacket image and trousers image. If the color or the occlusion or the false detection exists in the intercepted image, the corresponding label is marked as 1, otherwise, the corresponding label is marked as 0.
Wherein, the inputting the label jacket image and the label trousers image into a preset convolution neural network to obtain the color characteristics comprises:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and the adjusted label trousers image to obtain color features;
training the resnet18 model with the average two-class cross entropy loss of the labels as the target loss function through a back propagation algorithm, and completing the training when the loss is not reduced any more.
Wherein, the inputting the image to be recognized into the convolutional neural network trained by the color features to obtain the result of color recognition, which comprises:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and adopting a logistic regression binary classification algorithm to activate a function through sigmoid
Figure BDA0003723108890000081
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, including: and if the probability value is larger than a preset probability value threshold, the identified result is a label corresponding to the probability value.
When the convolutional neural network is trained by adopting two-classification cross entropy loss, the loss function of a single sample is as follows: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure BDA0003723108890000082
m is the number of samples.
According to the embodiment of the invention, the pedestrian image is obtained from the training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a trousers image in the height direction; labeling the color labels on the coat image and the trousers image to obtain a labeled coat image and a labeled trousers image; inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result. The color multi-label model is adopted to overcome the problem that a common color multi-classification model has good pure color classification effect but cannot process the mixed color condition, and the usability of pedestrian dressing color identification is improved; the identification of pedestrian shielding and false detection is increased, and the reliability of pedestrian dressing color identification is improved.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor) 301, a communication Interface (communication Interface) 302, a memory (memory) 303 and a communication bus 304, wherein the processor, the communication Interface and the memory complete communication with each other through the communication bus. The processor may invoke logic instructions in the memory to perform a method of pedestrian clothing color identification, the method comprising: acquiring a pedestrian image from a training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image; performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image; inputting the label coat image and the label trousers image into a preset convolution neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, embodiments of the present invention also provide a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the method for identifying colors of pedestrian clothing provided by the above method embodiments, the method includes: acquiring a pedestrian image from a training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image; performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image; inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
In yet another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the method for identifying colors of pedestrian clothing provided by the above embodiments, the method including: acquiring a pedestrian image from a training image through a preset training algorithm; dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image; labeling the color labels on the coat image and the trousers image to obtain a labeled coat image and a labeled trousers image; inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics; and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The above description is only a partial implementation of the present invention, and it should be noted that, for those skilled in the art, a plurality of modifications and embellishments can be made without departing from the principle of the present invention, and these modifications and embellishments should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of pedestrian clothing color identification, the method comprising:
acquiring a pedestrian image from a training image through a preset training algorithm;
dividing the pedestrian image into a jacket image and a pants image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
performing color label labeling on the coat image and the trousers image to obtain a label coat image and a label trousers image;
inputting the label jacket image and the label trousers image into a preset convolutional neural network to obtain color characteristics;
and inputting the image to be recognized into the convolutional neural network trained by the color characteristics to obtain a color recognition result.
2. The method of claim 1, wherein said inputting said labeled jacket image and said labeled pants image into a predetermined convolutional neural network to obtain color features comprises:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and label trousers image to obtain color features;
training the resnet18 model with the average two-class cross entropy loss of the labels as the target loss function through a back propagation algorithm, and completing the training when the loss is not reduced any more.
3. The method as claimed in claim 1, wherein the inputting the image to be recognized into the convolutional neural network trained by the color features to obtain the result of color recognition comprises:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and performing sigmoid activation function by adopting a logistic regression binary classification algorithm
Figure FDA0003723108880000011
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, including: and if the probability value is larger than a preset probability value threshold, the identified result is a label corresponding to the probability value.
4. The method of claim 3, wherein when the convolutional neural network is trained using two-class cross entropy loss, the loss function for a single sample is: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure FDA0003723108880000021
m is the number of samples.
5. A system for pedestrian clothing color identification, the system comprising:
the pedestrian image acquisition module is used for acquiring a pedestrian image from the training image through a preset training algorithm;
an image dividing module for dividing the pedestrian image into a jacket image and a trousers image in a height direction, the jacket image including: the image of the coat and the image of the normal coat are shielded and mistakenly detected, and the image of the trousers comprises: shielding and false detecting the trousers image and the normal trousers image;
the label labeling module is used for performing color label labeling on the coat image and the trousers image to obtain a labeled coat image and a labeled trousers image;
the color feature acquisition module is used for inputting the label jacket image and the label trousers image into a preset convolutional neural network to acquire color features;
and the color recognition result acquisition module is used for inputting the image to be recognized into the convolutional neural network trained by the color characteristics to acquire a color recognition result.
6. The system of claim 5, wherein said inputting said labeled jacket image and said labeled pants image into a predetermined convolutional neural network to obtain color features comprises:
adjusting the label coat image and the label trousers image to preset standard sizes;
constructing a convolutional neural network resnet18 model through a pyrrch framework to perform feature extraction on the adjusted label coat image and the adjusted label trousers image to obtain color features;
the resnet18 model is trained by a back-propagation algorithm with the average two-class cross entropy loss of the labels as the target loss function, and the training is done when the loss is no longer reduced.
7. The system of claim 5, wherein the inputting the image to be recognized into the convolutional neural network trained by the color features to obtain the result of color recognition comprises:
adjusting the image to be recognized to a preset standard size;
inputting the adjusted image to be recognized into a trained convolutional neural network, and adopting a logistic regression binary classification algorithm to activate a function through sigmoid
Figure FDA0003723108880000022
Obtaining probability values for different tags, the tags comprising: color, occlusion status, or false detection status;
determining a label according to the probability value, comprising: and if the probability value is larger than a preset probability value threshold, the identified result is a label corresponding to the probability value.
8. The system of claim 7, wherein when the convolutional neural network is trained using two-class cross entropy loss, the loss function for a single sample is: loss i =-y i log(h(x))-(1-y i ) log (1-h (x)), h (x) is sigmoid activation function, y i Is the label, and the value is 0 or 1; for a plurality of samples, the loss function is the average loss of the plurality of samples:
Figure FDA0003723108880000031
m isThe number of samples.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of pedestrian clothing color identification as claimed in any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method of pedestrian clothing color identification according to any one of claims 1 to 4.
CN202210768732.XA 2022-06-30 2022-06-30 Method, system, electronic device and storage medium for pedestrian clothing color identification Pending CN115294600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210768732.XA CN115294600A (en) 2022-06-30 2022-06-30 Method, system, electronic device and storage medium for pedestrian clothing color identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210768732.XA CN115294600A (en) 2022-06-30 2022-06-30 Method, system, electronic device and storage medium for pedestrian clothing color identification

Publications (1)

Publication Number Publication Date
CN115294600A true CN115294600A (en) 2022-11-04

Family

ID=83822431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210768732.XA Pending CN115294600A (en) 2022-06-30 2022-06-30 Method, system, electronic device and storage medium for pedestrian clothing color identification

Country Status (1)

Country Link
CN (1) CN115294600A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984680A (en) * 2023-02-15 2023-04-18 博奥生物集团有限公司 Identification method and device for can printing colors, storage medium and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984680A (en) * 2023-02-15 2023-04-18 博奥生物集团有限公司 Identification method and device for can printing colors, storage medium and equipment

Similar Documents

Publication Publication Date Title
Zhou et al. Multi-label learning of part detectors for heavily occluded pedestrian detection
Bedagkar-Gala et al. A survey of approaches and trends in person re-identification
Sheikh et al. Traffic sign detection and classification using colour feature and neural network
US9098775B2 (en) Multi-class identifier, method, and computer-readable recording medium
CN105184818B (en) A kind of video monitoring anomaly detection method and its detecting system
KR20180049298A (en) System and method for recognizing information from vehicle license plate
CN112381775A (en) Image tampering detection method, terminal device and storage medium
Jain et al. Pixel objectness
KR20020093092A (en) Classification of objects through model ensembles
Kontschieder et al. Context-sensitive decision forests for object detection
Chuang et al. Recognizing live fish species by hierarchical partial classification based on the exponential benefit
CN111814690B (en) Target re-identification method, device and computer readable storage medium
CN111401278A (en) Helmet identification method and device, electronic equipment and storage medium
CN103049749A (en) Method for re-recognizing human body under grid shielding
Mannan et al. Classification of degraded traffic signs using flexible mixture model and transfer learning
CN115294600A (en) Method, system, electronic device and storage medium for pedestrian clothing color identification
Ghosh et al. Reliable pedestrian detection using a deep neural network trained on pedestrian counts
Cholakkal et al. A classifier-guided approach for top-down salient object detection
Julca-Aguilar et al. Text/non-text classification of connected components in document images
AU2017279658A1 (en) Pose-aligned descriptor for person re-id with geometric and orientation information
KR101419837B1 (en) Method and apparatus for adaboost-based object detection using partitioned image cells
CN103077376B (en) Method for distinguishing is known again based on the human body image in video image
CN116109864A (en) Garment detection and identification method, device, terminal and computer readable storage medium
Patravali et al. Skin segmentation using YCBCR and RGB color models
CN112395990B (en) Method, device, equipment and storage medium for detecting weak and small targets of multi-frame infrared images

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