CN112381074B - Image recognition method and device, electronic equipment and computer readable medium - Google Patents

Image recognition method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112381074B
CN112381074B CN202110051688.6A CN202110051688A CN112381074B CN 112381074 B CN112381074 B CN 112381074B CN 202110051688 A CN202110051688 A CN 202110051688A CN 112381074 B CN112381074 B CN 112381074B
Authority
CN
China
Prior art keywords
sample
image
image recognition
value
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110051688.6A
Other languages
Chinese (zh)
Other versions
CN112381074A (en
Inventor
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Communication Information System Co Ltd
Original Assignee
Beijing Missfresh Ecommerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Missfresh Ecommerce Co Ltd filed Critical Beijing Missfresh Ecommerce Co Ltd
Priority to CN202110051688.6A priority Critical patent/CN112381074B/en
Publication of CN112381074A publication Critical patent/CN112381074A/en
Application granted granted Critical
Publication of CN112381074B publication Critical patent/CN112381074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

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

Abstract

The embodiment of the disclosure discloses an image recognition method, an image recognition device, an electronic device and a computer readable medium. One embodiment of the method comprises: receiving a dressing image submitted by a target user; inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result; generating prompt information according to the image recognition result; and sending the prompt information to the audio and video equipment associated with the target user. According to the embodiment, dressing verification can be rapidly carried out through the image recognition model, verification efficiency is improved, and time is saved. Meanwhile, the accuracy of the auditing result is improved.

Description

Image recognition method and device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to an image recognition method, an image recognition device, an electronic device, and a computer-readable medium.
Background
With the development of internet technology, more and more online shopping platforms appear. The online shopping platform usually adopts a manual auditing mode to audit the dressing of the rider so as to improve the safety of the rider in delivering the articles.
However, the following technical problems are usually encountered when the rider dress is checked by manual checking:
firstly, much manpower is consumed for dressing and checking, checking efficiency is low, a large amount of time and cost are consumed, meanwhile, in the process of manual checking, a certain subjectivity may exist in a checker, and the checking result is not accurate enough;
and secondly, the rider who dresses irregularly is not reminded in time, so that the safety of the rider in the process of delivering the articles is reduced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose image recognition methods, apparatuses, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide an image recognition method, including: acquiring a dressing image submitted by a target user; inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result; generating prompt information according to the image recognition result; and sending the prompt information to the audio and video equipment associated with the target user.
In some embodiments, said determining a loss value for said at least one sample based on said at least one sample, said image recognition result for each of said at least one sample, said set of image name scores, said set of sample name scores, and said set of category scores comprises:
generating a loss value for the at least one sample by a formula:
Figure 304855DEST_PATH_IMAGE001
wherein,
Figure 660750DEST_PATH_IMAGE002
a loss value representing the at least one sample,
Figure 373491DEST_PATH_IMAGE003
the value of the initial loss is represented,
Figure 94322DEST_PATH_IMAGE004
representing the number of samples comprised by the at least one sample,
Figure 525303DEST_PATH_IMAGE005
representing the sequence number of the sample in the at least one sample,
Figure 622572DEST_PATH_IMAGE006
a preset boundary value is represented, and,
Figure 455399DEST_PATH_IMAGE007
represents the second of the at least one sample
Figure 550394DEST_PATH_IMAGE005
The value of the sample name score corresponding to each sample,
Figure 734251DEST_PATH_IMAGE008
represents the second of the at least one sample
Figure 635211DEST_PATH_IMAGE005
The image name score value corresponding to each sample,
Figure 260227DEST_PATH_IMAGE009
a preset numerical value is represented, and,
Figure 854020DEST_PATH_IMAGE010
represents the second of the at least one sample
Figure 197276DEST_PATH_IMAGE005
The value of the category score corresponding to each sample,
Figure 370769DEST_PATH_IMAGE011
represents the second of the at least one sample
Figure 912608DEST_PATH_IMAGE005
The sample property values that an individual sample includes,
Figure 677302DEST_PATH_IMAGE012
represents the second of the at least one sample
Figure 507855DEST_PATH_IMAGE005
And the image attribute value included in the image identification result corresponding to each sample.
In a second aspect, some embodiments of the present disclosure provide an image recognition apparatus, including: a receiving unit configured to receive a dressing image submitted by a target user; the input unit is configured to input the dressing image into a pre-trained image recognition model to obtain an image recognition result; a generating unit configured to generate prompt information according to the image recognition result; and the sending unit is configured to send the prompt information to the audio and video equipment associated with the target user.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: by the image identification method of some embodiments of the present disclosure, the consumption of time cost is reduced, and the accuracy of the audit result is improved. Specifically, the reason why the accuracy of the audit result is not high is that: the dressing verification method has the advantages that much manpower is consumed for dressing verification, the verification efficiency is low, a large amount of time cost is consumed, and meanwhile, in the manual verification process, a certain subjectivity may exist in a verifier, so that the verification result is not accurate enough. Based on this, the image recognition method of some embodiments of the present disclosure, first, receives a dressing image submitted by a target user (rider). Thus, data support is provided for monitoring the rider's clothing. Next, the dressing image is input to an image recognition model trained in advance, and an image recognition result is obtained. Therefore, the dressing of the rider can be quickly checked and the dressing identification result of the rider can be quickly generated. Then, the presentation information may be generated based on the image recognition result. And finally, sending the prompt information to the audio and video equipment associated with the target user. Therefore, dressing verification can be rapidly carried out through the image recognition model, verification efficiency is improved, and time cost consumption is reduced. Meanwhile, the accuracy of the auditing result is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic illustration of one application scenario of an image recognition method according to some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of an image recognition method according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of an image recognition method according to the present disclosure;
FIG. 4 is an image recognition model in further embodiments of an image recognition method according to the present disclosure;
FIG. 5 is a schematic illustration of feature stitching in further embodiments of an image recognition method according to the present disclosure;
FIG. 6 is a schematic illustration of another feature stitching in further embodiments of image recognition methods according to the present disclosure;
FIG. 7 is a schematic block diagram of some embodiments of an image recognition apparatus according to the present disclosure;
FIG. 8 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of an application scenario of an image recognition method according to some embodiments of the present disclosure.
In the application scenario of FIG. 1, first, computing device 101 may receive a rigged image 102 submitted by a target user. Next, the computing device 101 may input the clothing image 102 into a pre-trained image recognition model 103, resulting in an image recognition result 104. Then, the computing device 101 may generate the prompt information 105 based on the image recognition result 104. Finally, the computing device 101 may send the aforementioned prompt information 105 to the audio-video device 106 associated with the aforementioned target user.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With continued reference to fig. 2, a flow 200 of some embodiments of an image recognition method according to the present disclosure is shown. The method may be performed by the computing device 101 of fig. 1. The image recognition method comprises the following steps:
step 201, receiving a dressing image submitted by a target user.
In some embodiments, the subject of execution of the image recognition method (e.g., computing device 101 shown in fig. 1) may receive the rigged image submitted by the target user via a wired connection or a wireless connection. Here, the target user may refer to a rider who is to dispatch the item. Here, the dressing image may refer to a front image of the rider.
Step 202, inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result.
In some embodiments, the executing subject may input the dressing image into a pre-trained image recognition model to obtain an image recognition result. Here, the image recognition model trained in advance may be a network model of various structures. For example, CNN (Convolutional Neural Networks), RNN (Recurrent Neural Networks), and the like. Of course, the model can be built according to actual needs.
In some optional implementations of some embodiments, the executing subject may input the dressing image into a pre-trained image recognition model to obtain an image recognition result. The image recognition model is generated by training through the following steps:
in a first step, a sample set is obtained. Wherein, the samples in the sample set comprise: a sample image and a sample label, said sample label comprising: sample name, sample category, and sample attribute value (sample category score value, higher sample category score value indicates higher degree of importance). For example, the sample may be [ xx.png, helmet, 10 points ].
And secondly, inputting a sample image included in at least one sample in the sample set into the initial neural network model to obtain an image identification result corresponding to each sample in the at least one sample. Wherein the image recognition result comprises: image name, image category, and image attribute value. Here, the initial Neural network model may be CNN (Convolutional Neural Networks) without model training.
And thirdly, determining the loss value of the at least one sample based on a preset loss function.
In some optional implementations of some embodiments, the third step may include the following sub-steps:
the method comprises a first substep of generating an image name score value and a sample name score value based on an image name included in an image recognition result corresponding to each sample in the at least one sample and a sample name included in the sample, and obtaining an image name score value group and a sample name score value group.
As an example, the image name score value may be a score when the image name included in the image recognition result corresponding to the sample is the same as the sample name included in the sample. Here, the score for the image name included in the image recognition result corresponding to the sample and the score for the sample name included in the sample being the same may be the same score value. The sample name score may be a score when the image name included in the image recognition result corresponding to the sample is different from the sample name included in the sample. In practice, first, vectorization processing may be performed on the image name included in the image recognition result corresponding to each of the at least one sample and the sample name included in the sample to generate an image name vector and a sample name vector, so as to obtain an image name vector group and a sample name vector group. And then, determining the association degree of each image name vector in the image name vector group and the sample name vector corresponding to the image name vector as a sample name scoring value to obtain a sample name scoring value group. Here, the vectorization process may be a one-hot encoding process. Here, the degree of association between vectors can be determined by the euclidean distance formula.
And a second substep of generating a class score value group based on the image class included in the image recognition result corresponding to each sample of the at least one sample and the sample class included in the sample.
As an example, first, the execution subject may perform vectorization processing on an image class included in the image recognition result corresponding to each sample of the at least one sample and a sample class included in the sample by using one-hot encoding to generate an image class vector and a sample class vector, respectively, so as to obtain an image class vector group and a sample class vector group. Then, the association degree between each image category vector of the image category vector group and the sample category vector corresponding to the image category vector may be determined as a category score value, so as to obtain a category score value group.
A third substep of determining a loss value of the at least one sample based on the at least one sample, the image recognition result corresponding to each of the at least one sample, the set of image name scores, the set of sample name scores, and the set of category scores.
Optionally, the loss value of the at least one sample is generated by a formula:
Figure 16196DEST_PATH_IMAGE013
wherein,
Figure 615805DEST_PATH_IMAGE002
representing a loss value of the at least one sample,
Figure 551400DEST_PATH_IMAGE003
the value of the initial loss is represented,
Figure 869249DEST_PATH_IMAGE004
indicating the number of samples comprised by said at least one sample,
Figure 915702DEST_PATH_IMAGE005
indicating the serial number of the sample in the at least one sample,
Figure 432134DEST_PATH_IMAGE006
a preset boundary value is represented, and,
Figure 476314DEST_PATH_IMAGE007
representing the second of said at least one sample
Figure 547038DEST_PATH_IMAGE005
The value of the sample name score corresponding to each sample,
Figure 131603DEST_PATH_IMAGE008
representing the second of said at least one sample
Figure 768121DEST_PATH_IMAGE005
The image name score value corresponding to each sample,
Figure 983201DEST_PATH_IMAGE009
a preset numerical value is represented, and,
Figure 72380DEST_PATH_IMAGE010
representing the second of said at least one sample
Figure 663898DEST_PATH_IMAGE005
The value of the category score corresponding to each sample,
Figure 154923DEST_PATH_IMAGE011
represents the second of the at least one sample
Figure 806484DEST_PATH_IMAGE005
The sample property values that an individual sample includes,
Figure 586221DEST_PATH_IMAGE012
represents the second of the at least one sample
Figure 778168DEST_PATH_IMAGE005
And the image attribute value included in the image identification result corresponding to each sample.
And fourthly, in response to the fact that the loss value is smaller than or equal to the preset threshold value, determining the initial neural network model as the image recognition model.
And fifthly, in response to the fact that the loss value is larger than the preset threshold value, network parameters of the initial neural network are adjusted, the unused samples are used for forming a sample set, the adjusted initial neural network is used as the initial neural network, and the processing steps are executed again.
The above formula and its related content are used as an inventive point of the embodiments of the present disclosure, and solve the technical problems mentioned in the background art, i.e., "it consumes more manpower to perform dressing verification, the verification efficiency is low, and a lot of time cost is consumed". The reason for the large time cost is often as follows: and more manpower is consumed for dressing verification, and verification efficiency is lower. If the above factors are solved, the effect of reducing time cost can be achieved. In order to achieve the effect, the loss function with the light weight is adopted in the method, and the loss calculation is carried out on the image name, the image category and the image attribute value of the dressing image by using two different light weights. Then, the obtained loss values are summed to obtain a total loss value. The generated total loss value can reach the designated threshold value in a short time, and the convergence speed of the model is further accelerated. Therefore, dressing verification speed is increased, and verification efficiency is improved. Further, the time cost consumption is reduced.
Step 203, generating a prompt message according to the image recognition result.
In some embodiments, the execution subject may determine feedback information corresponding to a preset image recognition result as the prompt information. For example, the image recognition result may be "the helmet is not worn right", and the feedback information may be "please wear the helmet right now, and take a picture again and upload the system".
And 204, sending the prompt information to the audio and video equipment associated with the target user.
In some embodiments, the execution subject may send the prompt message to an audio-video device associated with the target user. For example, the execution subject may send the prompt message "please wear the safety helmet immediately, and retake the picture and upload the system" to the mobile phone of the rider for the reference of the rider.
The above embodiments of the present disclosure have the following advantages: by the image identification method of some embodiments of the present disclosure, the consumption of time cost is reduced, and the accuracy of the audit result is improved. Specifically, the reason why the accuracy of the audit result is not high is that: the dressing verification method has the advantages that much manpower is consumed for dressing verification, the verification efficiency is low, a large amount of time cost is consumed, and meanwhile due to the fact that in the manual verification process, verification personnel have certain subjectivity, the verification result is possibly not accurate enough. Based on this, the image recognition method of some embodiments of the present disclosure, first, receives a dressing image submitted by a target user (rider). Thus, data support is provided for monitoring the rider's clothing. Next, the dressing image is input to an image recognition model trained in advance, and an image recognition result is obtained. Therefore, the dressing of the rider can be quickly checked and the dressing identification result of the rider can be quickly generated. Then, the presentation information may be generated based on the image recognition result. And finally, sending the prompt information to the audio and video equipment associated with the target user. Therefore, dressing verification can be rapidly carried out through the image recognition model, verification efficiency is improved, and time cost consumption is reduced. Meanwhile, the accuracy of the auditing result is improved.
With further reference to fig. 3, a flow 300 of further embodiments of an image recognition method according to the present disclosure is shown. The method may be performed by the computing device 101 of fig. 1. The image recognition method comprises the following steps:
step 301, receiving a dressing image submitted by a target user.
In some embodiments, the specific implementation manner and technical effects of step 301 may refer to step 201 in those embodiments corresponding to fig. 2, and are not described herein again.
Step 302, inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result.
In some embodiments, referring to fig. 4, the executing subject may input the dressing image into a pre-trained image recognition model to obtain an image recognition result. Wherein, the image recognition model may include: a feature extraction network 401, a convolutional network 404, and a full connection layer 413, where the convolutional network 404 at least includes: first convolution layer 4041 and second convolution layer 4042. The execution subject may obtain the image recognition result by:
first, the dressing image may be input to the feature extraction network 401 to obtain an overall feature sequence 403 and a sub-feature sequence 402 of a target position in the overall feature sequence. The feature extraction network 401 may be configured to perform feature extraction on the clothing image. The feature extraction network 401 may be a BERT (Bidirectional Encoder representation from transforms) network. The feature extraction network 401 may also be a RoBERTa (Robustly Optimized BERT prediction Approach) network. Here, the target position may refer to a position where the user head sequence is located.
Second, the global signature sequence 403 is input into the first convolution layer 4041 and the second convolution layer 4042, respectively, to obtain a first signature sequence 405 and a second signature sequence 406.
Third, performing first pooling 407 on the first feature sequence 405 and the second feature sequence 406, respectively, to obtain a first pooled feature sequence set 409. Here, a first pooling process 407 may be used to perform feature compression and dimensionality reduction. The first pooling 407 may be an average pooling.
Fourth, a second pooling 408 is performed on the first feature sequence 405 and the second feature sequence 406, respectively, to obtain a second pooled feature sequence set 410. Here, a second pooling process 408 may be used to perform feature compression and dimensionality reduction. The second pooling process 408 described above may be a maximum pooling process.
And fifthly, generating a splicing characteristic sequence based on the first pooling characteristic sequence set, the second pooling characteristic sequence set and the sub-characteristic sequences.
In practice, the fifth step may include the following sub-steps:
in the first sub-step, each first pooled feature sequence in the first pooled feature sequence set 409 and the corresponding second pooled feature sequence are subjected to feature concatenation processing to generate sub-concatenation feature sequences, so as to obtain a sub-concatenation feature sequence set 411. Referring to fig. 5, the first pooled feature sequence set 409 may be [ [0.33, 0, 0, 0, 0], [0, 0.33, 0, 0, 0] ]. The second pooled feature sequence set 410 may be [ [1, 0, 0, 0, 0], [0, 1, 0, 0, 0] ]. The resulting set 411 of sub-splicing signature sequences may be [ [0.33, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0.33, 0, 0, 0, 0, 1, 0, 0, 0] ]
And a second sub-step of performing feature concatenation on the sub-feature sequence 402 and each sub-concatenation feature sequence in the sub-concatenation feature sequence set 411 to obtain a concatenation feature sequence 412. Referring to FIG. 6, the sub-signature sequence 402 can be [0, 0, 0, 0, 1 ]. The sub-splicing feature sequence set 411 may be [ [0.33, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0.33, 0, 0, 0, 0, 1, 0, 0, 0] ]. Thus, the concatenated feature sequence 412 resulting from feature concatenation can be [0, 0, 0, 0, 1, 0.33, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0.33, 0, 0, 0, 0, 0, 1, 0, 0, 0]
Sixthly, the splicing feature sequence 412 is input to the full connection layer 413, and an image recognition result 104 is obtained.
Step 303, generating a prompt message according to the image recognition result.
And step 304, sending the prompt information to the audio and video equipment associated with the target user.
In some embodiments, the specific implementation manner and technical effects of steps 303 and 304 may refer to steps 203 and 204 in the embodiments corresponding to fig. 2, which are not described herein again.
As can be seen from fig. 3, the flow 300 of the image recognition method in some embodiments corresponding to fig. 3 is compared to the description of some embodiments corresponding to fig. 2. First, a dressing image submitted by a target user is received. Thus, data support is provided for monitoring the rider's clothing. And then, the structure of the image recognition model is optimized, and the convolution network is used for carrying out convolution processing on the feature information extracted by the feature extraction network, so that more feature information is extracted, and the finally generated image recognition result is more accurate. Therefore, prompt information can be sent to the rider in time according to the image recognition result so as to remind the rider to correctly wear the safety protector and the like. Thereby improving the safety of the rider in delivering the article.
With further reference to fig. 7, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of an image recognition apparatus, which correspond to those of the method embodiments described above with reference to fig. 2, and which may be applied in particular to various electronic devices.
As shown in fig. 7, an image recognition apparatus 700 of some embodiments includes: receiving section 701, input section 702, generating section 703, and transmitting section 704. Wherein the receiving unit 701 is configured to receive a dressing image submitted by a target user; the input unit 702 is configured to input the clothing image into a pre-trained image recognition model, and obtain an image recognition result; the generating unit 703 is configured to generate prompt information according to the image recognition result; a sending unit 704 configured to send the prompt information to an audio/video device associated with the target user.
In some optional implementations of some embodiments, the image recognition model may include: the system comprises a feature extraction network, a convolution network and a full connection layer, wherein the convolution network at least comprises: a first convolutional layer and a second convolutional layer.
In some optional implementations of some embodiments, the input unit 702 in the image recognition device 700 is further configured to: inputting the dressing image into the feature extraction network to obtain an overall feature sequence and a sub-feature sequence of a target position in the overall feature sequence; inputting the global feature sequence into the first convolution layer, the second convolution layer and the third convolution layer respectively to obtain a first feature sequence, a second feature sequence and a third feature sequence; performing first pooling processing on the first feature sequence, the second feature sequence and the third feature sequence respectively to obtain a first pooled feature sequence set; performing second pooling processing on the first feature sequence, the second feature sequence and the third feature sequence respectively to obtain a second pooled feature sequence set; generating a splicing feature sequence based on the first pooling feature sequence set, the second pooling feature sequence set and the sub-feature sequences; and inputting the splicing characteristic sequence into the full-connection layer to obtain an image recognition result.
It will be understood that the elements described in the apparatus 700 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 700 and the units included therein, and will not be described herein again.
Referring now to FIG. 8, a block diagram of an electronic device (e.g., computing device 101 of FIG. 1) 800 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, an electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 8 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through communications device 809, or installed from storage device 808, or installed from ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the apparatus; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a dressing image submitted by a target user; inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result; generating prompt information according to the image recognition result; and sending the prompt information to the audio and video equipment associated with the target user.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, an input unit, a generating unit, and a transmitting unit. The names of these units do not form a limitation on the unit itself in some cases, and for example, the display unit may be further described as a "unit that transmits the prompt information to the audio/video device associated with the target user".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (8)

1. An image recognition method, comprising:
receiving a dressing image submitted by a target user;
inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result;
generating prompt information according to the image recognition result;
sending the prompt information to audio and video equipment associated with the target user;
wherein the image recognition model is generated by training through the following steps:
obtaining a sample set, wherein samples in the sample set comprise: a sample image and a sample label, the sample label comprising: sample name, sample category, and sample attribute value;
based on the sample set, the following processing steps are performed:
inputting a sample image included in at least one sample in a sample set into an initial neural network, and obtaining an image identification result corresponding to each sample in the at least one sample, wherein the image identification result includes: image name, image category, and image attribute value;
determining a loss value of the at least one sample based on a preset loss function;
determining the initial neural network model as an image recognition model in response to determining that the loss value is less than or equal to a predetermined threshold;
wherein the determining a loss value for the at least one sample comprises:
generating an image name score value and a sample name score value based on an image name included in an image identification result corresponding to each sample in the at least one sample and a sample name included in the sample, and obtaining an image name score value group and a sample name score value group;
generating a class score value group based on an image class included in an image recognition result corresponding to each sample in the at least one sample and a sample class included in the sample;
determining a loss value for the at least one sample based on the at least one sample, the image recognition result for each of the at least one sample, the set of image name scores, the set of sample name scores, and the set of category scores;
wherein the determining a loss value for the at least one sample based on the at least one sample, the image recognition result for each of the at least one sample, the set of image name scores, the set of sample name scores, and the set of category scores comprises:
generating a loss value for the at least one sample by a formula:
Figure 812695DEST_PATH_IMAGE001
wherein,
Figure 198677DEST_PATH_IMAGE002
a loss value representing the at least one sample,
Figure 334340DEST_PATH_IMAGE003
the value of the initial loss is represented,
Figure 198391DEST_PATH_IMAGE004
representing the number of samples comprised by the at least one sample,
Figure 606239DEST_PATH_IMAGE005
representing the sequence number of the sample in the at least one sample,
Figure 897543DEST_PATH_IMAGE006
a preset boundary value is represented, and,
Figure 430155DEST_PATH_IMAGE007
represents the second of the at least one sample
Figure 973263DEST_PATH_IMAGE005
The value of the sample name score corresponding to each sample,
Figure 845404DEST_PATH_IMAGE008
represents the second of the at least one sample
Figure 432243DEST_PATH_IMAGE005
The image name score value corresponding to each sample,
Figure 452152DEST_PATH_IMAGE009
to representThe value is preset to be a predetermined value,
Figure 658005DEST_PATH_IMAGE010
represents the second of the at least one sample
Figure 525598DEST_PATH_IMAGE005
The value of the category score corresponding to each sample,
Figure 158705DEST_PATH_IMAGE011
represents the second of the at least one sample
Figure 993806DEST_PATH_IMAGE005
The sample property values that an individual sample includes,
Figure 534509DEST_PATH_IMAGE012
represents the second of the at least one sample
Figure 646821DEST_PATH_IMAGE005
And the image attribute value included in the image identification result corresponding to each sample.
2. The method of claim 1, wherein the method further comprises:
in response to determining that the loss value is greater than the predetermined threshold, adjusting network parameters of the initial neural network, and composing the sample set using the unused samples, performing the processing step again with the adjusted initial neural network as the initial neural network.
3. The method of claim 1, wherein the image recognition model comprises: the system comprises a feature extraction network, a convolution network and a full connection layer, wherein the convolution network at least comprises: a first convolutional layer and a second convolutional layer.
4. The method of claim 3, wherein the inputting the dressing image into a pre-trained image recognition model to obtain an image recognition result comprises:
inputting the dressing image into the feature extraction network to obtain an overall feature sequence and a sub-feature sequence of a target position in the overall feature sequence;
inputting the overall characteristic sequence into the first convolution layer and the second convolution layer respectively to obtain a first characteristic sequence and a second characteristic sequence;
respectively performing first pooling treatment on the first characteristic sequence and the second characteristic sequence to obtain a first pooled characteristic sequence set;
respectively carrying out second pooling treatment on the first characteristic sequence and the second characteristic sequence to obtain a second pooling characteristic sequence set;
generating a spliced feature sequence based on the first pooled feature sequence set, the second pooled feature sequence set and the sub-feature sequences;
and inputting the splicing characteristic sequence into the full-connection layer to obtain an image identification result.
5. The method of claim 4, wherein the generating a stitched feature sequence based on the first pooled feature sequence set, the second pooled feature sequence set, and the sub-feature sequences comprises:
performing feature splicing processing on each first pooled feature sequence in the first pooled feature sequence set and the corresponding second pooled feature sequence to generate sub-splicing feature sequences, so as to obtain a sub-splicing feature sequence set;
and performing characteristic splicing processing on the sub-characteristic sequences and each sub-splicing characteristic sequence in the sub-splicing characteristic sequence set to obtain a splicing characteristic sequence.
6. An image recognition apparatus comprising:
a receiving unit configured to receive a dressing image submitted by a target user;
an input unit configured to input the dressing image into a pre-trained image recognition model, resulting in an image recognition result, wherein the image recognition model is generated by training through the following steps:
obtaining a sample set, wherein samples in the sample set comprise: a sample image and a sample label, the sample label comprising: sample name, sample category, and sample attribute value;
based on the sample set, the following processing steps are performed:
inputting a sample image included in at least one sample in a sample set into an initial neural network, and obtaining an image identification result corresponding to each sample in the at least one sample, wherein the image identification result includes: image name, image category, and image attribute value;
determining a loss value of the at least one sample based on a preset loss function;
determining the initial neural network model as an image recognition model in response to determining that the loss value is less than or equal to a predetermined threshold;
wherein the determining a loss value for the at least one sample comprises:
generating an image name score value and a sample name score value based on an image name included in an image identification result corresponding to each sample in the at least one sample and a sample name included in the sample, and obtaining an image name score value group and a sample name score value group;
generating a class score value group based on an image class included in an image recognition result corresponding to each sample in the at least one sample and a sample class included in the sample;
determining a loss value for the at least one sample based on the at least one sample, the image recognition result for each of the at least one sample, the set of image name scores, the set of sample name scores, and the set of category scores;
wherein the determining a loss value for the at least one sample based on the at least one sample, the image recognition result for each of the at least one sample, the set of image name scores, the set of sample name scores, and the set of category scores comprises:
generating a loss value for the at least one sample by a formula:
Figure 60616DEST_PATH_IMAGE013
wherein,
Figure 258379DEST_PATH_IMAGE002
a loss value representing the at least one sample,
Figure 602773DEST_PATH_IMAGE003
the value of the initial loss is represented,
Figure 428647DEST_PATH_IMAGE004
representing the number of samples comprised by the at least one sample,
Figure 465873DEST_PATH_IMAGE005
representing the sequence number of the sample in the at least one sample,
Figure 619773DEST_PATH_IMAGE006
a preset boundary value is represented, and,
Figure 767858DEST_PATH_IMAGE007
represents the second of the at least one sample
Figure 198970DEST_PATH_IMAGE005
The value of the sample name score corresponding to each sample,
Figure 407098DEST_PATH_IMAGE008
represents the second of the at least one sample
Figure 48295DEST_PATH_IMAGE005
Image name scoring for individual samplesThe value of the one or more of,
Figure 734491DEST_PATH_IMAGE009
a preset numerical value is represented, and,
Figure 534957DEST_PATH_IMAGE010
represents the second of the at least one sample
Figure 913986DEST_PATH_IMAGE005
The value of the category score corresponding to each sample,
Figure 42479DEST_PATH_IMAGE011
represents the second of the at least one sample
Figure 532366DEST_PATH_IMAGE005
The sample property values that an individual sample includes,
Figure 672491DEST_PATH_IMAGE012
represents the second of the at least one sample
Figure 222421DEST_PATH_IMAGE005
Image attribute values included in the image recognition result corresponding to the samples;
a generating unit configured to generate prompt information according to the image recognition result;
a sending unit configured to send the prompt information to an audio-video device associated with the target user.
7. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
8. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202110051688.6A 2021-01-15 2021-01-15 Image recognition method and device, electronic equipment and computer readable medium Active CN112381074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110051688.6A CN112381074B (en) 2021-01-15 2021-01-15 Image recognition method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110051688.6A CN112381074B (en) 2021-01-15 2021-01-15 Image recognition method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112381074A CN112381074A (en) 2021-02-19
CN112381074B true CN112381074B (en) 2021-05-25

Family

ID=74581849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110051688.6A Active CN112381074B (en) 2021-01-15 2021-01-15 Image recognition method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112381074B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065570B (en) * 2021-06-03 2021-08-24 北京远鉴信息技术有限公司 Image audit detection method and device and electronic equipment
CN113379006B (en) * 2021-08-16 2021-11-02 北京国电通网络技术有限公司 Image recognition method and device, electronic equipment and computer readable medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875779A (en) * 2018-05-07 2018-11-23 深圳市恒扬数据股份有限公司 Training method, device and the terminal device of neural network
CN110110120B (en) * 2018-06-11 2021-05-25 北方工业大学 Image retrieval method and device based on deep learning
US11126835B2 (en) * 2019-02-21 2021-09-21 Tata Consultancy Services Limited Hand detection in first person view
CN110287804A (en) * 2019-05-30 2019-09-27 广东电网有限责任公司 A kind of electric operating personnel's dressing recognition methods based on mobile video monitor
CN110309856A (en) * 2019-05-30 2019-10-08 华为技术有限公司 Image classification method, the training method of neural network and device
CN111931592B (en) * 2020-07-16 2022-06-28 苏州科达科技股份有限公司 Object recognition method, device and storage medium
CN112200260B (en) * 2020-10-19 2022-06-14 厦门大学 Figure attribute identification method based on discarding loss function

Also Published As

Publication number Publication date
CN112381074A (en) 2021-02-19

Similar Documents

Publication Publication Date Title
CN108830235B (en) Method and apparatus for generating information
CN109858445B (en) Method and apparatus for generating a model
CN108805091B (en) Method and apparatus for generating a model
US11436863B2 (en) Method and apparatus for outputting data
CN109993150B (en) Method and device for identifying age
CN109829432B (en) Method and apparatus for generating information
CN109919244B (en) Method and apparatus for generating a scene recognition model
CN109981787B (en) Method and device for displaying information
CN112381074B (en) Image recognition method and device, electronic equipment and computer readable medium
CN110059623B (en) Method and apparatus for generating information
CN109165736A (en) Information processing method and device applied to convolutional neural networks
CN106908082A (en) Method, apparatus and system for the gyroscope in calibrating terminal
WO2021088790A1 (en) Display style adjustment method and apparatus for target device
CN110008926B (en) Method and device for identifying age
CN110097004B (en) Facial expression recognition method and device
CN115131603A (en) Model processing method and device, storage medium and electronic equipment
CN110765490A (en) Method and apparatus for processing information
CN114038465B (en) Voice processing method and device and electronic equipment
CN113850890A (en) Method, device, equipment and storage medium for generating animal image
CN111586295B (en) Image generation method and device and electronic equipment
CN110414625B (en) Method and device for determining similar data, electronic equipment and storage medium
CN110688470B (en) Method and apparatus for transmitting information
CN117056507A (en) Long text analysis method, long text analysis model training method and related equipment
CN112507884A (en) Live content detection method and device, readable medium and electronic equipment
CN112348615A (en) Method and device for auditing information

Legal Events

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

Effective date of registration: 20240604

Address after: Building S06, Langchao Science Park, 1036 Langchao Road, high tech Zone, Jinan City, Shandong Province

Patentee after: INSPUR COMMUNICATION AND INFORMATION SYSTEM Co.,Ltd.

Country or region after: China

Address before: 100102 room 801, 08 / F, building 7, yard 34, Chuangyuan Road, Chaoyang District, Beijing

Patentee before: BEIJING MISSFRESH E-COMMERCE Co.,Ltd.

Country or region before: China