A work clothing identification method, device, electronic equipment and storage medium

By extracting and matching pedestrians re -identifying the REID characteristics, the problem of re -training models when adding new image categories to the existing technology to increase the convenience and accuracy of work clothing recognition.

CN114565894BActive Publication Date: 2025-01-24CHENGDU JIAHUA CHAIN CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210201849.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2025-01-24
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

In the prior art, in the recognition of work clothing, the model needs to be retrained when adding new image categories, resulting in insufficient convenience.

Method used

By extracting pedestrians in the image to recognize the characteristics of the REID characteristics, and matching the features in the costume characteristics library, it determines the clothing category of the target object to avoid the needs of re -training models.

Benefits of technology

It has improved the convenience of identifying work clothing, reducing the tedious operation of re -training models when increasing the new image category, and enhancing the accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565894B_ABST
    Figure CN114565894B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for identifying work clothes, the method comprising: obtaining an image to be identified, the image to be identified is obtained by photographing a target object; extracting a pedestrian re-identification ReID feature in the image to be identified; judging whether the ReID feature is matched in a work clothes feature library; if so, determining the clothing category of the target object as work clothes. By extracting the pedestrian re-identification ReID feature in the image to be identified, and matching the ReID feature with the feature in the work clothes feature library to determine the clothing category of the target object, the situation that the model needs to be retrained when a new image category is added due to the use of an image classification network model for identification is avoided, and the tedious operation of retraining the model when a new image category is added is reduced, thereby improving the convenience of identifying work clothes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image recognition and machine learning, and in particular to a work clothing recognition method, device, electronic device and storage medium. Background Art

[0002] At present, the process of identifying work clothes is mostly to use an image classification network model to classify work clothes, so as to determine whether the clothing category of the target object is work clothes. The specific process is as follows: first, collect images of existing staff wearing clothes; then, mark all images as two categories, work clothes and non-work clothes, to form an image classification data set; then use the image classification data set to train the image classification network model to obtain a network model for identifying work clothes.

[0003] In the actual practice, it is found that when the work clothes are inconsistent with the original work clothes due to the addition of future franchise stores, it is necessary to repeat the above training process and collect new store training data to retrain the image classification network model in order to maintain a good accuracy rate. Therefore, the current convenience of identifying work clothes is not enough. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a work clothing recognition method, device, electronic device and storage medium, which are used to improve the problem of insufficient convenience in identifying work clothing.

[0005] In the first aspect, the embodiment of the present application provides a method for identifying work clothes, including: obtaining an image to be identified, the image to be identified is obtained by photographing a target object; extracting a pedestrian re-identification ReID feature in the image to be identified; judging whether the ReID feature is matched in a work clothes feature library; if so, determining the clothing category of the target object as work clothes. In the implementation process of the above scheme, the clothing category of the target object is determined by extracting the pedestrian re-identification ReID feature in the image to be identified, and matching the ReID feature with the feature in the work clothes feature library, thereby avoiding the situation where the image classification network model is used for identification, resulting in the need to retrain the model when adding a new image category, reducing the tedious operation of retraining the model when adding a new image category, thereby improving the convenience of identifying work clothes.

[0006] In an optional implementation of the first aspect, after determining whether the ReID feature is matched in the workwear feature library, the method further includes: if the ReID feature is not matched in the workwear feature library, determining the clothing category of the target object as non-work clothing. In the implementation of the above solution, when the ReID feature is not matched in the workwear feature library, it is determined that the clothing is not work clothing, thereby avoiding the situation of misclassifying workwear clothing, thereby improving the accuracy of identifying work clothing.

[0007] In an optional implementation of the first aspect, determining whether a ReID feature is matched in a workwear feature library includes: calculating the similarity between the ReID feature and each feature in the workwear feature library to obtain multiple similarities; determining whether the minimum similarity among the multiple similarities is greater than the similarity threshold of the workwear feature library; if so, determining that the ReID feature is matched, otherwise, determining that the ReID feature is not matched. In the implementation of the above scheme, by determining whether the ReID feature is matched based on whether the minimum similarity among the multiple similarities is greater than the similarity threshold, the situation where the image classification network model is used for identification and the need to retrain the model when adding a new image category is avoided, the tedious operation of retraining the model when adding a new image category is reduced, thereby improving the convenience of identifying work clothes.

