CN111601418A - Color temperature adjusting method and device, storage medium and processor - Google Patents
Color temperature adjusting method and device, storage medium and processor Download PDFInfo
- Publication number
- CN111601418A CN111601418A CN202010451708.4A CN202010451708A CN111601418A CN 111601418 A CN111601418 A CN 111601418A CN 202010451708 A CN202010451708 A CN 202010451708A CN 111601418 A CN111601418 A CN 111601418A
- Authority
- CN
- China
- Prior art keywords
- color temperature
- model
- picture
- classification model
- environment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B45/00—Circuit arrangements for operating light-emitting diodes [LED]
- H05B45/20—Controlling the colour of the light
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The invention discloses a color temperature adjusting method, a color temperature adjusting device, a storage medium and a processor. The method comprises the following steps: training a pre-classification model of color temperature in a machine learning manner based on a first training data set, wherein the pre-classification model comprises a plurality of convolutional layers, each convolutional layer has corresponding model parameters, and the first training set comprises: a plurality of first pictures, and a color temperature category of each first picture; applying the model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for representing the corresponding relation between the second picture collected in the specified environment and the color temperature category; identifying a color temperature category corresponding to an environment picture collected in a specified environment based on a color temperature classification model; adjusting the color temperature of the light fixtures in the designated environment based on the color temperature category of the environment picture. The invention solves the technical problem that the color temperature measurement adjustment can not be carried out based on a small amount of color temperature adjustment data samples in the prior art by a machine learning mode.
Description
Technical Field
The invention relates to the field of control, in particular to a color temperature adjusting method, a color temperature adjusting device, a storage medium and a processor.
Background
In the present phase, research on intelligent lighting technology of office buildings is more and more extensive, and as an important parameter besides illuminance, color temperature adjustment of an LED lighting lamp is more and more concerned by people, and meanwhile, the adjustment of the color temperature is more and more important in the aspect of guaranteeing the visual health of office staff. How to apply the outdoor color temperature condition to the indoor to support the healthy and intelligent lighting manner is also more emphasized.
Conventional color temperature calculations are based on color sensors, calculated from tristimulus values. Compared with the traditional methods, the traditional methods are low in precision and high in cost, and the traditional measuring methods are basically tested manually, so that the efficiency cannot be guaranteed when color temperature adjustment is carried out, and the randomness is high.
After investigation, the problem of small sample classification can be found because the number of samples for training the machine learning model is small due to the long acquisition period when the color temperature measurement and adjustment is actually carried out.
Aiming at the problem that the color temperature measurement adjustment cannot be carried out based on a small amount of color temperature adjustment data samples in the prior art through a machine learning mode, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a color temperature adjusting method, a color temperature adjusting device, a storage medium and a processor, which at least solve the technical problem that the prior art cannot carry out color temperature measurement adjustment based on a small amount of color temperature adjusting data samples in a machine learning mode.
According to an aspect of an embodiment of the present invention, there is provided a color temperature adjusting method including: training a pre-classification model of color temperature by means of machine learning based on a first training data set, wherein the pre-classification model comprises a plurality of convolutional layers, each convolutional layer having corresponding model parameters, and the first training set comprises: a plurality of first pictures, and a color temperature category of each first picture; applying model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for indicating the corresponding relation between a second picture acquired in a specified environment and a color temperature category; identifying a color temperature category corresponding to an environmental picture acquired within the specified environment based on the color temperature classification model; adjusting a color temperature of a luminaire within the specified environment based on a color temperature category of the environment picture.
Optionally, applying the model parameters in the pre-classification model to a color temperature classification model comprises: transferring the model parameters in the pre-classification model to a preset network model to obtain an initial color temperature model; correcting the model parameters based on a second training data set to obtain the color temperature classification model, wherein the second training data set comprises: a plurality of second pictures taken within the specified environment, and a color temperature category for each second picture.
Optionally, migrating the model parameters in the pre-classification model to a predetermined model template, and obtaining an initial color temperature model includes: and migrating the model parameters in other convolution layers except the last layer in the pre-classification model to the preset network model.
Optionally, modifying the model parameters based on a second set of training data comprises: and training the model parameters of the last convolutional layer in the predetermined network model based on the second training data set.
Optionally, a fully connected layer and a classifier are provided after the last convolutional layer in the predetermined network model.
Optionally, before the model parameters are modified based on the second training data set, the method further comprises: capturing a plurality of second pictures within the specified environment; measuring the color temperature value of the designated environment when each second picture is collected by a color temperature meter; and determining the color temperature category corresponding to each second picture based on the color temperature value corresponding to each second picture to obtain the second training data set.
Optionally, adjusting the color temperature of the light fixtures within the specified environment based on the color temperature category of the environment picture comprises: detecting whether the color temperature category corresponding to the environment picture meets the preset color temperature requirement or not; and under the condition that the color temperature category corresponding to the environment picture does not meet the preset color temperature requirement, adjusting the color temperature of the lamps in the specified environment.
According to another aspect of the embodiments of the present invention, there is also provided a color temperature adjusting apparatus including: a first model training unit, configured to train a pre-classification model of color temperature in a machine learning manner based on a first training data set, where the pre-classification model includes a plurality of convolutional layers, each convolutional layer having a corresponding model parameter, and the first training set includes: a plurality of first pictures, and a color temperature category of each first picture; the second model training unit is used for applying the model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for indicating the corresponding relation between a second picture acquired in a specified environment and a color temperature class; the identification unit is used for identifying a color temperature category corresponding to the environmental picture collected in the specified environment based on the color temperature classification model; and the adjusting unit is used for adjusting the color temperature of the lamps in the specified environment based on the color temperature category of the environment picture.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, the storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the color temperature adjusting method described above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to run a program, where the program is executed to perform the color temperature adjustment method described above.
In the embodiment of the invention, the pre-classification model can be trained in a machine learning manner based on a large number of data samples in the first training data set; then, based on the corresponding model parameters of each convolution layer in the trained pre-classification model, the color temperature classification model is applied to the color temperature classification model used for detecting the color temperature category under the appointed environment, a color temperature class of the environmental picture taken at each time instant within the specified environment may be detected based on the color temperature classification model, and the color temperature of the lamps in the specified environment is classified based on the color temperature category of the environment picture, so that the color temperature classification model is specially used for the color temperature in the specified environment, may be determined by sample data provided by other than the specified environment, so that the training of the color temperature classification model may not be limited to sample data provided by the specified environment, thereby realizing the technical effect of measuring and adjusting the color temperature by applying a machine learning mode based on a small amount of color temperature adjusting data samples, and then solved prior art and can't carry out the colour temperature measurement regulation technical problem based on a small amount of colour temperature regulation data sample through the mode of machine learning.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flow chart of a color temperature adjustment method according to an embodiment of the invention;
FIG. 2a is a diagram of a VGG16 macro model according to an embodiment of the present invention;
FIG. 2b is a schematic diagram of a VGG16 model structure according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a color temperature adjustment method based on transfer learning and deep learning according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a color temperature adjusting apparatus according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present invention, there is provided an embodiment of a color temperature adjustment method, it should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that here.
Fig. 1 is a flowchart of a color temperature adjusting method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, training a color temperature pre-classification model in a machine learning mode based on a first training data set, wherein the pre-classification model comprises a plurality of convolutional layers, each convolutional layer has corresponding model parameters, and the first training set comprises: a plurality of first pictures, and a color temperature category of each first picture;
step S104, applying model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for indicating the corresponding relation between a second picture collected in a specified environment and a color temperature category;
step S106, identifying the color temperature category corresponding to the environment picture collected in the designated environment based on the color temperature classification model;
and S108, adjusting the color temperature of the lamps in the designated environment based on the color temperature category of the environment picture.
In the embodiment of the invention, the pre-classification model can be trained in a machine learning manner based on a large number of data samples in the first training data set; then, based on the corresponding model parameters of each convolution layer in the trained pre-classification model, the color temperature classification model is applied to the color temperature classification model used for detecting the color temperature category under the appointed environment, a color temperature class of the environmental picture taken at each time instant within the specified environment may be detected based on the color temperature classification model, and the color temperature of the lamps in the specified environment is classified based on the color temperature category of the environment picture, so that the color temperature classification model is specially used for the color temperature in the specified environment, may be determined by sample data provided by other than the specified environment, so that the training of the color temperature classification model may not be limited to sample data provided by the specified environment, thereby realizing the technical effect of measuring and adjusting the color temperature by applying a machine learning mode based on a small amount of color temperature adjusting data samples, and then solved prior art and can't carry out the colour temperature measurement regulation technical problem based on a small amount of colour temperature regulation data sample through the mode of machine learning.
It should be noted that the pre-classification model determines the correspondence between the picture and the color temperature category based on the model parameters.
It should be noted that the first picture in the first training data set may be a picture acquired in an environment other than the specified environment, and the first training data set may be an already published ImageNet data set (having more than 1 million pictures, more than 1000 classes).
Alternatively, the pre-classification model may be a pre-trained VGG16 model.
Alternatively, the designated environment may be a room in which the light fixtures are located.
Alternatively, the luminaire may be an LED luminaire.
Optionally, in the process of adjusting the color temperature of the lamp, after receiving a trigger instruction of a user, an environment picture of a specified environment at the current time may be taken, the color temperature category may be identified based on the environment picture at the current time, and the color temperature of the lamp may be adjusted based on the identification result of the color temperature category.
Alternatively, the user's trigger command may be identified by means of infrared sensing. For example, whether a user appears in the designated environment or not can be judged in an infrared induction mode, and when the user appears in the designated environment, a trigger instruction is generated.
As an alternative embodiment, applying the model parameters in the pre-classification model to the color temperature classification model comprises: transferring the model parameters in the pre-classification model to a preset network model to obtain an initial color temperature model; and correcting the model parameters based on a second training data set to obtain a color temperature classification model, wherein the second training data set comprises: a plurality of second pictures captured within a specified environment, and a color temperature category for each of the second pictures.
It should be noted that the second picture is an image acquired under a specified environment.
According to the technical scheme, the pre-classification model can be trained based on the first training data set, the model parameters in the pre-classification model are transferred to the initial color temperature model suitable for the specified environment, and the initial color temperature model is adjusted based on a small amount of data samples (namely, the second training data set) provided under the specified environment, so that the color temperature classification model special for the specified environment can be trained based on the small amount of data samples under the specified environment.
As an alternative embodiment, migrating the model parameters in the pre-classification model to a predetermined model template, and obtaining the initial color temperature model includes: and migrating the model parameters in other convolution layers except the last layer in the pre-classification model to a preset network model.
As an alternative embodiment, the modifying the model parameters based on the second set of training data comprises: model parameters of a last convolutional layer in the predetermined network model are trained based on the second training data set.
As an alternative embodiment, the fully-connected layer and the classifier are set after the last convolutional layer in the predetermined network model.
As an alternative embodiment, before the modifying the model parameters based on the second set of training data, the method further comprises: acquiring a plurality of second pictures within a specified environment; measuring the color temperature value of the designated environment during the acquisition of each second picture by a color temperature meter; and determining the color temperature category corresponding to each second picture based on the color temperature value corresponding to each second picture to obtain a second training data set.
As an alternative embodiment, adjusting the color temperature of the light fixtures within the designated environment based on the color temperature category of the environment picture comprises: detecting whether the color temperature category corresponding to the environment picture meets the preset color temperature requirement or not; and under the condition that the color temperature category corresponding to the environment picture does not meet the preset color temperature requirement, adjusting and specifying the color temperature of the lamps in the environment.
The invention also provides a preferred embodiment, which provides a color temperature adjusting method based on the transfer learning and the deep learning.
The color temperature adjusting method based on the migration learning and the deep learning can support the intelligent color temperature adjusting method with higher precision and higher efficiency based on the LED lamp capable of being intelligently regulated and controlled.
The color temperature adjusting method based on the transfer learning and the deep learning comprises the following steps:
step 1: and (4) outdoor image acquisition.
Optionally, 1 unobstructed high definition camera outside the building can be selected, and simultaneously, the conditions that the camera is in different positions and can rotate 360 degrees are met, video sampling in the horizontal direction at equal intervals for 1 hour is performed, and the camera is rotated forward at random by a certain degree every hour to perform video picture sampling (i.e., acquiring a second picture). While picture sampling is carried out each time, a worker uses a color temperature meter to measure a real-time color temperature value, and the whole picture sampling process lasts for 2 weeks. And (3) corresponding the measured color temperature value with the acquired picture (namely, the second picture) to form a corresponding table of the picture and the color temperature value (namely, determining the color temperature value corresponding to the second picture and each second image).
Alternatively, a color temperature range of 0-15000K may be established according to specific values of color temperature values, and 10 color temperature categories may be formed according to 1500K as one category. The training set samples of the final color temperature picture occupy 80% of the sample volume and the validation samples occupy 20%.
Step 1.1, data enhancement may be performed on the acquired picture sample (i.e. the second picture).
Because of the problem of small samples (i.e. the number of the second picture samples acquired is small) faced in picture sampling, it is necessary to use a data enhancement method to increase the sample capacity and reduce the over-fitting phenomenon.
Alternatively, the sample number of pictures required for color temperature training may be increased by using methods such as rotation (which rotates the image by a certain angle, changes the image orientation), flip transformation (which flips the image in the horizontal or vertical direction), scaling transformation (which scales down or enlarges the image) and the like on the sample picture (i.e., the second picture).
Step 1.2, the collected sample picture (i.e. the second picture) may be preprocessed.
Optionally, the pixel values of the sample picture (i.e., the second picture) may be subjected to gray level variation and normalization processing, so as to ensure that the temperature data in all dimensions are at a variation range. The formula is as follows:
wherein x isiRepresenting image pixel point values, max (x), min (x) representing maximum and minimum values of image pixels.
Step 2: the VGG16 model is pre-trained by using a transfer learning method and used for solving the problem of insufficient samples.
FIG. 2a is a VGG16 macro model diagram according to an embodiment of the present invention, as shown in FIG. 2a, including convolutional layer + ReLU, max-pooling layer, full-link layer + ReLU, and classifier.
Fig. 2b is a schematic diagram of a VGG16 model structure according to an embodiment of the present invention, and as shown in fig. 2b, the VGG16 model includes an eight-layer convolutional neural network.
Alternatively, a published ImageNet dataset (with over 1 million pictures, over 1000 classes) can be used and pre-trained on the VGG16 model. Because the VGG16 model is large, the number of model parameters to be trained is large, a server with huge computing power is needed to complete model training, the training process is complex, the requirement technology for parameter adjustment and the like is high, and time is consumed, so that the problem can be solved by using the model which is pre-trained.
And 2.1, after each convolution layer of the pre-trained VGG16 model, using a ReLu activation function to modify a linear unit for hidden layer neuron output. The formula is as follows:
f(x)=max(0,x)
the model after realizing sparseness through the ReLU can better mine relevant characteristics and fit training data.
Step 2.2, selecting input samples (x, y), wherein y is a sample class, and obtaining f of the VGG16 model through forward calculation by the convolutional neural networkc8Layer characteristics, then fc8The output of the layer is Z ═ Z1,z2,...,zk]∈RkThen, the convolutional neural network predicts the color temperature class K ∈ 1, 2., K, which is calculated by the following formula:
the final output of the pre-trained VGG16 model each value represents what the probability of each class is.
Step 2.3, using the cross entropy function as a loss function, the formula is as follows:
q (k) is 1 when k ≠ y, and q (k) is 0 when k ≠ y. Until the cross entropy function is minimized to ensure that the predicted strive label is maximized.
And 2.4, adjusting model parameters by using a gradient descent method to optimize the objective function J (f, y). The formula is as follows:
in the formula, a is a learning rate, a back propagation algorithm is adopted to perform partial derivative calculation on the two formulas, multiple iterations are performed until model parameters converge, and training is finished to obtain optimal model parameters, wherein the model parameters comprise a weight parameter W (weight) and a bias parameter b (bias).
And step 3: and establishing a color temperature classification network.
Optionally, after obtaining the optimal model parameters (i.e., the weight parameter W and the bias parameter b), all the model parameters except the model parameter corresponding to the last layer in the pre-trained VGG16 model are migrated to the classification network of the outdoor color temperature (i.e., the predetermined network model). Finally, a 10-class full connection layer is accessed. And thus constitutes an initial color temperature classification model (i.e., an initial color temperature model).
And 3.1, inputting the color temperature training sample (namely a second training data set) processed in advance in the step 1, and further fitting the extracted features. Through a color temperature training sample (namely a second training data set), model parameters of the last convolution block in the convolution neural network are adjusted, and the accuracy and the stability of classification are further improved; and continuously training the fully connected layer through the color temperature sample (namely, the second training data set), and performing fine adjustment on the model parameters by using the gradient descent method mentioned in the step 2.4.
And 3.2, setting a softmax classifier after the full connection layer. The (— infinity, + ∞) scores can be converted to a set of probabilities and their sum is a normalized function of 1, with the following specific formula:
wherein s isiThe score value of the model on the ith category for input x is represented. And the class with the highest probability is the selected class. On the other hand, after the classification result is obtained, the loss error is calculated by using the cross entropy loss function which is the same as that of the pre-training through the real class label distribution and the prediction label distribution of the color temperature sample (namely, the second picture), and the loss error is reversely transferred to each layer of parameters to be updated until the optimal color temperature classification network (namely, the color temperature classification model) is obtained. Each value finally output by the Softmax classifier represents the probability that the color temperature corresponding to the picture should be of the class.
And 4, step 4: and actually collecting indoor environment pictures, and inputting the indoor environment pictures into a trained color temperature classification network (namely a color temperature classification model).
And (4) shooting according to an indoor infrared probe to confirm whether people exist indoors. Because the specific color temperature is determined by the environment and is irrelevant to whether people exist indoors, the temperature and other external factors, only the infrared detector is needed to be added to control the switch of the LED lamp, and whether the external factors can influence the classification of the color temperature is not needed to be considered. If no person is detected and displayed by the infrared detection, the LED lamp is turned off; if the infrared detection shows that people exist, the LED lamp is turned on, and indoor environment pictures are collected.
According to the technical scheme provided by the invention, the acquired environmental picture is input into a trained VGG16 color temperature classification network (namely a color temperature classification model) after gray level change and normalization processing, the color temperature classification network is output by a softmax classifier through network learning, and the output value is the color temperature classification probability corresponding to the acquired environmental picture.
And selecting the category group with the maximum probability, and inputting the color temperature category corresponding to the category into the LED lamp through the communication module to finish intelligent control.
Fig. 3 is a schematic diagram of a color temperature adjustment method based on transfer learning and deep learning according to an embodiment of the present invention, as shown in fig. 3, the method mainly includes: the method comprises a VGG16 model pre-training part, an outdoor color temperature classification grid training part and an indoor color temperature adjusting network part based on ImageNet.
Optionally, the portion of pre-training the VGG16 model based on ImageNet comprises: collecting ImageNet data set, preprocessing image data, pre-training VGG16 model & & feature extraction, and establishing all convolutional layer parameters except the last layer, wherein the preprocessing image data further comprises: the error is optimized using a cross entropy function and the ReLU activation function is used.
Optionally, based on the ImageNet pre-trained VGG16 model portion, the outdoor color temperature image pre-trained completed VGG model may be transmitted to the trained outdoor color temperature classification grid portion.
Optionally, the color temperature classification grid part comprises: collecting an outdoor color temperature picture, preprocessing image data, training the final layer of convolution parameters & & applying pre-training VGG16 parameters as initial parameters, fully connecting layers, a Softmax classifier and finishing network training.
Wherein, the last layer of convolution parameter training & & application pre-training VGG16 parameter as the initial parameter further comprises: the ReLU activation function is used.
Wherein after the Softmax classifier, the error is optimized based on the loss function & & gradient descent.
Alternatively, the outdoor color temperature classification mesh part is trained, and the outdoor temperature application color temperature classification mesh may be transmitted to the indoor color temperature adjustment mesh part.
Optionally, the color temperature classification grid part comprises: detecting whether a person exists based on an infrared detector, and if the person does not exist, confirming to turn off the LED lamp; if the person is in the room, the LED lamp & & the indoor camera is turned on to collect images, then image preprocessing is carried out, the preprocessed images are input into the completed VGG16 network, the prediction probability is output by the Softmax classifier, the corresponding type with the highest probability is transmitted to the LED lamp, the LED and the like through the communication module, and the color temperature is adjusted to the color temperature value corresponding to the color temperature type.
According to the invention, in the color temperature adjustment, based on the problem of small samples, a transfer learning method and a deep learning method based on a VGG16 model are used, so that the whole working process is more flexible, the accuracy of the whole working process can be improved, and meanwhile, the whole working efficiency can be further improved when the problem of small sample classification is solved by the pre-trained VGG16 model. On the other hand, a picture data enhancement method is used when the problem of small samples is processed, and overfitting of the convolutional neural network is prevented.
According to still another embodiment of the present invention, there is also provided a storage medium including a stored program, wherein the program executes to perform the color temperature adjustment method of any one of the above.
According to still another embodiment of the present invention, there is also provided a processor for executing a program, wherein the program executes to perform the color temperature adjustment method of any one of the above.
According to an embodiment of the present invention, there is also provided an embodiment of a color temperature adjusting apparatus, and it should be noted that the color temperature adjusting apparatus may be configured to execute the color temperature adjusting method in the embodiment of the present invention, and the color temperature adjusting method in the embodiment of the present invention may be executed in the color temperature adjusting apparatus.
Fig. 4 is a schematic diagram of a color temperature adjusting apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus may include: a first model training unit 42, configured to train a pre-classification model of color temperature in a machine learning manner based on a first training data set, where the pre-classification model includes a plurality of convolutional layers, each convolutional layer has a corresponding model parameter, and the pre-classification model determines a correspondence between a picture and a color temperature category based on the model parameters, and the first training set includes: a plurality of first pictures, and a color temperature category of each first picture; a second model training unit 44, configured to apply the model parameters in the pre-classification model to a color temperature classification model, where the color temperature classification model is used to represent a correspondence between a second picture acquired in a specified environment and a color temperature category; the identification unit 46 is used for identifying the color temperature category corresponding to the environment picture collected in the specified environment based on the color temperature classification model; and an adjusting unit 48, configured to adjust the color temperature of the luminaire in the specified environment based on the color temperature category of the environment picture.
It should be noted that the first model training unit 42 in this embodiment may be configured to execute step S102 in this embodiment, the second model training unit 44 in this embodiment may be configured to execute step S104 in this embodiment, the identifying unit 46 in this embodiment may be configured to execute step S106 in this embodiment, and the adjusting unit 48 in this embodiment may be configured to execute step S108 in this embodiment. The modules are the same as the corresponding steps in the realized examples and application scenarios, but are not limited to the disclosure of the above embodiments.
In the embodiment of the invention, the pre-classification model can be trained in a machine learning manner based on a large number of data samples in the first training data set; then, based on the corresponding model parameters of each convolution layer in the trained pre-classification model, the color temperature classification model is applied to the color temperature classification model used for detecting the color temperature category under the appointed environment, a color temperature class of the environmental picture taken at each time instant within the specified environment may be detected based on the color temperature classification model, and the color temperature of the lamps in the specified environment is classified based on the color temperature category of the environment picture, so that the color temperature classification model is specially used for the color temperature in the specified environment, may be determined by sample data provided by other than the specified environment, so that the training of the color temperature classification model may not be limited to sample data provided by the specified environment, thereby realizing the technical effect of measuring and adjusting the color temperature by applying a machine learning mode based on a small amount of color temperature adjusting data samples, and then solved prior art and can't carry out the colour temperature measurement regulation technical problem based on a small amount of colour temperature regulation data sample through the mode of machine learning.
As an alternative embodiment, the second model training unit comprises: the migration module is used for migrating the model parameters in the pre-classification model to a preset network model to obtain an initial color temperature model; and the correction module is used for correcting the model parameters based on a second training data set to obtain a color temperature classification model, wherein the second training data set comprises: a plurality of second pictures captured within a specified environment, and a color temperature category for each of the second pictures.
As an alternative embodiment, the migration module includes: and the migration submodule is used for migrating the model parameters in other convolution layers except the last layer in the pre-classification model to a preset network model.
As an alternative embodiment, the modification module includes: and the correction submodule is used for training the model parameters of the last convolutional layer in the preset network model based on the second training data set.
As an alternative embodiment, the fully-connected layer and the classifier are set after the last convolutional layer in the predetermined network model.
As an alternative embodiment, the adjusting unit comprises: a first picture acquisition unit for acquiring a plurality of second pictures within the specified environment before the model parameters are modified based on the second training data set; the color temperature measuring unit is used for measuring the color temperature value of the designated environment during the acquisition of each second picture through the color temperature measuring meter; and the determining unit is used for determining the color temperature category corresponding to each second picture based on the color temperature value corresponding to each second picture to obtain a second training data set.
As an optional embodiment, the adjusting unit further comprises: the judging module is used for detecting whether the color temperature category corresponding to the environment picture meets the requirement of the preset color temperature; and the adjusting module is used for calling and setting the color temperature of the lamps in the designated environment under the condition that the color temperature category corresponding to the environment picture does not meet the preset color temperature requirement.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (10)
1. A color temperature adjustment method, comprising:
training a pre-classification model of color temperature by means of machine learning based on a first training data set, wherein the pre-classification model comprises a plurality of convolutional layers, each convolutional layer having corresponding model parameters, and the first training set comprises: a plurality of first pictures, and a color temperature category of each first picture;
applying model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for indicating the corresponding relation between a second picture acquired in a specified environment and a color temperature category;
identifying a color temperature category corresponding to an environmental picture acquired within the specified environment based on the color temperature classification model;
adjusting a color temperature of a luminaire within the specified environment based on a color temperature category of the environment picture.
2. The method of claim 1, wherein applying the model parameters in the pre-classification model to a color temperature classification model comprises:
transferring the model parameters in the pre-classification model to a preset network model to obtain an initial color temperature model;
correcting the model parameters based on a second training data set to obtain the color temperature classification model, wherein the second training data set comprises: a plurality of second pictures taken within the specified environment, and a color temperature category for each second picture.
3. The method of claim 2, wherein migrating the model parameters in the pre-classification model to a predetermined model template to obtain an initial color temperature model comprises:
and migrating the model parameters in other convolution layers except the last layer in the pre-classification model to the preset network model.
4. The method of claim 3, wherein modifying the model parameters based on a second set of training data comprises:
and training the model parameters of the last convolutional layer in the predetermined network model based on the second training data set.
5. The method according to any of claims 2-4, wherein a fully connected layer and a classifier are provided after the last convolutional layer in the predetermined network model.
6. The method of claim 2, wherein prior to modifying the model parameters based on a second set of training data, the method further comprises:
capturing a plurality of second pictures within the specified environment;
measuring the color temperature value of the designated environment when each second picture is collected by a color temperature meter;
and determining the color temperature category corresponding to each second picture based on the color temperature value corresponding to each second picture to obtain the second training data set.
7. The method of claim 1, wherein adjusting the color temperature of a luminaire within the specified environment based on the color temperature category of the environment picture comprises:
detecting whether the color temperature category corresponding to the environment picture meets the preset color temperature requirement or not;
and under the condition that the color temperature category corresponding to the environment picture does not meet the preset color temperature requirement, adjusting the color temperature of the lamps in the specified environment.
8. A color temperature adjusting apparatus, characterized by comprising:
a first model training unit, configured to train a pre-classification model of color temperature in a machine learning manner based on a first training data set, where the pre-classification model includes a plurality of convolutional layers, each convolutional layer having a corresponding model parameter, and the first training set includes: a plurality of first pictures, and a color temperature category of each first picture;
the second model training unit is used for applying the model parameters in the pre-classification model to a color temperature classification model, wherein the color temperature classification model is used for indicating the corresponding relation between a second picture acquired in a specified environment and a color temperature class;
the identification unit is used for identifying a color temperature category corresponding to the environmental picture collected in the specified environment based on the color temperature classification model;
and the adjusting unit is used for adjusting the color temperature of the lamps in the specified environment based on the color temperature category of the environment picture.
9. A storage medium, characterized in that the storage medium includes a stored program, wherein when the program is executed, a device in which the storage medium is located is controlled to execute the color temperature adjustment method according to any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is run to perform the color temperature adjustment method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010451708.4A CN111601418B (en) | 2020-05-25 | 2020-05-25 | Color temperature adjusting method and device, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010451708.4A CN111601418B (en) | 2020-05-25 | 2020-05-25 | Color temperature adjusting method and device, storage medium and processor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111601418A true CN111601418A (en) | 2020-08-28 |
CN111601418B CN111601418B (en) | 2022-11-22 |
Family
ID=72186231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010451708.4A Active CN111601418B (en) | 2020-05-25 | 2020-05-25 | Color temperature adjusting method and device, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111601418B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112188694A (en) * | 2020-09-29 | 2021-01-05 | 上海佳勒电子有限公司 | Lamplight color temperature correction method, system and device and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120327264A1 (en) * | 2010-06-09 | 2012-12-27 | International Business Machines Corporation | Real-Time Adjustment Of Illumination Color Temperature For Digital Imaging Applications |
CN105869580A (en) * | 2016-06-15 | 2016-08-17 | 京东方科技集团股份有限公司 | Color temperature adjusting method and device, backlight source and display equipment |
CN107452315A (en) * | 2017-08-04 | 2017-12-08 | 广东欧珀移动通信有限公司 | Color temperature adjusting method, device, mobile terminal and electric terminal, system |
CN107506775A (en) * | 2016-06-14 | 2017-12-22 | 北京陌上花科技有限公司 | model training method and device |
US10049302B1 (en) * | 2017-07-17 | 2018-08-14 | Sas Institute Inc. | Classification system training |
US20190095764A1 (en) * | 2017-09-26 | 2019-03-28 | Panton, Inc. | Method and system for determining objects depicted in images |
CN109726287A (en) * | 2018-12-25 | 2019-05-07 | 银江股份有限公司 | A kind of people's mediation case classification system and method based on transfer learning and deep learning |
CN109858376A (en) * | 2019-01-02 | 2019-06-07 | 武汉大学 | A kind of intelligent desk lamp with child healthy learning supervisory role |
CN109874202A (en) * | 2018-12-29 | 2019-06-11 | 中国计量大学 | The adaptive lighting system of kindergarten one classroom scene type, control device and control method |
CN110111341A (en) * | 2019-04-30 | 2019-08-09 | 北京百度网讯科技有限公司 | Display foreground acquisition methods, device and equipment |
CN110807760A (en) * | 2019-09-16 | 2020-02-18 | 北京农业信息技术研究中心 | Tobacco leaf grading method and system |
-
2020
- 2020-05-25 CN CN202010451708.4A patent/CN111601418B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120327264A1 (en) * | 2010-06-09 | 2012-12-27 | International Business Machines Corporation | Real-Time Adjustment Of Illumination Color Temperature For Digital Imaging Applications |
CN107506775A (en) * | 2016-06-14 | 2017-12-22 | 北京陌上花科技有限公司 | model training method and device |
CN105869580A (en) * | 2016-06-15 | 2016-08-17 | 京东方科技集团股份有限公司 | Color temperature adjusting method and device, backlight source and display equipment |
US10049302B1 (en) * | 2017-07-17 | 2018-08-14 | Sas Institute Inc. | Classification system training |
CN107452315A (en) * | 2017-08-04 | 2017-12-08 | 广东欧珀移动通信有限公司 | Color temperature adjusting method, device, mobile terminal and electric terminal, system |
US20190095764A1 (en) * | 2017-09-26 | 2019-03-28 | Panton, Inc. | Method and system for determining objects depicted in images |
CN109726287A (en) * | 2018-12-25 | 2019-05-07 | 银江股份有限公司 | A kind of people's mediation case classification system and method based on transfer learning and deep learning |
CN109874202A (en) * | 2018-12-29 | 2019-06-11 | 中国计量大学 | The adaptive lighting system of kindergarten one classroom scene type, control device and control method |
CN109858376A (en) * | 2019-01-02 | 2019-06-07 | 武汉大学 | A kind of intelligent desk lamp with child healthy learning supervisory role |
CN110111341A (en) * | 2019-04-30 | 2019-08-09 | 北京百度网讯科技有限公司 | Display foreground acquisition methods, device and equipment |
CN110807760A (en) * | 2019-09-16 | 2020-02-18 | 北京农业信息技术研究中心 | Tobacco leaf grading method and system |
Non-Patent Citations (2)
Title |
---|
M. HAJJAJ: "Towards Smart Lighting System without Using Chroma Meter in Workplace", 《2018 IEEE 7TH GLOBAL CONFERENCE ON CONSUMER ELECTRONICS (GCCE)》 * |
王香娟: "LED家居室内照明光色设计", 《照明工程学报》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112188694A (en) * | 2020-09-29 | 2021-01-05 | 上海佳勒电子有限公司 | Lamplight color temperature correction method, system and device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111601418B (en) | 2022-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111274860B (en) | Recognition method for online automatic tobacco grade sorting based on machine vision | |
CN108921203B (en) | Detection and identification method for pointer type water meter | |
CN107229930B (en) | Intelligent identification method for numerical value of pointer instrument | |
CN106875373B (en) | Mobile phone screen MURA defect detection method based on convolutional neural network pruning algorithm | |
CN109325495B (en) | Crop image segmentation system and method based on deep neural network modeling | |
CN108875522A (en) | Face cluster methods, devices and systems and storage medium | |
CN105303150B (en) | Realize the method and system of image procossing | |
CN109886153B (en) | Real-time face detection method based on deep convolutional neural network | |
CN110826453A (en) | Behavior identification method by extracting coordinates of human body joint points | |
CN106250819A (en) | Based on face's real-time monitor and detection facial symmetry and abnormal method | |
CN106874929B (en) | Pearl classification method based on deep learning | |
CN114359727A (en) | Tea disease identification method and system based on lightweight optimization Yolo v4 | |
CN116058195B (en) | Illumination regulation and control method, system and device for leaf vegetable growth environment | |
CN108604040A (en) | Capturing images for use in facial recognition through efficient use of exposure management | |
CN113688787A (en) | Peanut leaf disease identification method | |
CN113419623A (en) | Non-calibration eye movement interaction method and device | |
CN109919246A (en) | Pedestrian's recognition methods again based on self-adaptive features cluster and multiple risks fusion | |
CN116321620A (en) | Intelligent lighting switch control system and method thereof | |
CN111601418B (en) | Color temperature adjusting method and device, storage medium and processor | |
CN116996771A (en) | Automatic shooting control device and control method based on multiple sensors and deep reinforcement learning | |
CN108960413A (en) | A kind of depth convolutional neural networks method applied to screw surface defects detection | |
CN112115826A (en) | Face living body detection method and system based on bilateral branch network | |
CN113256733B (en) | Camera spectral sensitivity reconstruction method based on confidence voting convolutional neural network | |
CN103235943A (en) | Principal component analysis-based (PCA-based) three-dimensional (3D) face recognition system | |
CN111898525B (en) | Construction method of smoke identification model, and method and device for detecting smoke |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201012 Address after: Room 410, 4 / F, Boyan science and technology building, No.7 building, East District, No.10 courtyard, northwest Wangdong Road, Haidian District, Beijing 100193 Applicant after: Boyan colorful Data Technology Co.,Ltd. Address before: 401120 building 18, No.106, west section of Jinkai Avenue, Yubei District, Chongqing Applicant before: Boyan Jizhi Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |