Clothes segmentation method and device, electronic equipment and storage medium

By segmenting the clothes video frame images and evaluating image quality and evaluating clothes in the clothes segmentation model, the problems of slow clothing segmentation speed, low efficiency and poor accuracy in the prior art are solved, and a more efficient and accurate clothing segmentation effect is achieved.

CN119785036APending Publication Date: 2025-04-08NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510116452.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing clothing segmentation methods are slow to process clothing videos, have low computing efficiency, are difficult to achieve real-time response, and are low in accuracy and have poor segmentation effect.

Method used

A clothing segmentation method is proposed. By obtaining the clothing video to be segmented, the frame image is divided, and the image quality evaluation and clothing segmentation are used to evaluate and divide the clothing, including an image quality evaluation module, an image similarity comparison module and an image segmentation module.

Benefits of technology

It improves the accuracy and efficiency of clothing segmentation, improves the effect of clothing segmentation, and can achieve real-time response in multi-frame scenes of video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785036A_ABST
    Figure CN119785036A_ABST
Patent Text Reader

Abstract

The invention discloses a clothes segmentation method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining a to-be-segmented clothes video; performing frame image division on the to-be-segmented clothing video to obtain a video frame image sequence; and performing image quality evaluation and clothes segmentation on the video frame image sequence by using a clothes segmentation model to obtain a clothes segmentation result. Clothes segmentation based on image quality evaluation can be realized, the accuracy and efficiency of clothes segmentation are improved, the clothes segmentation effect is improved, and the method can be widely applied to the technical field of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a clothing segmentation method, device, electronic device and storage medium. Background Art

[0002] Clothing segmentation images can provide a good carrier for subsequent applications such as clothing fashion understanding and clothing management. In existing clothing segmentation methods, a segmentation model with multiple branches is usually used to integrate the segmentation results of clothing images, thereby introducing more parameters, resulting in slower speed and lower computational efficiency when segmenting clothing images. In addition, it is difficult to achieve real-time response when dealing with multi-frame video scenes, resulting in low accuracy and poor clothing segmentation effect. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a clothing segmentation method, device, electronic device and storage medium, which can improve the accuracy and efficiency of clothing segmentation and enhance the clothing segmentation effect.

[0004] On the one hand, an embodiment of the present application provides a method for segmenting clothing, the method comprising the following steps:

[0005] Get the video of the clothes to be segmented;

[0006] Dividing the clothing video to be segmented into frames to obtain a video frame image sequence;

[0007] The clothing segmentation model is used to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

[0008] In some embodiments, the method further comprises:

[0009] Constructing the clothing segmentation model, obtaining a sample data set; the sample data set includes a plurality of sample video frame image sequences with image segmentation labels; the image segmentation labels include image quality score labels, image similarity labels and clothing segmentation labels;

[0010] Dividing the sample data set to obtain a training set and a test set;

[0011] Using the training set to train the clothing segmentation model;

[0012] The test set is used to perform model evaluation on the trained clothing segmentation model to determine whether to continue training the clothing segmentation model.

[0013] In some embodiments, dividing the clothing video to be segmented into frames to obtain a video frame image sequence specifically includes:

[0014] Dividing the clothing video to be segmented into frames to obtain a video frame sequence and a video frame image corresponding to each video frame;

[0015] The video frame image sequence is determined according to the video frame sequence and each of the video frame images.

[0016] In some embodiments, the clothing segmentation model includes an image quality evaluation module, an image similarity comparison module and an image segmentation module. The use of the clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results specifically includes:

[0017] Inputting the video frame image sequence into the image quality evaluation module to determine the image quality score corresponding to each of the video frame images;

[0018] Inputting each of the video frame images and the image quality score corresponding to each of the video frame images into the image similarity comparison module, and determining a plurality of video frame scene images from the plurality of video frame images;

[0019] The scene images of each video frame are input into the image segmentation module to perform clothing segmentation, and the clothing segmentation images corresponding to each video frame scene image are output.

[0020] In some embodiments, the training of the clothing segmentation model using the training set specifically includes:

[0021] Inputting each of the sample video frame image sequences in the training set into the clothing segmentation model in sequence, and outputting clothing image segmentation results corresponding to each of the sample video frame image sequences;

[0022] Get the loss function;

[0023] The model parameters of the clothing segmentation model are adjusted according to the loss function and the clothing image segmentation results and the image segmentation labels corresponding to each of the sample video frame image sequences.

[0024] In some embodiments, inputting each of the video frame images and the image quality score corresponding to each of the video frame images into the image similarity comparison module, and determining a plurality of video frame scene images from the plurality of video frame images specifically includes:

[0025] Determine a plurality of video frame image combinations and a combination sorting list according to the video frame sequence, wherein each of the video frame image combinations includes adjacent video frame images, and the combination sorting list is obtained by sorting each of the video frame image combinations;

[0026] Acquire the video frame image combination ranked first in the combination sorting list as the current video frame image combination, construct an image scene grouping, and acquire the image scene grouping as the current image scene grouping;

[0027] Calculating image similarities corresponding to adjacent video frame images in the current video frame image combination;

[0028] When the image similarity is greater than a given image similarity threshold, adding the adjacent video frame images in the current video frame image combination to the current image scene group;

[0029] When the image similarity is less than the image similarity threshold, adding the previous video frame image in the current video frame image combination to the current image scene grouping, constructing the next image scene grouping, and adding the next video frame image in the current video frame image combination to the next image scene grouping;

[0030] When the current video frame image combination is not the video frame image combination ranked last in the combination sorting list, obtaining the next image scene grouping as the current image scene grouping, obtaining the video frame image combination ranked one position after the current video frame image combination in the combination sorting list as the current video frame image combination, and then returning to the step of calculating image similarities corresponding to adjacent video frame images in the current video frame image combination until the current video frame image combination is the video frame image combination ranked last in the combination sorting list;

[0031] When the current video frame image combination is the video frame image combination ranked last in the combination sorting list, multiple image scene groups and multiple video frame images in each image scene group are determined, and the corresponding video frame scene image is determined from the multiple video frame images in each image scene group, wherein the video frame scene image is the video frame image with the highest image quality score in the image scene group.

[0032] In some embodiments, the clothing image segmentation result includes an image quality score calculation result, a clothing segmentation result, and an image similarity calculation result, and adjusting the model parameters of the clothing segmentation model according to the loss function and the clothing image segmentation results and the image segmentation labels corresponding to each of the sample video frame image sequences specifically includes:

[0033] Obtain a first loss function, a second loss function, and a third loss function;

[0034] Substituting the image quality score calculation result and the image quality score label corresponding to each of the sample video frame image sequences into the first loss function to calculate a first loss value;

[0035] Substituting the image similarity calculation result and the image similarity label corresponding to each of the sample video frame image sequences into the second loss function to calculate a second loss value;

[0036] Substituting the clothing segmentation results and the clothing segmentation labels corresponding to each of the sample video frame image sequences into the third loss function to calculate a third loss value;

[0037] The model parameters are adjusted according to the first loss value, the second loss value and the third loss value.

[0038] On the other hand, an embodiment of the present application provides a clothing segmentation device, the device comprising:

[0039] The first module is used to obtain the video of clothing to be segmented;

[0040] The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence;

[0041] The third module is used to use the clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

[0042] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned clothing segmentation method.

[0043] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the clothing segmentation method described above is implemented.

[0044] The embodiments of the present application include at least the following beneficial effects: The present application provides a clothing segmentation method, device, electronic device and storage medium, which obtains a video of clothing to be segmented, divides the video of clothing to be segmented into frame images, obtains a video frame image sequence, and uses a clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results. The present application can achieve clothing segmentation based on image quality evaluation, improve the accuracy and efficiency of clothing segmentation, and enhance the effect of clothing segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of a clothing segmentation method provided in an embodiment of the present application;

[0046] Figure 2 is a schematic diagram of outputting clothing segmentation results using a clothing segmentation model in an embodiment of the present application;