[0008] In an optional implementation method of the first aspect, it also includes: obtaining multiple sample images and a label category annotated on each sample image; extracting the ReID feature of each sample image, and calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; when the update condition of the tooling feature library is met, updating the tooling feature library according to the label category annotated on the sample image and the minimum similarity among the multiple similarities.

[0009] In the implementation process of the above scheme, by immediately updating the work clothes feature library according to the label category annotated by the sample image and the minimum similarity among multiple similarities when the update conditions of the work clothes feature library are met, the problem of incorrect recognition of work clothes due to untimely updating of the work clothes feature library is avoided, thereby improving the accuracy of work clothes recognition.

[0010] In an optional implementation of the first aspect, the work clothes feature library is updated according to the label category annotated by the sample image and the minimum similarity among multiple similarities, including: if the label category annotated by the sample image is work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then the sample image corresponding to the minimum similarity and the ReID feature of the sample image are added to the work clothes feature library. In the implementation process of the above scheme, by adding the sample image corresponding to the minimum similarity and the ReID feature of the sample image to the work clothes feature library when the label category annotated by the sample image is work clothes and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, the effect of automatically updating the work clothes feature library is achieved, avoiding the situation where the image classification network model is used for recognition, resulting in the need to retrain the model when a new image category is added, reducing the tedious operation of retraining the model when a new image category is added, thereby improving the convenience of identifying work clothes.

[0011] In an optional implementation of the first aspect, the work clothes feature library is updated according to the label category annotated by the sample image and the minimum similarity among multiple similarities, including: if the label category annotated by the sample image is not work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then the similarity threshold of the work clothes feature library is modified to the minimum similarity. In the implementation process of the above scheme, by modifying the similarity threshold of the work clothes feature library to the minimum similarity when the label category annotated by the sample image is not work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, the problem of incorrect recognition of work clothes due to untimely modification of the similarity threshold of the work clothes feature library is avoided, thereby improving the accuracy of work clothes recognition.

[0012] In an optional implementation of the first aspect, a condition for updating the tooling feature library is that after a batch of sample images among the multiple sample images are feature extracted and processed, the number of images in the batch of sample images is greater than 1.

[0013] In the second aspect, an embodiment of the present application provides a work clothes recognition device, including: a target image acquisition module, used to acquire an image to be recognized, which is obtained by photographing a target object; a ReID feature extraction module, used to extract pedestrian re-identification ReID features in the image to be recognized; a ReID feature judgment module, used to judge whether the ReID feature is matched in a work clothes feature library; a work clothes determination module, used to determine the clothing category of the target object as work clothes if the ReID feature is matched in the work clothes feature library.

[0014] In an optional implementation of the second aspect, the work clothing recognition device further includes: a work clothing negation module, which is used to determine the clothing category of the target object as non-work clothing if no ReID feature is matched in the work clothing feature library.

[0015] In an optional implementation of the second aspect, the ReID feature judgment module includes: a similarity calculation module, which is used to calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; a similarity threshold calculation module, which is used to determine whether the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library; and a ReID feature matching module, which is used to determine that the ReID feature is matched if the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library, otherwise, determine that the ReID feature is not matched.

[0016] In an optional implementation of the second aspect, the work clothes recognition device also includes: an image category acquisition module, used to obtain multiple sample images and a label category annotated on each sample image; a similarity acquisition module, used to extract the ReID feature of each sample image, and calculate the similarity between the ReID feature and each feature in the work clothes feature library to obtain multiple similarities; a feature library update module, used to update the work clothes feature library according to the label category annotated on the sample image and the minimum similarity among the multiple similarities when the update condition of the work clothes feature library is met.

