Washing machine inner barrel light source adjusting method and device based on deep learning and medium
Through the deep learning model, the brightness of the light source in the washing machine is adjusted in real time, which solves the problem of inaccurate clothing detection caused by light source fixation, and improves image acquisition quality and detection accuracy.
Patent Information
- Application Number
- CN202510378701.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-11
AI Technical Summary
The light source in the existing washing machines is fixed, which causes the light environment to depend on the color of the clothes, which affects the image acquisition quality and the accuracy of the clothes detection.
The brightness adjustment prediction model based on deep learning is adopted to obtain the clothing image in real time and predict the brightness adjustment value, and adaptively adjust the brightness of the light source.
It improves the quality of clothing image acquisition in the washing machine and enhances the accuracy of clothing detection.
Smart Images

Figure CN120298641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a method, device, and medium for adjusting the light source of the inner barrel of a washing machine based on deep learning. Background Art
[0002] In the vision system of the inner barrel of a washing machine, a light source is essential. After the washing machine door is closed, the environment inside the inner barrel is poorly lit, and the light source is crucial for the vision system. The quality of the light will directly affect the quality of the captured vision images.
[0003] Currently, there are not many solutions for arranging the vision system in the inner barrel of a washing machine. Therefore, there are few specially designed solutions for the light source arrangement. The common basic method is to arrange the light source at a fixed position of the washing machine (such as the upper edge of the washing machine door). Usually, the light source is a point light source or a strip light source. Since the inner barrel of the washing machine needs to rotate during the washing process, and the light source generally needs to be arranged at a fixed position, only the position near the washing machine door can be arranged with the light source.
[0004] The light inside the washing machine largely depends on the light provided by the light source. The inner wall of the washing machine is generally metallic silver, which will reflect light to a large extent. When the light source is fixed, the overall light intensity of the inner barrel environment mainly depends on the absorption and reflection of light by the clothes themselves. Clothes are divided into dark and light colors. Dark clothes absorb more light and reflect less light, and the image presented is darker, while light clothes absorb less light and reflect more light. After further reflection by the inner wall of the barrel, the image of light clothes will be brighter, and some will reach a reflective effect. Whether the image is too dark or too bright will cause inconvenience for the vision system of the inner barrel of the washing machine to detect clothes, affecting the quality of the image acquisition of the clothes in the inner barrel of the washing machine, and thus affecting the accuracy of the detection of the clothes in the inner barrel of the washing machine. Summary of the Invention
[0005] An object of the present invention is to solve at least to a certain extent one of the technical problems existing in the prior art.
[0006] To this end, an object of an embodiment of the present invention is to provide a method for adjusting the light source of the inner barrel of a washing machine based on deep learning, which improves the quality of the image acquisition of the clothes in the inner barrel of the washing machine, and thus improves the accuracy of the detection of the clothes in the inner barrel of the washing machine.
[0007] Another object of an embodiment of the present invention is to provide a device for adjusting the light source of the inner barrel of a washing machine based on deep learning.
[0008] To achieve the above technical object, the technical solutions adopted in the embodiments of the present invention include:
[0009] On the one hand, an embodiment of the present invention provides a method for adjusting the light source of the inner barrel of a washing machine based on deep learning, including the following steps:
[0010] Obtain a first clothing image of the target inner barrel of the washing machine;
[0011] Input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value;
[0012] Adjust the light source brightness of the target inner barrel of the washing machine according to the first brightness adjustment value.
[0013] Further, in an embodiment of the present invention, the obtaining of the first clothing image of the target inner barrel of the washing machine specifically includes:
[0014] Obtain a preset initial light source brightness;
[0015] Control the light source of the target inner barrel of the washing machine to emit light by the light source controller according to the initial light source brightness;
[0016] Obtain the first clothing image through the built-in camera.
[0017] Further, in an embodiment of the present invention, the brightness adjustment prediction model is trained through the following steps:
[0018] Obtain a plurality of sample clothing images and corresponding brightness adjustment labels;
[0019] Construct a training data set according to the sample clothing images and the brightness adjustment labels;
[0020] Input the training data set into a pre-constructed convolutional neural network to obtain a brightness adjustment prediction value;
[0021] Determine a loss value according to the brightness adjustment prediction value and the brightness adjustment label;
[0022] Update the parameters of the convolutional neural network according to the loss value to obtain the trained brightness adjustment prediction model.
[0023] Further, in an embodiment of the present invention, the obtaining of the plurality of sample clothing images and the corresponding brightness adjustment labels specifically includes:
[0024] Randomly sample several sample clothes from a preset plurality of test clothes and put them into the inner barrel of the test washing machine;
[0025] Randomly generate a first brightness value and control the light source of the inner barrel of the test washing machine to emit light according to the first brightness value;
[0026] Obtain the sample clothing image of the inner barrel of the test washing machine through the built-in camera;
[0027] The tester adjusts the light source brightness of the inner barrel of the test washing machine so that the imaging quality of the clothes in the inner barrel of the test washing machine after adjustment meets the expected standard, and records the second brightness value after adjustment;
[0028] Determine the brightness adjustment label according to the difference between the second brightness value and the first brightness value.
[0029] Further, in an embodiment of the present invention, the convolutional neural network includes a convolutional layer, a self-attention layer, and a fully connected layer. The convolutional layer is used to extract local features of the sample clothing image, the self-attention layer is used to perform weighted calculation on the local features based on the dynamic weight allocation mechanism to obtain global features, and the fully connected layer is used to map the global features to the sample label space and output the probability distribution of the brightness adjustment value through the SoftMax function.
[0030] Further, in an embodiment of the present invention, adjusting the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value specifically includes:
[0031] Determine the first target brightness according to the initial light source brightness and the first brightness adjustment value;
[0032] The light source controller adjusts the light source brightness of the inner barrel of the target washing machine according to the first target brightness.
[0033] Further, in an embodiment of the present invention, after adjusting the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value, it further includes:
[0034] Obtain a second clothing image of the inner barrel of the target washing machine;
[0035] Input the second clothing image into the brightness adjustment prediction model to obtain a second brightness adjustment value;
[0036] When the absolute value of the second brightness adjustment value is greater than or equal to a preset first threshold, adjust the light source brightness of the inner barrel of the target washing machine according to the second brightness adjustment value, and return to the step of obtaining the second clothing image of the inner barrel of the target washing machine;
[0037] When the absolute value of the second brightness adjustment value is less than the first threshold, determine that the light source brightness of the inner barrel of the target washing machine does not need to be adjusted further.
[0038] On the other hand, an embodiment of the present invention provides a device for adjusting the light source of the inner barrel of a washing machine based on deep learning, including:
[0039] An image acquisition module for acquiring a first clothing image of the inner barrel of a target washing machine;
[0040] A brightness adjustment prediction module, configured to input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value;
[0041] A light source brightness adjustment module, configured to adjust the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value.
[0042] On the other hand, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory. When the program is executed by the processor, it implements the method for adjusting the light source of the inner barrel of the washing machine based on deep learning as described above.
[0043] On the other hand, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for adjusting the light source of the inner barrel of the washing machine based on deep learning as described above.
[0044] The advantages and beneficial effects of the present invention will be partially given in the following description, partially will become obvious from the following description, or be understood through the practice of the present invention:
[0045] In the embodiment of the present invention, first, a first clothing image of the inner barrel of the target washing machine is obtained, then the first clothing image is input into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value, and then the light source brightness of the inner barrel of the target washing machine is adjusted according to the first brightness adjustment value. In the embodiment of the present invention, the clothing image of the inner barrel of the washing machine is used as the input, and the pre-trained brightness adjustment prediction model is used to predict in real time the brightness adjustment value required by the inner barrel of the washing machine currently, and the light source brightness of the inner barrel of the washing machine is adaptively adjusted according to the brightness adjustment value, overcoming the problem in the prior art that the light environment is too dark or too bright due to dark or light clothing in the inner barrel of the washing machine, improving the quality of clothing image acquisition in the inner barrel of the washing machine, and thus improving the accuracy of clothing detection in the inner barrel of the washing machine. Description of the Drawings
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following introduces the drawings required to be used in the embodiments of the present invention. It should be understood that the drawings introduced below are only for conveniently and clearly expressing some embodiments of the technical solutions in the present invention. For those skilled in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0047] Figure 1 It is a flowchart of steps of a method for adjusting the light source of the inner barrel of a washing machine based on deep learning provided by an embodiment of the present invention;
[0048] Figure 2 It is a flowchart of steps of step S101 provided by an embodiment of the present invention;
[0049] Figure 3 It is a flowchart of steps of training a brightness adjustment prediction model provided by an embodiment of the present invention;
[0050] Figure 4 It is a flowchart of steps of step S201 provided by an embodiment of the present invention;
[0051] Figure 5 It is a schematic structural diagram of a convolutional neural network provided by an embodiment of the present invention;
[0052] Figure 6 It is a flowchart of steps of step S103 provided by an embodiment of the present invention;
[0053] Figure 7 It is another flowchart of steps of a method for adjusting the light source of the inner barrel of a washing machine based on deep learning provided by an embodiment of the present invention;
[0054] Figure 8 It is a schematic structural diagram of a device for adjusting the light source of the inner barrel of a washing machine based on deep learning provided by an embodiment of the present invention;
[0055] Figure 9 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present invention;
[0056] Figure 10 It is a schematic structural diagram of a storage medium provided by an embodiment of the present invention. Detailed implementation manners
[0057] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for explaining the present application and should not be construed as limiting the present application. It should be noted that although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different module division from that in the system schematic diagram or a different order from that in the flowchart. For the step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0058] In the description of the present invention, the meaning of "a plurality of" is two or more. If the first and the second are described, it is only for the purpose of distinguishing technical features, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features or implicitly specifying the sequence of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field 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.
[0059] The method for adjusting the light source of the washing machine inner barrel based on deep learning provided by the embodiments of this application can be applied to a terminal, can also be applied to a server side, or can also be software running on the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a set-top box, etc.; the server side can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the method for adjusting the light source of the washing machine inner barrel based on deep learning, etc., but is not limited to the above forms.
[0060] This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet-type devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0061] It should be noted that in each specific embodiment of the present application, when it comes to performing relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiments of the present application need to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained through methods such as pop-up windows or jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.
[0062] In the current washing machine inner barrel vision system, the light source is arranged at a fixed position to supplement the light for the inner barrel environment, and after setting the brightness of the light source, it will not be adjusted during the operation of the washing machine, and the light source itself does not have the ability to adaptively adjust the brightness. When the light source is fixed, the intensity of the overall light in the inner barrel environment mainly depends on the absorption and reflection of light by the clothes themselves. Clothes are divided into dark and light colors. Dark clothes absorb more light and reflect less light, so the image presented is darker, while light clothes absorb less light and reflect more light. After further reflection by the inner wall of the inner barrel, the image presented by light clothes will be brighter, and some will reach a reflective effect.
[0063] It has been found through research that the brightness of the light source will directly affect the accuracy of clothing recognition and detection. Therefore, whether the image is too dark or too bright, it will bring inconvenience to the detection of clothes by the washing machine inner barrel vision system, affecting the quality of the clothing image acquisition in the washing machine inner barrel, and thus affecting the accuracy of the clothing detection in the washing machine inner barrel.
[0064] Based on this, the present invention proposes a method for adjusting the light source of a washing machine inner barrel based on deep learning. By using a deep learning model to predict the intensity of the light in the current washing machine inner barrel environment and output a brightness adjustment value, and then feedback it to the light source control system, so as to adaptively adjust the brightness of the washing machine inner barrel light source and achieve the optimal light effect.
[0065] As Figure 1 shown is a flowchart of the steps of a method for adjusting the light source of a washing machine inner barrel based on deep learning provided by an embodiment of the present invention. Referring to Figure 1 the present invention provides a method for adjusting the light source of a washing machine inner barrel based on deep learning, which specifically includes the following steps:
[0066] S101. Obtain a first clothing image of the target washing machine inner barrel;
[0067] S102. Input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value;
[0068] S103. Adjust the light source brightness of the inner tub of the target washing machine according to the first brightness adjustment value.
[0069] In the embodiment of the present invention, first, a first clothing image of the inner tub of the target washing machine is acquired, then the first clothing image is input into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value, and then the light source brightness of the inner tub of the target washing machine is adjusted according to the first brightness adjustment value. In the embodiment of the present invention, the clothing image of the inner tub of the washing machine is used as the input, and the brightness adjustment value currently required for the inner tub of the washing machine is predicted in real time through a pre-trained brightness adjustment prediction model, and the light source brightness of the inner tub of the washing machine is adaptively adjusted according to the brightness adjustment value, overcoming the problem in the prior art that the light environment is too dark or too bright under the influence of dark or light-colored clothes in the inner tub of the washing machine, improving the quality of the clothing image acquisition in the inner tub of the washing machine, and thus improving the accuracy of the clothing detection in the inner tub of the washing machine.
[0070] The following further describes the specific implementation process of the embodiment of the present invention with reference to the drawings.
[0071] As Figure 2 shown is a flowchart of a step of step S101 provided by the embodiment of the present invention. Referring to Figure 2 , further as an optional implementation manner, acquiring a first clothing image of the inner tub of the target washing machine specifically includes:
[0072] S1011. Acquire a preset initial light source brightness;
[0073] S1012. Control the light source of the inner tub of the target washing machine to emit light according to the initial light source brightness through a light source controller;
[0074] S1013. Acquire a first clothing image through a built-in camera.
[0075] Specifically, in the embodiment of the present invention, on both sides of the upper part of the washing machine door along the left and right 45 degrees, a strip-shaped light source is arranged on each side, and the brightness of the light source can be controlled by a light source controller. The light source controller first controls the light source to set an initial illumination brightness, and the initial brightness value is set manually. Generally, according to experience, it is sufficient to make the clothes in the tub observable in the image, and this brightness depends on the adjustable range of different light source controllers. In the embodiment of the present invention, this brightness is initially set to medium brightness, that is, the intermediate value between the maximum brightness value and the minimum brightness value that the light source controller can control. At the current brightness, the clothing image in the tub is captured through the built-in camera of the inner tub of the washing machine to obtain a first clothing image.
[0076] After obtaining the first clothing image, input the first clothing image into the brightness adjustment prediction model to predict the brightness value that needs to be adjusted for the current screen. The brightness adjustment prediction model is a pre-trained model. The input of the model is the clothing image, and the output is the brightness adjustment value required for the current screen. The structure and training process of the brightness adjustment prediction model will be described below.
[0077] As Figure 3 shown is a flowchart of a step for training the brightness adjustment prediction model provided by an embodiment of the present invention. Referring to Figure 3 , further as an optional implementation manner, the brightness adjustment prediction model is obtained through the following steps:
[0078] S201. Obtain a plurality of sample clothing images and corresponding brightness adjustment labels;
[0079] S202. Construct a training data set according to the sample clothing images and the brightness adjustment labels;
[0080] S203. Input the training data set into a pre-constructed convolutional neural network to obtain a brightness adjustment prediction value;
[0081] S204. Determine a loss value according to the brightness adjustment prediction value and the brightness adjustment label;
[0082] S205. Update the parameters of the convolutional neural network according to the loss value to obtain a trained brightness adjustment prediction model.
[0083] Specifically, a large number of sample clothing images and corresponding brightness adjustment labels are obtained to form a training data set. After inputting the training samples into the initialized convolutional neural network, the predicted results output by the model, that is, the brightness adjustment prediction values, can be obtained. The accuracy of the model prediction can be evaluated based on the brightness adjustment prediction values and the aforementioned brightness adjustment labels, so as to update the parameters of the model. For the brightness adjustment prediction model, the accuracy of the model prediction results can be measured by a loss function. The loss function is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of a training data is determined by the label of the single training data and the prediction result of the model for this training data. During actual training, a training data set has many training data, so generally a cost function is used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction errors of all training data, which can better measure the prediction effect of the model. For a general machine learning model, based on the aforementioned cost function, plus a regularization term that measures the model complexity, it can be used as the objective function for training. Based on this objective function, the loss value of the entire training data set can be obtained. There are many types of commonly used loss functions. For example, the 0-1 loss function, the square loss function, the absolute loss function, the logarithmic loss function, the cross-entropy loss function, etc. can all be used as the loss function of the machine learning model, which will not be elaborated one by one here. In the embodiments of the present invention, any one of the loss functions can be selected to determine the loss value of training. Based on the loss value of training, the parameters of the model are updated using the backpropagation algorithm, and the trained brightness adjustment prediction model can be obtained after several rounds of iteration. Specifically, the number of iteration rounds can be preset in advance, or it is considered that the training is completed when the accuracy requirement is met in the test set.
[0084] As Figure 4 shown is a flowchart of a step of step S201 provided by an embodiment of the present invention. Referring to Figure 4 , further as an optional implementation manner, obtaining a plurality of sample clothing images and corresponding brightness adjustment labels specifically includes:
[0085] S2011. Randomly sample several sample clothes from a preset plurality of test clothes and put them into the inner barrel of the test washing machine;
[0086] S2012. Randomly generate a first brightness value and control the light source in the inner barrel of the test washing machine to emit light according to the first brightness value;
[0087] S2013. Obtain the sample clothing images in the inner barrel of the test washing machine through the built-in camera;
[0088] S2014. Adjust the light source brightness of the inner barrel of the test washing machine by the tester so that the imaging quality of the clothes in the inner barrel of the adjusted test washing machine meets the expected standard, and record the second brightness value after adjustment;
[0089] S2015. Determine the brightness adjustment label according to the difference between the second brightness value and the first brightness value.
[0090] Specifically, the brightness adjustment prediction model of the embodiment of the present invention is trained based on a large number of sample data. Therefore, the preparation of the sample data directly affects the prediction ability of the brightness adjustment prediction model. The acquisition processes of the sample clothing images and the brightness adjustment labels are described in detail below:
[0091] 1) Prepare multiple types of test clothes of different colors in advance, and set up the test environment of the inner barrel vision system of the washing machine applied in the present invention;
[0092] 2) Randomly select several sample clothes from the test clothes by random sampling and put them into the inner barrel of the test washing machine;
[0093] 3) Randomly generate the first brightness value, and control the light source of the inner barrel of the test washing machine according to the first brightness value, and record this brightness value as h1;
[0094] 4) Obtain the sample clothing image of the inner barrel of the test washing machine through the built-in camera, and record it as image i;
[0095] 5) The tester adjusts the light source brightness of the inner barrel of the test washing machine to a suitable value through the light source controller, so that the imaging quality of the clothes in the adjusted inner barrel of the test washing machine meets the expected standard, such as the clarity, contrast, and brightness meet the preset threshold range, and record the brightness value at this time as h2;
[0096] 6) Calculate the difference between the brightness values before and after the adjustment by the tester, delta_h = h2 - h1, and use this difference as the brightness adjustment label of image i;
[0097] 7) Record image i and the corresponding brightness adjustment label delta_h into the training data set as a training sample.
[0098] 8) Repeat the above steps 2) to 7) until enough training samples are obtained.
[0099] As Figure 5 shown is the structural schematic diagram of the convolutional neural network provided by the embodiment of the present invention. Refer to Figure 5, further as an optional implementation, the convolutional neural network includes a convolutional layer, a self-attention layer, and a fully-connected layer. The convolutional layer is used to extract local features of the sample clothing image. The self-attention layer is used to perform weighted calculation on the local features based on the dynamic weight allocation mechanism to obtain global features. The fully-connected layer is used to map the global features to the sample label space and output the probability distribution of the brightness adjustment value through the SoftMax function.
[0100] Specifically, to ensure the calculation effect under the limited computing power at the edge, the brightness adjustment prediction model of the embodiments of the present invention is trained using a convolutional neural network, including a convolutional layer (CNN module), a self-attention layer (Selfattention module), and a fully-connected layer (full connections). Among them, the convolutional layer extracts local features of the clothing image through convolutional processing. The self-attention layer performs weighted calculation on the local features based on the dynamic weight allocation mechanism to obtain global features. The fully-connected layer maps the global features to the sample label space and outputs the probability distribution of the brightness adjustment value through the SoftMax function, and finally outputs the brightness adjustment value with the highest probability as the brightness adjustment prediction value.
[0101] In the embodiments of the present invention, through global information integration and dynamic feature enhancement, the self-attention layer enables the convolutional neural network to break through the limitation of the local receptive field and achieve higher accuracy and robustness in complex tasks, thereby improving the accuracy of the brightness adjustment prediction value output by the brightness adjustment prediction model.
[0102] As Figure 6 shown is a step flow chart of step S103 provided by the embodiments of the present invention. Referring to Figure 6 , further as an optional implementation, adjust the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value, which specifically includes:
[0103] S1031. Determine the first target brightness according to the initial light source brightness and the first brightness adjustment value;
[0104] S1032. Adjust the light source brightness of the inner barrel of the target washing machine according to the first target brightness through the light source controller.
[0105] Specifically, determine the first target brightness according to the sum of the initial light source brightness and the first brightness adjustment value. When the first brightness adjustment value is a positive number, it indicates that the current picture is darker and the brightness needs to be increased. When the first brightness adjustment value is a negative number, it indicates that the current picture is too bright and the brightness needs to be decreased; send the calculated first target brightness to the light source controller, and control the light source to adjust the brightness through the light source controller.
[0106] As Figure 7The following is another flowchart of steps of the method for adjusting the light source of the inner barrel of a washing machine based on deep learning provided by an embodiment of the present invention. Referring to Figure 7 , further as an optional implementation manner, after adjusting the light source brightness of the target inner barrel of the washing machine according to the first brightness adjustment value, it further includes:
[0107] S104. Obtain a second clothing image of the target inner barrel of the washing machine;
[0108] S105. Input the second clothing image into the brightness adjustment prediction model to obtain a second brightness adjustment value;
[0109] S106. When the absolute value of the second brightness adjustment value is greater than or equal to a preset first threshold, adjust the light source brightness of the target inner barrel of the washing machine according to the second brightness adjustment value, and return to the step of obtaining the second clothing image of the target inner barrel of the washing machine;
[0110] S107. When the absolute value of the second brightness adjustment value is less than the first threshold, determine that the light source brightness of the target inner barrel of the washing machine does not need to be adjusted continuously.
[0111] Specifically, in the case where the brightness adjustment value output by the brightness adjustment prediction model is relatively accurate, the object of the present invention can be achieved by adjusting the light source brightness once through steps S101 to S103. However, in some special application scenarios (such as the clothing itself is wet, there are a large number of spliced colors on the clothing), one-time light source brightness adjustment may not achieve the expected effect. Therefore, the embodiment of the present invention additionally designs steps for verifying the adjusted light source brightness, as follows:
[0112] 1) Take a second photo of the clothing through the built-in camera again, input it into the brightness adjustment prediction model to obtain a second brightness adjustment value, and verify whether the absolute value of the second brightness adjustment value is less than a preset first threshold;
[0113] 2) When the absolute value of the second brightness adjustment value is greater than or equal to the first threshold, adjust the light source brightness of the target inner barrel of the washing machine according to the second brightness adjustment value, and execute step 1) again. When the absolute value of the second brightness adjustment value is less than the first threshold, it indicates that the current brightness adjustment is appropriate and no further adjustment is required.
[0114] It should be noted that when step 1) is repeatedly executed a certain number of times, it indicates that the expected effect still cannot be achieved after multiple light source adjustments. At this time, the visual system of the inner barrel of the washing machine may no longer continue to adjust the light source, or may send a warning message to the user terminal. The embodiment of the present invention will not elaborate on this here.
[0115] In the embodiment of the present invention, the first threshold is set as the product of the threshold coefficient and the control range of the light source controller, that is, a fixed threshold coefficient is preset, and different first thresholds are automatically calculated according to different application scenarios.
[0116] In some alternative embodiments, the threshold coefficient can be set to 0.05. That is, when the absolute value of the quotient of the brightness adjustment value output by the model and the control range of the light source controller is less than 0.05, it indicates that the current picture is good and no further adjustment is required.
[0117] The method steps of the embodiments of the present invention are described above. It can be recognized that the embodiments of the present invention use the clothing image in the inner barrel of the washing machine as the input, and through a pre-trained brightness adjustment prediction model, the brightness adjustment value required for the current inner barrel of the washing machine is predicted in real time, and the light source brightness of the inner barrel of the washing machine is adaptively adjusted according to the brightness adjustment value, overcoming the problem in the prior art that the light environment in the inner barrel of the washing machine is too dark or too bright under the influence of dark or light clothes, improving the quality of clothing image acquisition in the inner barrel of the washing machine, and thus improving the accuracy of clothing detection in the inner barrel of the washing machine.
[0118] As Figure 8 shown is the structural schematic diagram of the light source adjustment device for the inner barrel of a washing machine based on deep learning provided by the embodiments of the present invention. Referring to Figure 8 , the embodiments of the present invention provide a light source adjustment device for the inner barrel of a washing machine based on deep learning, including:
[0119] An image acquisition module, configured to acquire a first clothing image of the target inner barrel of the washing machine;
[0120] A brightness adjustment prediction module, configured to input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value;
[0121] A light source brightness adjustment module, configured to adjust the light source brightness of the target inner barrel of the washing machine according to the first brightness adjustment value.
[0122] The content in the above method embodiments is applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.
[0123] The embodiments of the present invention also provide an electronic device, which includes: a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing the connection and communication between the processor and the memory. When the program is executed by the processor, it implements the above-mentioned method for adjusting the light source of the inner barrel of the washing machine based on deep learning. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0124] As Figure 9 shown is the hardware structural schematic diagram of the electronic device provided by the embodiments of the present invention. Referring to Figure 9 , the embodiments of the present invention provide an electronic device, including:
[0125] The processor 901 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention;
[0126] 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), etc. The memory 902 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 902 and are called by the processor 901 to execute the method for adjusting the light source of the inner barrel of the washing machine based on deep learning according to the embodiments of the present invention;
[0127] The input / output interface 903 is used to implement information input and output;
[0128] The communication interface 904 is used to implement communication interaction between this device and other devices, and can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);
[0129] The bus 905 transmits information between various components of the device (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0130] Among them, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904 achieve communication connections with each other inside the device through the bus 905.
[0131] As Figure 10 shown is the structural schematic diagram of the storage medium provided by the embodiments of the present invention. Referring to Figure 10 , the embodiments of the present invention also provide a storage medium. The storage medium is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs 1001, and the one or more programs 1001 can be executed by one or more processors to implement the above-mentioned method for adjusting the light source of the inner barrel of the washing machine based on deep learning.
[0132] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0133] Embodiments of the present invention also disclose a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 the method shown.
[0134] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order mentioned in the operation diagrams. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously, or the above blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present invention are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated, where the order of various operations is changed and where sub-operations described as part of a larger operation are executed independently.
[0135] In addition, although the present invention has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the above functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It can also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More precisely, considering the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skills of an engineer. Therefore, those skilled in the art can implement the present invention as set forth in the claims without undue experimentation. It can also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, and the scope of the present invention is determined by the full scope of the appended claims and their equivalents.
[0136] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., all of which can store program codes.
[0137] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.
[0138] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, the computer-readable medium can even be paper or other suitable media on which the above program can be printed, because the above program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways if necessary, and then storing it in a computer memory.
[0139] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
[0140] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0141] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the claims and their equivalents.
[0142] The above has specifically described the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for adjusting the light source of the inner barrel of a washing machine based on deep learning, characterized in that, It includes the following steps: Obtain a first clothing image of the inner barrel of the target washing machine; Input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value; Adjust the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value.
2. The method for adjusting the light source of the inner tub of a washing machine based on deep learning according to claim 1, wherein The obtaining of the first clothing image of the inner barrel of the target washing machine specifically includes: Obtain a preset initial light source brightness; Control the light source of the inner barrel of the target washing machine to emit light by the light source controller according to the initial light source brightness; Obtain the first clothing image through the built-in camera.
3. A method for adjusting the light source of the inner barrel of a washing machine based on deep learning according to claim 1, characterized in that, The brightness adjustment prediction model is trained through the following steps: Obtain a plurality of sample clothing images and corresponding brightness adjustment labels; Construct a training data set according to the sample clothing images and the brightness adjustment labels; Input the training data set into a pre-constructed convolutional neural network to obtain a brightness adjustment prediction value; Determine a loss value according to the brightness adjustment prediction value and the brightness adjustment label; Update the parameters of the convolutional neural network according to the loss value to obtain the trained brightness adjustment prediction model.
4. The method for adjusting the light source of the inner tub of a washing machine based on deep learning according to claim 3, wherein, The obtaining of the plurality of sample clothing images and corresponding brightness adjustment labels specifically includes: Randomly sample several sample clothes from a preset plurality of test clothes and put them into the inner barrel of the test washing machine; Randomly generate a first brightness value and control the light source of the inner barrel of the test washing machine to emit light according to the first brightness value; Obtain the sample clothing image of the inner barrel of the test washing machine through the built-in camera; Adjust the light source brightness of the inner barrel of the test washing machine by the tester so that the imaging quality of the clothes in the adjusted inner barrel of the test washing machine meets the expected standard, and record the adjusted second brightness value; Determine the brightness adjustment label according to the difference between the second brightness value and the first brightness value.
5. A method for adjusting the light source of the inner barrel of a washing machine based on deep learning according to claim 3, characterized in that: The convolutional neural network includes a convolutional layer, a self-attention layer, and a fully connected layer. The convolutional layer is used to extract local features of the sample clothing image. The self-attention layer is used to perform weighted calculation on the local features based on a dynamic weight allocation mechanism to obtain global features. The fully connected layer is used to map the global features to the sample label space and output the probability distribution of the brightness adjustment value through the SoftMax function.
6. The method for adjusting the light source of the inner barrel of a washing machine based on deep learning according to claim 2, wherein, The adjusting of the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value specifically includes: Determine a first target brightness according to the initial light source brightness and the first brightness adjustment value; Adjust the light source brightness of the inner barrel of the target washing machine by the light source controller according to the first target brightness.
7. A method for adjusting the light source of the inner tub of a washing machine based on deep learning according to any one of claims 1 to 6, characterized in that, After adjusting the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value, it further includes: Obtain a second clothing image of the inner barrel of the target washing machine; Input the second clothing image into the brightness adjustment prediction model to obtain a second brightness adjustment value; When the absolute value of the second brightness adjustment value is greater than or equal to a preset first threshold, adjust the light source brightness of the inner barrel of the target washing machine according to the second brightness adjustment value, and return to the step of obtaining the second clothing image of the inner barrel of the target washing machine; When the absolute value of the second brightness adjustment value is less than the first threshold, it is determined that the light source brightness of the inner barrel of the target washing machine does not need to be adjusted further.
8. A light source adjustment device for the inner barrel of a washing machine based on deep learning, characterized in that, Including: An image acquisition module, configured to acquire a first clothing image of the inner barrel of the target washing machine; A brightness adjustment prediction module, configured to input the first clothing image into a pre-trained brightness adjustment prediction model to obtain a first brightness adjustment value; A light source brightness adjustment module, configured to adjust the light source brightness of the inner barrel of the target washing machine according to the first brightness adjustment value.
9. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory. When the program is executed by the processor, the steps of the method for adjusting the light source of the inner barrel of the washing machine based on deep learning as described in any one of claims 1 to 7 are implemented.
10. A storage medium, the storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for adjusting the light source of the inner barrel of the washing machine based on deep learning as described in any one of claims 1 to 7.