[0047] Figure 3 is a structural schematic diagram of a clothing dividing device provided in an embodiment of the present application;

[0048] Figure 4 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0050] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0051] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0053] Reference Figure 1 , Figure 1 This is an optional flow chart of a clothing segmentation method provided in an embodiment of the present application. The method may include but is not limited to steps S101 to S103:

[0054] Step S101, obtaining a video of clothing to be segmented;

[0055] Step S102, dividing the clothing video to be segmented into frames to obtain a video frame image sequence;

[0056] Step S103, using the clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

[0057] In step S102 of some embodiments, the clothing video to be segmented is divided into frame images to obtain a video frame sequence and video frame images corresponding to each video frame. A video frame image sequence is determined based on the video frame sequence and each video frame image. Optionally, each video frame image is preprocessed, including image enhancement, image noise reduction, image standardization, etc.

[0058] In some embodiments, the above method may also include but is not limited to steps S201 to S204:

[0059] Step S201, constructing a clothing segmentation model and obtaining a sample data set; the sample data set includes a plurality of sample video frame image sequences with image segmentation labels; the image segmentation labels include image quality score labels, image similarity labels and clothing segmentation labels;

[0060] Step S202, dividing the sample data set to obtain a training set and a test set;

[0061] Step S203, training the clothing segmentation model using the training set;

[0062] Step S204, using the test set to perform model evaluation on the trained clothing segmentation model to determine whether to continue training the clothing segmentation model.

[0063] In some embodiments, optionally, the test set is input into the clothing segmentation model, the clothing segmentation model is used to output the clothing segmentation results, the clothing segmentation model is evaluated according to several preset model evaluation indicators and the clothing segmentation results, and the model training evaluation value corresponding to each model evaluation indicator is determined. According to the model training evaluation value corresponding to each model evaluation indicator, it is determined whether to continue training the clothing segmentation model to obtain the evaluation threshold corresponding to each model evaluation indicator. When the model training evaluation value corresponding to each model evaluation indicator exceeds the evaluation threshold corresponding to each model evaluation indicator, the training of the clothing segmentation model is stopped. Otherwise, the training of the clothing segmentation model is continued. Optionally, the model evaluation indicators may include but are not limited to precision, recall rate, F1 value, AUC value, etc.

[0064] In some embodiments, a clothing segmentation model is constructed based on a Transformer model. The clothing segmentation model may include but is not limited to an image quality evaluation module, an image similarity comparison module, and an image segmentation module. Step S103 may include but is not limited to steps S301 to S303:

[0065] Step S301, inputting a video frame image sequence into an image quality evaluation module to determine an image quality score corresponding to each video frame image;

[0066] Step S302, inputting each video frame image and the image quality score corresponding to each video frame image into an image similarity comparison module, and determining a plurality of video frame scene images from the plurality of video frame images;

[0067] Step S303: input each video frame scene image into an image segmentation module, perform clothing segmentation, and output a clothing segmentation image corresponding to each video frame scene image.

[0068] In some embodiments, an image quality evaluation module is used to perform image quality evaluation on each video frame image to determine an image quality score corresponding to each video frame image. Optionally, the image quality score is associated with the image resolution.

[0069] In some embodiments, since the video is continuous, referring to the concept of scene shot segmentation, the video has multiple scene segments. In the same scene segment, frames are highly similar. Therefore, the video frame image sequence is compared frame by frame through the image similarity comparison module to determine multiple scene transition images, namely the above-mentioned video frame scene images.

[0070] In some embodiments, an image segmentation module is used to perform feature extraction and clothing segmentation on each video frame scene image to obtain a clothing segmentation image corresponding to each video frame scene image, and the clothing segmentation images corresponding to each video frame scene image are integrated to determine the clothing segmentation results corresponding to the video frame image sequence.