[0017] In an optional implementation of the second aspect, the feature library updating module includes: a ReID feature adding module, which is used to add the sample image corresponding to the minimum similarity and the ReID feature of the sample image to the work clothes feature library if the label category annotated with the sample image is work clothes, and the label category annotated with the sample image is different from the category corresponding to the minimum similarity.

[0018] In an optional implementation of the second aspect, the feature library updating module includes: a similarity threshold modification module, which is used to modify the similarity threshold of the work clothes feature library to the minimum similarity if the label category annotated with the sample image is not work clothes, and the label category annotated with the sample image is different from the category corresponding to the minimum similarity.

[0019] In an optional implementation of the second aspect, a condition for updating the tooling feature library is that after a batch of sample images among the multiple sample images are feature extracted and processed, the number of images in the batch of sample images is greater than 1.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, and the machine-readable instructions performing the method described above when executed by the processor.

[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program executes the method described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A schematic diagram of the flow of a work clothing identification method provided in an embodiment of the present application is shown;

[0024] Figure 2 A schematic diagram of the process of extracting ReID features provided in an embodiment of the present application is shown;

[0025] Figure 3 A schematic diagram of a process for updating a tool feature library provided in an embodiment of the present application is shown;

[0026] Figure 4 A schematic diagram of a process for updating a ReID feature provided in an embodiment of the present application is shown;

[0027] Figure 5 A schematic diagram of the structure of a work clothing identification device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments in the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the embodiments of the present application claimed for protection, but merely represents the selected embodiments in the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the embodiments of the present application.

[0029] It is understandable that the "first" and "second" in the embodiments of the present application are used to distinguish similar objects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit the difference.

[0030] Before introducing the work clothing recognition method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first introduced:

[0031] Person Re-IDentification (ReID), also known as pedestrian re-identification, is a technology that uses computer vision technology to determine whether there is a specific pedestrian in an image or video sequence.

[0032] It should be noted that the work clothing identification method provided in the embodiment of the present application can be executed by an electronic device, where the electronic device refers to a device terminal or server with the function of executing a computer program, such as a smart phone, a personal computer, a tablet computer, a personal digital assistant or a mobile Internet device. A server refers to a device that provides computing services through a network, such as an x86 server and a non-x86 server, and a non-x86 server includes a mainframe, a minicomputer and a UNIX server.

[0033] The following introduces the application scenarios of the work clothing recognition method, which include but are not limited to: using the work clothing recognition method to identify clothing in order to count the attendance of employees, or when new work clothing needs to be counted (for example, when a new store or department is added, new work clothing is customized), the work clothing recognition method can be used to extract the pedestrian re-identification ReID features in the image to be identified, and determine the clothing category of the target object based on the ReID features. This can avoid the situation where the traditional model needs to be retrained when a new image category is added, reducing the workload of data collection, iterative training and deployment.

[0034] See also Figure 1 The flowchart of the work clothing recognition method provided by the embodiment of the present application is shown; the main idea of ​​the work clothing recognition method is to determine the clothing category of the target object by extracting the pedestrian re-identification ReID feature in the image to be recognized, and matching the ReID feature with the feature in the work clothing feature library, avoiding the situation where the image classification network model is used to identify and the need to retrain the model when adding new image categories, reducing the tedious operation of retraining the model when adding new image categories, thereby improving the convenience of identifying work clothes. The above-mentioned work clothing recognition method may specifically include:

[0035] Step S110: Acquire an image to be identified, where the image to be identified is obtained by photographing the target object.

[0036] The target object refers to the target of the captured image, which can be an employee wearing different work clothes or casual clothes, or a passerby or pedestrian. The target object is photographed using image acquisition devices such as a SLR color camera, a black and white camera, a surveillance camera, a camera or a terminal with a camera to obtain the image of the target object to be identified.

[0037] Step S120: extracting pedestrian re-identification (ReID) features from the image to be identified.

[0038] ReID features refer to the global features and local features of the same person in an image, that is, the features that combine global features and local features.

[0039] See also Figure 2 A schematic diagram of the process of extracting ReID features provided in an embodiment of the present application is shown; as an optional implementation of step S120, the process of extracting ReID features may include: using feature extraction models such as residual networks (Residual Network, ResNet), convolutional neural networks (Convolutional Neural Networks, CNN) or recurrent neural networks (Recurrent Neural Network, RNN) to extract global features in the image to be identified, using feature extraction models including image segmentation, skeleton key point positioning and attention mechanism, etc. to extract local features in the image to be identified, and then encoding the global features and local features to generate ReID features, which can be stored in JavaScript Object Notation (JSON) format.

[0040] Step S130: Determine whether a ReID feature is matched in the tooling feature library.

[0041] Step S140: If the ReID feature is matched in the workwear feature library, the clothing category of the target object is determined to be work clothing.

[0042] As an optional implementation of the above method, after step S130, the following may also be included:

[0043] Step S150: If no ReID feature is matched in the workwear feature library, the clothing category of the target object is determined to be non-work clothing.

[0044] In the implementation process of the above scheme, the clothing category of the target object is determined by extracting the pedestrian re-identification ReID feature in the image to be identified and matching the ReID feature with the feature in the work clothes feature library. This avoids the need to retrain the model when adding new image categories due to the use of image classification network models for identification, reduces the tedious operation of retraining the model when adding new image categories, and thus improves the convenience of identifying work clothes.

[0045] As an optional implementation of step S130, the process of determining whether a ReID feature is matched may include:

[0046] Step S131: Calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities.

[0047] The implementation method of the above step S131 is, for example: using an executable program compiled or interpreted in a preset programming language to calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities. Specifically, the similarities that can be used include: cosine distance, Euclidean distance, Hamming distance or information entropy, etc.; of course, in practice, complex modes such as multiple combined weighted parameters can also be selected to calculate the similarity.

[0048] Step S132: Determine whether the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library.

[0049] The similarity threshold refers to the similarity threshold between features, which can be preset or dynamically changed. For example, the similarity threshold can be set to 0.4, 0.6 or 0.8, etc.

[0050] An implementation method of the above-mentioned step S132 is, for example: using an executable program compiled or interpreted by a preset programming language to determine whether the minimum similarity among multiple similarities is greater than the similarity threshold of the tooling feature library; wherein, programming languages ​​that can be used are, for example: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc.

[0051] Step S133: If the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library, it is determined that the ReID feature is matched.

[0052] Step S134: If the minimum similarity among the multiple similarities is not greater than the similarity threshold of the tooling feature library, it is determined that no ReID feature is matched.

[0053] An implementation example of the above-mentioned steps S133 to S134 is as follows: assuming that the similarity threshold here is 0.4 for example, if the minimum similarity among multiple similarities is greater than 0.4 of the tooling feature library, it is determined that the ReID feature is matched, that is, it can be considered that the image to be identified and the data in the tooling feature library are of the same category; if the minimum similarity among multiple similarities is not greater than 0.4 of the tooling feature library, it is determined that the ReID feature is not matched, that is, it can be considered that the image to be identified and the data in the tooling feature library are not of the same category.

[0054] See also Figure 3 The schematic diagram of the process of updating the tool feature library provided by the embodiment of the present application is shown; as an optional implementation of the above-mentioned work clothing recognition method, when using the tool feature library, the tool feature library can also be updated. The tool feature library can be updated before or after using the tool feature library, or it can be maintained and updated while using the tool feature library. The above-mentioned process of updating the tool feature library may include:

[0055] Step S210: Obtain multiple sample images and the label category annotated for each sample image.

[0056] You can first obtain training data for updating the workwear feature library (assuming there are 100 of them). The training data may include multiple sample images and multiple label categories. Each label category is a label category annotated for each sample image. The label category may be a binary label (for example, 0 represents non-workwear clothing, and 1 represents workwear clothing). Of course, you can also use multi-category labels (for example, 0 represents non-workwear clothing, 1 represents spring and autumn workwear clothing, 2 represents summer workwear clothing, 3 represents dynamic workwear clothing, etc.).

[0057] Step S220: extracting the ReID feature of each sample image, and calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities.

[0058] The implementation method of the above step S220 is, for example: using a feature extraction model such as a residual network (ResNet), a convolutional neural network (CNN) or a recurrent neural network (RNN) to extract global features in the image to be identified, using a feature extraction model including image segmentation, skeleton key point positioning and attention mechanism to extract local features in the image to be identified, and then encoding the global features and local features to generate ReID features, the ReID features can be stored in a script object notation (JSON) format, for example, 100 512-dimensional ReID features can be represented as feature values ​​(100, 512). An executable program compiled or interpreted in a preset programming language is used to calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; wherein, the specific similarities that can be used include: cosine distance, Euclidean distance, Hamming distance or information entropy, etc.; of course, in practice, complex modes such as multiple combined weighting parameters can also be selected to calculate the similarity.

[0059] Step S230: when the update condition of the tooling feature library is met, the tooling feature library is updated according to the label category annotated on the sample image and the minimum similarity among multiple similarities.

[0060] Optionally, the update condition of the above-mentioned tooling feature library may be that after a batch of sample images among multiple sample images are feature extracted and processed, the number of images in a batch of sample images is greater than 1, for example: the number of images in each batch of sample images is set to 10 or 50, etc.

[0061] An example of an implementation of the above step S230 is: assuming that a total of 100 sample images need to be processed, and the number of images in each batch of sample images is 10, 10 is taken as an example here for explanation. After the first batch (i.e., the first 10 images) of sample images are feature extracted and matched, the tooling feature library is updated based on the label category annotated on the sample image and the minimum similarity among multiple similarities.

[0062] See also Figure 4 The flowchart of updating the ReID feature provided by the embodiment of the present application is shown; as an optional implementation of the above step S230, the specific principle of updating the tooling feature library is to update it according to whether there is a classification error, and updating the tooling feature library can specifically be updating the ReID feature in the feature library, and the implementation may include:

[0063] Step S231: If the label category annotated with the sample image is work clothes, and the label category annotated with the sample image is different from the category corresponding to the minimum similarity, the sample image corresponding to the minimum similarity and the ReID feature of the sample image are added to the work clothes feature library.

[0064] For example, the implementation method of the above step S231 is as follows: suppose that the sample image with the label category marked as work clothes is called a positive sample, and the sample image with the label category marked as not work clothes is called a negative sample. If there is a situation where the positive sample is divided into a negative sample (that is, the label category marked by the sample image is different from the category corresponding to the minimum similarity), it can be explained that the number of positive samples in the tooling feature library is small. When there are enough ReID features in the tooling feature library (that is, the features are large enough), the similarity calculated for the new sample image can be made less than the similarity threshold, so that the new sample image is divided into a positive sample. At this time, the sample image with the smallest similarity among all the positive samples of the wrong classification can be added to the tooling feature library, that is, the sample image corresponding to the minimum similarity and the ReID feature of the sample image are added to the tooling feature library.

[0065] In the implementation process of the above scheme, by realizing the effect of automatically updating the work clothes feature library, the situation in which the image classification network model is used to identify the need to retrain the model when new image categories are added is avoided, and the tedious operation of retraining the model when new image categories are added is reduced, thereby improving the convenience of identifying work clothes.

[0066] As an optional implementation of the above step S230, the specific principle of updating the tooling feature library is to update it according to whether there is a classification error. Updating the tooling feature library may specifically be updating the similarity threshold of the tooling feature library. This implementation may include:

[0067] Step S232: If the label category annotated with the sample image is not work clothing, and the label category annotated with the sample image is different from the category corresponding to the minimum similarity, the similarity threshold of the work clothing feature library is modified to the minimum similarity.

[0068] For example, the implementation method of the above step S232 is as follows: suppose that the sample image with the labeled category of work clothes is called a positive sample, and the sample image with the labeled category of not work clothes is called a negative sample. If there is a situation where the negative sample is classified as a positive sample (that is, the label category annotated on the sample image is different from the category corresponding to the minimum similarity), it can be explained that the similarity threshold between the negative sample and the positive sample in the tooling feature library is too high. At this time, the similarity threshold can be set to the minimum similarity in the negative sample of the wrong classification, that is, the similarity threshold of the tooling feature library is modified to the minimum similarity. Assuming that the original similarity threshold is 0.4 and the minimum similarity is 0.35, the similarity threshold of the tooling feature library can be modified from 0.4 to 0.35.

[0069] In the implementation process of the above scheme, when the label category annotated by the sample image is not work clothes and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, the similarity threshold of the work clothes feature library is modified to the minimum similarity, thereby avoiding the problem of incorrect recognition of work clothes due to untimely modification of the similarity threshold of the work clothes feature library, thereby improving the accuracy of identifying work clothes.

[0070] See also Figure 5 The structural diagram of the work clothing identification device provided by the embodiment of the present application is shown. The embodiment of the present application provides a work clothing identification device 300, including:

[0071] The target image acquisition module 310 is used to acquire the image to be identified. The image to be identified is obtained by photographing the target object.

[0072] The ReID feature extraction module 320 is used to extract pedestrian re-identification (ReID) features in the image to be identified.

[0073] The ReID feature judgment module 330 is used to judge whether a ReID feature is matched in the tooling feature library.

[0074] The work clothing determination module 340 is used to determine the clothing category of the target object as work clothing if the ReID feature is matched in the work clothing feature library.

[0075] Optionally, in the embodiment of the present application, the work clothing identification device further includes:

[0076] The work clothing negation module is used to determine the clothing category of the target object as non-work clothing if no ReID feature is matched in the work clothing feature library.

[0077] Optionally, in the embodiment of the present application, the ReID feature judgment module includes:

[0078] The similarity calculation module is used to calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities.

[0079] The similarity threshold calculation module is used to determine whether the minimum similarity among multiple similarities is greater than the similarity threshold of the tooling feature library.

[0080] The ReID feature matching module is used to determine that the ReID feature is matched if the minimum similarity among multiple similarities is greater than the similarity threshold of the tooling feature library, otherwise, determine that the ReID feature is not matched.

[0081] Optionally, in the embodiment of the present application, the work clothing identification device further includes:

[0082] The image category acquisition module is used to obtain multiple sample images and the label category annotated for each sample image.

[0083] The similarity acquisition module is used to extract the ReID feature of each sample image and calculate the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities.

[0084] The feature library updating module is used to update the tooling feature library according to the label category annotated by the sample image and the minimum similarity among multiple similarities when the update condition of the tooling feature library is met.

[0085] Optionally, in an embodiment of the present application, the feature library updating module includes:

[0086] The ReID feature adding module is used to add the sample image corresponding to the minimum similarity and the ReID feature of the sample image to the workwear feature library if the label category annotated by the sample image is workwear and the label category annotated by the sample image is different from the category corresponding to the minimum similarity.

[0087] Optionally, in an embodiment of the present application, the feature library updating module includes:

[0088] The similarity threshold modification module is used to modify the similarity threshold of the workwear feature library to the minimum similarity if the label category annotated by the sample image is not workwear and the label category annotated by the sample image is different from the category corresponding to the minimum similarity.

[0089] Optionally, in an embodiment of the present application, a condition for updating the tooling feature library is that after a batch of sample images among a plurality of sample images are feature extracted and processed, the number of images in the batch of sample images is greater than 1.

[0090] It should be understood that the device corresponds to the above-mentioned work clothing identification method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or fixed in the operating system (OS) of the device.

[0091] An electronic device provided in an embodiment of the present application includes: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the above method is performed when the machine-readable instructions are executed by the processor.

[0092] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is executed.

[0093] Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0094] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0095] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of a module, a program segment or a code includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also be different from the order of occurrence marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which is mainly determined by the functions involved.

[0096] In addition, each functional module of each embodiment in the embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. In addition, in the description of this specification, the description of reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present application. In this specification, the schematic representation of the above terms does not necessarily have to be directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradicting each other.

[0097] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0098] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.

Claims

1. A method for identifying work clothes, characterized in that: include: Acquire an image to be identified, where the image to be identified is obtained by photographing a target object; Extracting a pedestrian re-identification (ReID) feature in the image to be identified, wherein the ReID feature is a combination of a global feature and a local feature of the same pedestrian in the image; Determine whether the ReID feature is matched in the tooling feature library; If so, the clothing category of the target object is determined to be work clothing; Wherein, the determination of whether the ReID feature is matched in the tooling feature library includes: calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; determining whether the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library; if so, determining that the ReID feature is matched, otherwise, determining that the ReID feature is not matched; obtaining multiple sample images and the label category annotated by each of the sample images; extracting the ReID feature of each of the sample images, and calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; when the update condition of the tooling feature library is met, updating the tooling feature library according to the label category annotated by the sample image and the minimum similarity among the multiple similarities; The updating of the work clothes feature library according to the label category annotated by the sample image and the minimum similarity among the multiple similarities includes: if the label category annotated by the sample image is not work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then modifying the similarity threshold of the work clothes feature library to the minimum similarity; if the label category annotated by the sample image is work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then adding the sample image corresponding to the minimum similarity and the ReID feature of the sample image to the work clothes feature library; wherein, the sample image corresponding to the minimum similarity is a sample image of a wrong category, and the updating condition of the work clothes feature library is that after a batch of sample images among the multiple sample images are feature extracted and processed, the number of images in the batch of sample images is greater than 1.