[0071] In some embodiments, reference Figure 2 , Figure 2 It is an optional schematic diagram of outputting clothing segmentation results using a clothing segmentation model in an embodiment of the present application, wherein a video frame image sequence is respectively input into an image quality evaluation module and an image similarity comparison module, and an image quality score corresponding to each video frame image is outputted through the image quality evaluation module, and the video frame image sequence is compared frame by frame through the image similarity comparison module, and the image quality score corresponding to each video frame image outputted by the image quality evaluation module is received, a plurality of video frame scene images are determined, and clothing segmentation is performed on each video frame scene image through the image segmentation module, and a clothing segmentation image corresponding to each video frame scene image is outputted, i.e., the above-mentioned clothing segmentation result.

[0072] In some embodiments, step S302 may include, but is not limited to, steps S401 to S407:

[0073] Step S401, determining a plurality of video frame image combinations and a combination sorting list according to a video frame sequence, wherein each video frame image combination includes adjacent video frame images, and the combination sorting list is obtained by sorting each video frame image combination;

[0074] Step S402, obtaining the video frame image combination ranked first in the combination sorting list as the current video frame image combination, constructing an image scene grouping, and obtaining the image scene grouping as the current image scene grouping;

[0075] Step S403, calculating the image similarities corresponding to adjacent video frame images in the current video frame image combination;

[0076] Step S404, when the image similarity is greater than a given image similarity threshold, adding adjacent video frame images in the current video frame image combination to the current image scene group;

[0077] Step S405, when the image similarity is less than the image similarity threshold, the preceding video frame image in the current video frame image combination is added to the current image scene group, the next image scene group is constructed, and the succeeding video frame image in the current video frame image combination is added to the next image scene group;

[0078] Step S406, when the current video frame image combination is not the last video frame image combination in the combination sorting list, the next image scene grouping is obtained as the current image scene grouping, the video frame image combination ranked one position after the current video frame image combination in the combination sorting list is obtained as the current video frame image combination, and then the process returns to the step of calculating the image similarities corresponding to adjacent video frame images in the current video frame image combination until the current video frame image combination is the last video frame image combination in the combination sorting list;

[0079] Step S407, when the current video frame image combination is the last video frame image combination in the combination sorting list, multiple image scene groups and multiple video frame images in each image scene group are determined, and the corresponding video frame scene image is determined from the multiple video frame images in each image scene group, wherein the video frame scene image is the video frame image with the highest image quality score in the image scene group.

[0080] In some embodiments, the PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity Index) between adjacent video frame images are calculated, and the image similarity corresponding to the adjacent video frame images is determined based on the PSNR and SSIM. The image similarity is calculated by the following formula:

[0081] Similarity(x 1 , x 2 )=λ*PSNR(x 1 , x 2 )+SSIM(x 1 , x 2 );

[0082] Among them, Similarity is the image similarity value, x 1 and x 2 Represents adjacent video frame images, PSNR is x 1 and x 2 The peak signal-to-noise ratio between 1 and x 2 The structural similarity index between them, λ is the weight for balancing PSNR and SSIM.

[0083] For example, assume that the video frame image sequence A has a total of video frame images x 1 to x 10 , the video frame image x is compared by the image similarity comparison module 1 to x 10 Compare frame by frame to determine the image scene grouping G 1 To G 3 , where the image scene group G 1 Contains the video frame image x 1 to x 3 , image scene grouping G 2 Contains the video frame image x 4 to x 8 , image scene grouping G 3 Contains the video frame image x 9 to x 10 , in the image scene grouping G 1 In the video frame image x 1 The image quality score is the highest, and the video frame image x 1 Determine the image scene group G 1 The corresponding video frame scene image, in the image scene group G 2 In the video frame image x 5 The image quality score is the highest, and the video frame image x5 Determine the image scene group G 2 The corresponding video frame scene image, in the image scene group G 3 In the video frame image x 10 The image quality score is the highest, and the video frame image x 10 Determine the image scene group G 3 The corresponding video frame scene images, therefore, the video frame image sequence A corresponds to three video frame scene images, namely, video frame images x 1 , video frame image x 5 and video frame image x 10 .

[0084] In some embodiments, step S203 may include but is not limited to steps S501 to S503:

[0085] Step S501, inputting each sample video frame image sequence in the training set into the clothing segmentation model in sequence, and outputting the clothing image segmentation result corresponding to each sample video frame image sequence;

[0086] Step S502, obtaining a loss function;

[0087] Step S503, adjusting the model parameters of the clothing segmentation model according to the loss function and the clothing image segmentation results and image segmentation labels corresponding to each sample video frame image sequence.

[0088] In some embodiments, the clothing image segmentation result includes an image quality score calculation result, a clothing segmentation result, and an image similarity calculation result. Step S503 may include, but is not limited to, steps S601 to S605:

[0089] Step S601, obtaining a first loss function, a second loss function and a third loss function;

[0090] Step S602, substituting the image quality score calculation result and the image quality score label corresponding to each sample video frame image sequence into a first loss function to calculate a first loss value;

[0091] Step S603, substituting the image similarity calculation results and image similarity labels corresponding to each sample video frame image sequence into the second loss function to calculate the second loss value;

[0092] Step S604, substituting the clothing segmentation results and clothing segmentation labels corresponding to each sample video frame image sequence into a third loss function to calculate a third loss value;

[0093] Step S605, adjusting the model parameters according to the first loss value, the second loss value and the third loss value.

[0094] In some embodiments, specifically, the parameters of the image quality assessment module are adjusted according to the first loss value, the parameters of the image similarity comparison module are adjusted according to the second loss value, and the parameters of the image segmentation module are adjusted according to the third loss value.

[0095] Reference Figure 3 , Figure 3 : is an optional structural diagram of a clothing segmentation device provided in an embodiment of the present application, the device permanently implements the above clothing segmentation method, and the device may include:

[0096] The first module is used to obtain the video of clothing to be segmented;

[0097] The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence;

[0098] The third module is used to use the clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

[0099] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0100] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned clothing segmentation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer.

[0101] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0102] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0103] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0104] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the clothing segmentation method of the embodiment of this application;

[0105] Input / output interface 903, used to implement information input and output;

[0106] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0107] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0108] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0109] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned clothing segmentation method is implemented.

[0110] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0111] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0112] The embodiments of the present application provide a clothing segmentation method, device, electronic device, and storage medium, which obtain a video of clothing to be segmented, divide the video of clothing to be segmented into frames, obtain a video frame image sequence, and use a clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results. The embodiments of the present application can achieve clothing segmentation based on image quality evaluation, improve the accuracy and efficiency of clothing segmentation, and enhance the clothing segmentation effect.

[0113] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0114] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0115] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0117] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0118] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0119] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0120] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0122] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.

[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0124] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A clothing segmentation method, characterized in that: The method comprises the following steps: Get the video of the clothes to be segmented; Dividing the clothing video to be segmented into frames to obtain a video frame image sequence; The clothing segmentation model is used to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

2. The clothing segmentation method according to claim 1, characterized in that: The method further comprises: Constructing the clothing segmentation model, obtaining a sample data set; the sample data set includes a plurality of sample video frame image sequences with image segmentation labels; the image segmentation labels include image quality score labels, image similarity labels and clothing segmentation labels; Dividing the sample data set to obtain a training set and a test set; Using the training set to train the clothing segmentation model; The test set is used to perform model evaluation on the trained clothing segmentation model to determine whether to continue training the clothing segmentation model.

3. The clothing segmentation method according to claim 1, characterized in that: The step of dividing the clothing video to be segmented into frames to obtain a video frame image sequence specifically includes: Dividing the clothing video to be segmented into frames to obtain a video frame sequence and a video frame image corresponding to each video frame; The video frame image sequence is determined according to the video frame sequence and each of the video frame images.

4. The clothing segmentation method according to claim 1, characterized in that: The clothing segmentation model includes an image quality evaluation module, an image similarity comparison module and an image segmentation module. The clothing segmentation model is used to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results, specifically including: Inputting the video frame image sequence into the image quality evaluation module to determine the image quality score corresponding to each of the video frame images; Inputting each of the video frame images and the image quality score corresponding to each of the video frame images into the image similarity comparison module, and determining a plurality of video frame scene images from the plurality of video frame images; The scene images of each video frame are input into the image segmentation module to perform clothing segmentation, and the clothing segmentation images corresponding to each video frame scene image are output.