2. The method according to claim 1, characterized in that After determining whether the ReID feature is matched in the tooling feature library, the method further includes: If the ReID feature is not matched in the workwear feature library, the clothing category of the target object is determined to be non-work clothing.

3. A work clothing identification device, characterized in that: include: A target image acquisition module is used to acquire an image to be identified, where the image to be identified is obtained by photographing a target object; A ReID feature extraction module is used to extract a pedestrian re-identification ReID feature in the image to be identified, wherein the ReID feature is a combination of a global feature and a local feature of the same pedestrian in the image; A ReID feature judgment module is used to judge whether the ReID feature is matched in the tooling feature library; a work clothing determination module, configured to determine the clothing category of the target object as work clothing if the ReID feature is matched in a work clothing feature library; Wherein, the determination of whether the ReID feature is matched in the tooling feature library includes: calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; determining whether the minimum similarity among the multiple similarities is greater than the similarity threshold of the tooling feature library; if so, determining that the ReID feature is matched, otherwise, determining that the ReID feature is not matched; obtaining multiple sample images and the label category annotated by each of the sample images; extracting the ReID feature of each of the sample images, and calculating the similarity between the ReID feature and each feature in the tooling feature library to obtain multiple similarities; when the update condition of the tooling feature library is met, updating the tooling feature library according to the label category annotated by the sample image and the minimum similarity among the multiple similarities; The updating of the work clothes feature library according to the label category annotated by the sample image and the minimum similarity among the multiple similarities includes: if the label category annotated by the sample image is not work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then modifying the similarity threshold of the work clothes feature library to the minimum similarity; if the label category annotated by the sample image is work clothes, and the label category annotated by the sample image is different from the category corresponding to the minimum similarity, then adding the sample image corresponding to the minimum similarity and the ReID feature of the sample image to the work clothes feature library; wherein, the sample image corresponding to the minimum similarity is a sample image of a wrong category, and the updating condition of the work clothes feature library is that after a batch of sample images among the multiple sample images are feature extracted and processed, the number of images in the batch of sample images is greater than 1.

4. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 2 is performed.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2 is executed.

Citation Information

Patent Citations

  • Character recognition method and device

    CN113128265A

  • Work clothes identification method and system

    CN113989858A