5. The clothing segmentation method according to claim 2, characterized in that: The training of the clothing segmentation model using the training set specifically includes: Inputting each of the sample video frame image sequences in the training set into the clothing segmentation model in sequence, and outputting clothing image segmentation results corresponding to each of the sample video frame image sequences; Get the loss function; The model parameters of the clothing segmentation model are adjusted according to the loss function and the clothing image segmentation results and the image segmentation labels corresponding to each of the sample video frame image sequences.

6. The clothing segmentation method according to claim 4, characterized in that: The step of inputting each of the video frame images and the image quality score corresponding to each of the video frame images into the image similarity comparison module, and determining a plurality of video frame scene images from the plurality of video frame images specifically includes: Determine a plurality of video frame image combinations and a combination sorting list according to the video frame sequence, wherein each of the video frame image combinations includes adjacent video frame images, and the combination sorting list is obtained by sorting each of the video frame image combinations; Acquire the video frame image combination ranked first in the combination sorting list as the current video frame image combination, construct an image scene grouping, and acquire the image scene grouping as the current image scene grouping; Calculating image similarities corresponding to adjacent video frame images in the current video frame image combination; When the image similarity is greater than a given image similarity threshold, adding the adjacent video frame images in the current video frame image combination to the current image scene group; When the image similarity is less than the image similarity threshold, adding the previous video frame image in the current video frame image combination to the current image scene grouping, constructing the next image scene grouping, and adding the next video frame image in the current video frame image combination to the next image scene grouping; When the current video frame image combination is not the video frame image combination ranked last in the combination sorting list, obtaining the next image scene grouping as the current image scene grouping, obtaining the video frame image combination ranked one position after the current video frame image combination in the combination sorting list as the current video frame image combination, and then returning to the step of calculating image similarities corresponding to adjacent video frame images in the current video frame image combination until the current video frame image combination is the video frame image combination ranked last in the combination sorting list; When the current video frame image combination is the video frame image combination ranked last in the combination sorting list, multiple image scene groups and multiple video frame images in each image scene group are determined, and the corresponding video frame scene image is determined from the multiple video frame images in each image scene group, wherein the video frame scene image is the video frame image with the highest image quality score in the image scene group.

7. The clothing segmentation method according to claim 5, characterized in that: The clothing image segmentation result includes an image quality score calculation result, a clothing segmentation result, and an image similarity calculation result. The adjusting the model parameters of the clothing segmentation model according to the loss function and the clothing image segmentation results and the image segmentation labels corresponding to each of the sample video frame image sequences specifically includes: Obtain a first loss function, a second loss function, and a third loss function; Substituting the image quality score calculation result and the image quality score label corresponding to each of the sample video frame image sequences into the first loss function to calculate a first loss value; Substituting the image similarity calculation result and the image similarity label corresponding to each of the sample video frame image sequences into the second loss function to calculate a second loss value; Substituting the clothing segmentation results and the clothing segmentation labels corresponding to each of the sample video frame image sequences into the third loss function to calculate a third loss value; The model parameters are adjusted according to the first loss value, the second loss value and the third loss value.

8. A clothing dividing device, characterized in that: The device comprises: The first module is used to obtain the video of clothing to be segmented; The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence; The third module is used to use the clothing segmentation model to perform image quality evaluation and clothing segmentation on the video frame image sequence to obtain clothing segmentation results.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the clothing segmentation method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the clothing segmentation method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image quality evaluation method and device, electronic equipment and storage medium

    CN111754492A

  • Target image determination method and device, computer equipment and storage medium

    CN111935479A

  • Video processing method and device, storage medium and electronic equipment

    CN111950653A

  • Video scene classification method and device, storage medium and terminal

    CN113496208A

  • Clothes image processing method, storage medium and electronic device

    CN116486095A