CN113645457A - Method, device, equipment and storage medium for automatic debugging - Google Patents

Method, device, equipment and storage medium for automatic debugging Download PDF

Info

Publication number
CN113645457A
CN113645457A CN202111194767.9A CN202111194767A CN113645457A CN 113645457 A CN113645457 A CN 113645457A CN 202111194767 A CN202111194767 A CN 202111194767A CN 113645457 A CN113645457 A CN 113645457A
Authority
CN
China
Prior art keywords
image
gene
chromosome
chromosomes
parameter
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
Application number
CN202111194767.9A
Other languages
Chinese (zh)
Other versions
CN113645457B (en
Inventor
杨洋
谢剑
汪紫超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Imilab Technology Co Ltd
Original Assignee
Shanghai Chuangmi Technology Co ltd
Beijing Chuangmizhihui Iot Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuangmi Technology Co ltd, Beijing Chuangmizhihui Iot Technology Co ltd filed Critical Shanghai Chuangmi Technology Co ltd
Priority to CN202111194767.9A priority Critical patent/CN113645457B/en
Publication of CN113645457A publication Critical patent/CN113645457A/en
Application granted granted Critical
Publication of CN113645457B publication Critical patent/CN113645457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Genetics & Genomics (AREA)
  • Physiology (AREA)
  • Apparatus Associated With Microorganisms And Enzymes (AREA)

Abstract

The present disclosure provides a method, an apparatus, a device and a storage medium for automatically debugging related parameters of an image signal processor. The method comprises the following steps: obtaining the current gene characteristics of each gene in N D-th generation chromosomes; the D generation chromosome can characterize the gene characteristics of all the contained genes; obtaining the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene characteristics of each gene in the ith D-th generation chromosome; acquiring a first image corresponding to the ith D-th generation chromosome from the image signal processor to obtain N first images; comparing the image characteristics of the first image with the image characteristics of each reference image in a preset reference image group to obtain a matching value of the first image; and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.

Description

Method, device, equipment and storage medium for automatic debugging
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method, an apparatus, a device, and a storage medium for automatically debugging related parameters of an image signal processor.
Background
An Image Signal Processor (ISP) is one of the core components in an Image capturing system, and has the main functions of performing relevant post-processing on the original Signal output by the Image capturing hardware, such as black level correction, noise removal, dead pixel removal, white balance, color correction, and the like.
However, in practical applications, relevant parameters in the ISP are closely connected to the image acquisition hardware, and when any part in the image acquisition hardware changes, even after the whole hardware is replaced, if the image effect output by the ISP does not change significantly, the parameters of the ISP need to be debugged, but the existing debugging mode is that an ISP engineer debugs hundreds of sets of parameters manually in a laboratory according to manual experience, and obviously, the efficiency is reduced.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device and a storage medium for automatically debugging related parameters of an image signal processor, so as to at least solve the above technical problems.
In a first aspect, the present disclosure provides a method for automatically debugging related parameters of an image signal processor, including:
obtaining the current gene characteristics of each gene in N D-th generation chromosomes; the D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter set of the image signal processor, and the parameters corresponding to different genes are different; the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome and chromosomes meeting the hybridization requirement in the D-1 generation chromosome; n is an integer greater than or equal to 2; d is an integer greater than or equal to 2;
Obtaining the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene characteristics of each gene in the ith D-th generation chromosome; wherein i is an integer greater than or equal to 1 and less than or equal to N;
acquiring a first image corresponding to the ith D-th generation chromosome from the image signal processor to obtain N first images; the first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor;
comparing the image characteristics of the first image with the image characteristics of a reference image in a preset reference image group to obtain a matching value of the first image;
and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
In a possible implementation manner, the selecting a target first image whose matching value meets a preset requirement includes:
Under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; alternatively, the first and second electrodes may be,
under the condition that a termination condition is not met, Q middle first images with matching values meeting iteration requirements are selected from the N first images; at least continuing to perform hybridization processing on chromosomes corresponding to each intermediate first image in the Q intermediate first images to obtain D + 1-generation chromosomes, and repeating the steps to determine matching values of the images corresponding to the D + 1-generation chromosomes until the target first image with the matching value meeting preset requirements is selected under the condition that a termination condition is met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
In a possible implementation manner, the performing hybridization on at least chromosomes corresponding to each of the Q intermediate first images to obtain a D +1 th generation chromosome includes:
deleting chromosomes, of which the matching values of the images corresponding to the chromosomes do not meet the iteration requirement, from the D-th generation chromosomes so that all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement;
selecting any two chromosomes from all chromosomes meeting the hybridization requirement in the D-th generation chromosome for hybridization to obtain a filial generation chromosome of the D-th generation chromosome;
And taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
In one possible implementation, the method further includes:
determining a related parameter group of an image signal processor to be debugged;
taking each parameter in the related parameter group as a gene;
determining M initial parameter characteristics of each parameter in the related parameter group to obtain M initial gene characteristics of each gene so as to obtain M first generation chromosomes; the first generation chromosome contains the same number of genes as the number of parameters in the set of related parameters.
In one possible implementation, the obtaining M initial gene features of each of the genes includes:
directly taking the initial parameter characteristics of each parameter in the related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics; alternatively, the first and second electrodes may be,
carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics.
In one possible implementation, the step of hybridizing comprises:
selecting any two chromosomes meeting the hybridization requirement;
hybridizing the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after hybridization as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome;
wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
In one possible implementation manner, the hybridizing the gene characteristics of the alleles in the two selected chromosomes includes:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj);
yj’=βyj+(1-ɑxj);
wherein, the gene X in the chromosome XjWith gene Y in said chromosome YjIs an orthotopic gene; gene X in the next generation chromosome of said chromosome Xj', the gene X in the chromosome X jAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
In one possible implementation, the method further includes:
and after hybridization treatment is carried out to obtain the next generation chromosome, carrying out gene mutation treatment on the obtained next generation chromosome so that the chromosome after mutation treatment meets the preset mutation requirement to obtain the next generation chromosome.
In one possible implementation, the method further includes:
acquiring a plurality of reference images representing different scenes, and forming the reference images into a preset reference image group;
determining the weight of each reference image based on the importance degree of different scenes;
the first image comprises a plurality of sub-images corresponding to different scenes;
the comparing the image features of the first image with the image features of the reference images in a preset reference image group to obtain the matching value of the first image includes:
comparing the image characteristics of the sub-images under the same scene with the image characteristics of the reference image to obtain a plurality of intermediate matching values;
And weighting the plurality of intermediate matching values based on the weight of the reference image to obtain the matching value of the first image.
In one possible implementation, the image features include at least one of the following dimensions: image details, image definition, color reduction and color depth; white balance;
the method further comprises the following steps: determining the weight corresponding to the image characteristics of each dimension;
wherein, comparing the sub-image under the same scene with the reference image comprises:
comparing the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result;
and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
In a second aspect, the present disclosure provides an automated debugging apparatus, comprising:
the gene characteristic processing unit is used for acquiring the current gene characteristics of each gene in the N D-th generation chromosomes; the D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter set of the image signal processor, and the parameters corresponding to different genes are different; the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome and chromosomes meeting the hybridization requirement in the D-1 generation chromosome; n is an integer greater than or equal to 2; d is an integer greater than or equal to 2;
The parameter feature processing unit is used for obtaining the current parameter features of all parameters in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene features of all genes in the ith D-th generation chromosome; wherein i is an integer greater than or equal to 1 and less than or equal to N;
a target parameter characteristic determining unit, configured to obtain, from the image signal processor, a first image corresponding to the ith D-th generation chromosome to obtain N first images; the first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor; comparing the image characteristics of the first image with the image characteristics of a reference image in a preset reference image group to obtain a matching value of the first image; and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
In a possible implementation manner, the target parameter characteristic determining unit is further configured to:
Under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; alternatively, the first and second electrodes may be,
under the condition that a termination condition is not met, Q middle first images with matching values meeting iteration requirements are selected from the N first images; at least continuing to perform hybridization processing on chromosomes corresponding to each intermediate first image in the Q intermediate first images to obtain D + 1-generation chromosomes, and repeating the steps to determine matching values of the images corresponding to the D + 1-generation chromosomes until the target first image with the matching value meeting preset requirements is selected under the condition that a termination condition is met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
In a possible implementation manner, the target parameter characteristic determining unit is further configured to:
deleting chromosomes, of which the matching values of the images corresponding to the chromosomes do not meet the iteration requirement, from the D-th generation chromosomes so that all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement;
selecting any two chromosomes from all chromosomes meeting the hybridization requirement in the D-th generation chromosome for hybridization to obtain a filial generation chromosome of the D-th generation chromosome;
And taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
In one possible implementation manner, the method further includes:
the initial gene characteristic determining unit is used for determining a related parameter group of the image signal processor to be debugged; taking each parameter in the related parameter group as a gene; determining M initial parameter characteristics of each parameter in the related parameter group to obtain M initial gene characteristics of each gene so as to obtain M first generation chromosomes; the first generation chromosome contains the same number of genes as the number of parameters in the set of related parameters.
In a possible implementation manner, the initial gene feature determination unit is further configured to:
directly taking the initial parameter characteristics of each parameter in the related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics; alternatively, the first and second electrodes may be,
carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics.
In a possible implementation manner, the gene characteristic processing unit is also used for carrying out hybridization processing; the step of hybridization treatment comprises:
selecting any two chromosomes meeting the hybridization requirement;
hybridizing the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after hybridization as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome;
wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
In a possible implementation manner, the gene feature processing unit is further configured to:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj);
yj’=βyj+(1-ɑxj);
wherein, the gene X in the chromosome XjWith gene Y in said chromosome YjIs an orthotopic gene; gene X in the next generation chromosome of said chromosome Xj', the gene X in the chromosome X jAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
In a possible implementation manner, the gene feature processing unit is further configured to:
and after hybridization treatment is carried out to obtain the next generation chromosome, carrying out gene mutation treatment on the obtained next generation chromosome so that the chromosome after mutation treatment meets the preset mutation requirement to obtain the next generation chromosome.
In a possible implementation, the apparatus further comprises a reference image determination unit; wherein the content of the first and second substances,
the reference image determining unit is used for acquiring a plurality of reference images representing different scenes and forming the reference images into the preset reference image group; determining the weight of each reference image based on the importance degree of different scenes;
the target parameter characteristic determining unit is further configured to compare image characteristics of the sub-images in the same scene with image characteristics of the reference image to obtain a plurality of intermediate matching values; weighting the intermediate matching values based on the weight of the reference image to obtain the matching value of the first image; the first image comprises a plurality of sub-images corresponding to different scenes.
In one possible implementation, the image features include at least one of the following dimensions: image details, image definition, color reduction and color depth; white balance; wherein the apparatus further comprises: an image feature weighting unit; wherein the content of the first and second substances,
the image feature weighting unit is used for determining the weight corresponding to the image feature of each dimension;
the target parameter characteristic determining unit is further configured to compare the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result; and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
In a third aspect, the present disclosure provides an electronic device, comprising:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more computer programs, wherein the one or more computer programs are stored in the memory, which when executed by the electronic device, cause the electronic device to perform the method provided by the first aspect above.
In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the method provided by the first aspect.
The technical scheme provided by the disclosure at least comprises the following beneficial effects:
therefore, according to the scheme of the application, a group of reference images (namely the preset reference image group) is used as a target, the parameter group (namely the related parameter group) of the ISP is automatically adjusted, so that the target parameter characteristics of each parameter in the parameter group of the ISP are obtained, and then the target image (namely the target first image) with the target style (namely matched with the preset parameter image group) can be output after the original signal is processed based on the target parameter characteristics.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
FIG. 1 is a schematic flow chart illustrating an implementation of a method for automatically debugging related parameters of an image signal processor according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a method for automatically debugging parameters of an image signal processor according to an embodiment of the present disclosure in a specific example;
FIG. 3 is a schematic flow chart illustrating a method for automatically debugging parameters related to an image signal processor according to an embodiment of the present disclosure, in a specific example, obtaining a matching value;
FIG. 4 is a schematic structural diagram illustrating an apparatus for automatically debugging parameters related to an image signal processor according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device implementing a method for automatically debugging related parameters of an image signal processor according to an embodiment of the present disclosure.
Detailed Description
The present disclosure will be described in further detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, circuits, etc., that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
For example, in one specific example, the ISP includes: black level correction, dead pixel correction, color interpolation, white balance correction, color correction, Gamma correction, RGB to YUV conversion, digital noise reduction, image enhancement processing, video format conversion and the like. Moreover, each module has a large number of parameters that need to be adjusted to accommodate the characteristics of different image acquisition hardware, such as lenses and image sensors. Parameter debugging is therefore a time consuming and laborious process. Moreover, parameters of the modules in the ISP can affect each other after being changed, so that it is very difficult to find the optimal parameters in the manual debugging process.
Based on the above, the present application provides a method, an apparatus, a device and a storage medium for automatically debugging related parameters of an image signal processor. Specifically, the genetic algorithm is introduced in the scheme of the application, parameter debugging is realized by simulating the evolution law of nature organisms, and the excellent gene characteristics are ensured to be continuously evolved by cross evolution (namely hybridization treatment) so as to be inherited to the next generation, so that the optimal parameter value is obtained, and thus, the automatic debugging process is realized, and the process is efficient.
Specifically, fig. 1 is a schematic implementation flow diagram of a method for automatically debugging related parameters of an image signal processor according to an embodiment of the present disclosure. As shown in fig. 1, the method includes:
step S101: obtaining the current gene characteristics of each gene in N D-th generation chromosomes; n is an integer greater than or equal to 2; and D is an integer greater than or equal to 2.
The D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter group of the image signal processor, and the parameters corresponding to different genes are different; for example, each parameter in the related parameter set of the image signal processor corresponds to a gene one by one, so that a genome corresponding to the related parameter set is obtained, and the genome can form a chromosome.
In the scheme of the application, the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and specifically, the D-th generation chromosome comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome; that is, the D-th generation chromosome is an offspring chromosome carrying the gene characteristics of the parent chromosome, and the offspring chromosome is obtained after the hybridization treatment of the parent chromosome; in other words, the D-th generation chromosomes include chromosomes obtained based on genetic evolution, which carry the genetic characteristics of the parent generation. Meanwhile, the D-th generation chromosomes also comprise chromosomes meeting the hybridization requirement in the D-1 generation chromosomes, namely, the D-th generation chromosomes not only comprise offspring chromosomes obtained after hybridization treatment of parent chromosomes (namely, D-1 generation chromosomes) but also comprise excellent chromosomes in the parent chromosomes (namely, D-1 generation chromosomes), so that in the genetic evolution process, on one hand, the excellent gene characteristics (namely, parameter characteristics) of the previous generation can be ensured to be inherited, and simultaneously, the excellent gene characteristics (namely, parameter characteristics) of the previous generation can be prevented from being lost in the genetic process, in other words, the optimal parameter values are prevented from being lost, and thus, the foundation is laid for obtaining the optimal parameter values.
For example, the initial chromosome is taken as a first generation chromosome for illustration; the method specifically comprises the following steps:
selecting excellent chromosomes from the first generation chromosomes, namely selecting chromosomes meeting the hybridization requirement, and deleting chromosomes which do not meet the hybridization requirement;
selecting any two chromosomes from the first generation chromosomes meeting the hybridization requirement, namely selecting any two initial chromosomes meeting the hybridization requirement, and carrying out hybridization treatment to obtain offspring chromosomes;
using the offspring chromosomes of the obtained first generation chromosomes and the excellent chromosomes (namely the chromosomes meeting the hybridization requirements) in the first generation chromosomes as second generation chromosomes;
selecting excellent chromosomes from the second generation chromosomes, namely selecting the second generation chromosomes meeting the hybridization requirement, and deleting the chromosomes which do not meet the hybridization requirement;
selecting any two second generation chromosomes from the second generation chromosomes meeting the hybridization requirement, and carrying out hybridization treatment to obtain offspring chromosomes of the second generation chromosomes;
using the obtained offspring chromosomes of the second generation chromosomes and good chromosomes (namely chromosomes meeting the hybridization requirements) in the second generation chromosomes as third generation chromosomes;
And so on to obtain the D-th generation chromosome.
Here, it should be noted that whether the chromosome meets the hybridization requirement may be determined based on the matching value of the image corresponding to the chromosome, for example, in the case that the matching value of the image corresponding to the chromosome meets the iteration requirement, the chromosome is determined to meet the hybridization requirement, and the genetic operation may be performed; in other words, the chromosomes corresponding to the images which are more matched with the reference image are allowed to be inherited, so that a foundation is laid for obtaining the optimal parameter values, and the optimal matching degree between the images obtained based on the optimal parameter values and the reference image is further ensured.
Here, it should be noted that the child and the parent described in the present application are relative concepts, and are not used for specific purposes; for example, two first generation chromosomes are crossed to obtain a second generation chromosome, and in this case, the second generation chromosome may be referred to as a progeny chromosome of the first generation chromosome; and the first generation chromosomes may be referred to as parent chromosomes of the second generation chromosomes; similarly, for a third generation chromosome obtained by crossing two second generation chromosomes, the second generation chromosome can be a parent chromosome of the third generation chromosome, and the third generation chromosome can be a child chromosome of the second generation chromosome.
In a specific example, the related parameter set of the image signal processor may include a parameter having certainty in the image signal processor, for example, a parameter having a certain physical meaning; of course, superparameters that are not obvious in physical meaning may also be included, which is not limited in the present disclosure. Here, since the relevant parameter set is not limited in the present application, in other words, the relevant parameter set in the present application may further include the hyper-parameter, so that the problem that the hyper-parameter cannot be effectively and specifically debugged by the existing manual work is solved, and the precise and efficient debugging of the hyper-parameter is realized.
Therefore, the method and the device for adjusting the super-parameters can automatically adjust the parameters with the physical meanings and can also adjust the super-parameters without specific physical meanings, so that the automatic parameter adjustment is realized on one hand, and the problem that the existing super-parameters cannot be accurately and pertinently adjusted is solved on the other hand.
In a specific example of the present embodiment, the initial chromosome, i.e., the first generation chromosome, can be obtained as follows; the method specifically comprises the following steps: determining a related parameter group of an image signal processor to be debugged; taking each parameter in the related parameter group as a gene so as to enable each parameter in the related parameter group to correspond to the gene one by one; determining M initial parameter characteristics of each parameter in the related parameter group, and taking the initial parameter characteristics of each parameter as the initial gene characteristics of each gene respectively to obtain M first generation chromosomes; here, the number of genes included in the first generation chromosome is the same as the number of parameters in the relevant parameter set. That is, one parameter corresponds to one gene; and the initial parameter characteristics of the parameters are taken as the initial parameter characteristics of the genes, so that M initial gene characteristics of the genes can be obtained, and M first generation chromosomes can be obtained. In practical application, the values of the same parameters in different first generation chromosomes may be the same or different. However, there are no two first generation chromosomes with identical gene characteristics.
For example, the related parameter set includes Z (positive integer greater than or equal to 2) parameters, and in this case, since the genes correspond to the parameters one by one, Z genes are obtained, and the Z genes constitute one chromosome, in other words, one chromosome includes Z genes, for example, chromosome X can be expressed as (X)1,x2,…,xp,…,xz),xpA gene characterizing the p-th position in chromosome X, p being a positive integer of 1 or more and Z or less. At this time, during initialization, the initial parameter features include Z parameter values, which correspond to the parameters one-to-one, and the parameter values correspond to the gene values one-to-one, so that M initial parameter features correspond to M sets of parameter values (each set of parameter values includes Z parameter values), and further correspond to M first generation chromosomes.
Here, the parameter feature described in the present application may specifically characterize the meaning of the parameter, and the parameter value of the parameter; accordingly, the gene characteristics specifically characterize the location information of the gene, and the value of the gene. Of course, in practical applications, for simplicity, the parameter characteristics and the gene characteristics may be both specific numerical values.
It should be noted that the gene characteristics, such as the numerical value, of the gene in the chromosome will vary with the inheritance, but the meaning of the gene, i.e., the meaning of the parameter, will not vary, e.g., gene x pCharacterizing the p-th gene in chromosome X, wherein the value of the p-th gene may change during the genetic process, but the parameter corresponding to the p-th gene is not changed, i.e., the meaning of the parameter corresponding to the p-th gene is not changed.
In a specific example of the present application, the following method may be adopted to obtain M initial gene features of each of the genes, including:
the first method is as follows: directly using the initial parameter characteristics of each parameter in the related parameter set as the initial gene characteristics of each gene to obtain M initial gene characteristics, i.e., the parameters and the genes are combinedAfter one-to-one correspondence, the initial parameter characteristics of the parameters are directly used as the initial gene characteristics of the genes corresponding to the parameters. For example, the value of the parameter is directly used as the gene xpThe value of (a).
The second method comprises the following steps: carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics. That is, after the parameters are in one-to-one correspondence with the genes, the initial parameter features of the parameters are not directly used as the initial gene features of the genes corresponding to the parameters, but are subjected to standardization processing, so that the processed values are within a preset value range, and then the processed initial parameter features of the parameters are used as the initial gene features of the genes corresponding to the parameters. For example, the value of the processed parameter is controlled between 0 and 1, and at this time, the gene x pIs also between 0 and 1.
In practical applications, the above two modes are performed alternatively, and the present application is not limited thereto.
Step S102: obtaining the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene characteristics of each gene in the ith D-th generation chromosome; wherein i is an integer of 1 or more and N or less. That is, based on the gene characteristics of each gene in the chromosome, the parameter characteristics of each parameter in the relevant parameter set corresponding to the chromosome are obtained. Therefore, a foundation is laid for subsequent processing of the original signal.
Step S103: acquiring a first image corresponding to the ith D-th generation chromosome from the image signal processor to obtain N first images; here, because there are N D-th generation chromosomes, and each current chromosome corresponds to a set of parameter values of the related parameter set, and further corresponds to the parameter values of the N sets of related parameter sets; further, the parameter value of each set of related parameter group can obtain the first image, and thus, N first images are obtained.
The first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the relevant parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor.
In a specific example, the image acquisition hardware may specifically comprise at least one of the following components: image sensor, camera lens, light filling lamp.
Step S104: and comparing the image characteristics of the first image with the image characteristics of the reference images in a preset reference image group to obtain the matching value of the first image.
In a specific example of the scheme of the application, the preset reference image group may be obtained by the following method; specifically, the method further comprises the following steps:
acquiring a plurality of reference images representing different scenes, and forming the reference images into a preset reference image group; here, a scene may be selected based on actual requirements, and then a reference image corresponding to the scene is determined, for example, one scene obtains one reference image.
Further, determining the weight of each reference image based on the importance degree of different scenes; for example, the more the desired image matches the image in which scene, the more important the reference image in which scene is, in which case the weight of the important scene may be set relatively large, and conversely, the weight corresponding to the unimportant scene may be set relatively small. Of course, the actual application can also be set based on actual requirements, and the scheme of the present application is not limited to this.
Here, in order to match the images obtained based on the genetic features with the reference image from different scenes, a plurality of sub-images may be obtained as the first image from different scenes; in other words, the first image includes a plurality of sub-images, and each sub-image may correspond to one scene.
Correspondingly, the comparing the image feature of the first image with the image feature of the reference image in the preset reference image group to obtain the matching value of the first image specifically includes:
comparing the image features of the sub-images in the same scene with the image features of the reference image to obtain a plurality of intermediate matching values, for example, comparing the sub-image in each scene with the reference image in the scene, and each scene corresponds to one intermediate matching value; further, based on the weight of the reference image, weighting processing is performed on the plurality of intermediate matching values to obtain the matching value of the first image. Therefore, the matching value of the first image obtained by the scheme is the comprehensive score, the scene requirement is fully considered by the comprehensive score, and a foundation is laid for outputting the image meeting the scene requirement to the maximum extent.
For example, based on the scene requirements, four scenes, namely a natural light environment, a fluorescent light environment, a dark light environment and a backlight environment, can be set, and the weights of the four scenes can be set; for example, light environments corresponding to the four scenes are set in a laboratory scene, so as to obtain reference images in the four scenes, and correspondingly, the obtained first image also includes sub-images (for example, original signals are obtained in the four scenes), that is, four sub-images, corresponding to the four scenes, so as to compare the sub-images in each scene with the reference images in the scenes, so as to obtain four intermediate matching values, and then the four intermediate matching values are weighted, so as to obtain the matching value of the first image.
Here, in the process of selecting a good chromosome, a matching value may be obtained based on the exemplary method, and a good gene may be selected based on the matching value. For example, the matching values are sorted from large to small, the first preset number of matching values are used as the matching values of the images meeting the iteration requirement, and accordingly, the chromosome corresponding to the image meeting the iteration requirement can be determined as the excellent chromosome. Alternatively, a threshold may be set, and an image corresponding to a matching value greater than or equal to the threshold is determined as an image that meets the iteration requirement, and accordingly, a chromosome corresponding to the image that meets the iteration requirement may be determined as a good chromosome. Of course, in practical application, other screening methods can be provided, and the scheme of the application is not limited to this.
In a specific example of the present application, the image feature includes at least one of the following dimensions: image details, image sharpness, color rendition, color depth, white balance; of course, other dimensions that can be referred to when performing image comparison can be included, and the present disclosure is not limited thereto. Further, the scheme of the application also can determine weights corresponding to the image features with different dimensions; for example, the weights are set based on the importance of different dimensions.
Correspondingly, the step of comparing the sub-image under the same scene with the reference image specifically includes:
comparing the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result; that is, the initial comparison result characterizes how similar the sub-image is to the reference image in one dimension;
and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
In other words, the intermediate matching value of the first image obtained by the scheme of the application is also the comprehensive score, and the comprehensive score fully considers the image characteristics of different dimensions, thereby laying a foundation for maximally outputting the image meeting the scene requirement.
Here, in the process of selecting a good chromosome, it is also possible to obtain an intermediate matching value based on the exemplary method to obtain a matching value representing the total score, and further select a good gene based on the matching value. For example, the matching values are sorted from large to small, the first preset number of matching values are used as the matching values of the images meeting the iteration requirement, and accordingly, the chromosome corresponding to the image meeting the iteration requirement can be determined as the excellent chromosome. Alternatively, a threshold may be set, and an image corresponding to a matching value greater than or equal to the threshold is determined as an image that meets the iteration requirement, and accordingly, a chromosome corresponding to the image that meets the iteration requirement may be determined as a good chromosome. Of course, in practical application, other screening methods can be provided, and the scheme of the application is not limited to this.
Step S105: and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
For example, a target first image with the largest matching value is selected, and the value of each parameter in the related parameter group corresponding to the target first image is used as the target parameter feature. Thus, after the original signal is processed based on the target parameter characteristics, an image with the optimal matching degree with the reference image can be obtained.
In a specific example of the scheme of the application, the selecting of the target first image whose matching value meets the preset requirement may further include:
under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; that is, a termination condition, such as the number of times of hybridization processing, i.e., the number of rounds of circulation, is set, so that when the termination condition is satisfied, a target first image is obtained based on the matching value, where the target first image is an image whose matching degree with a preset reference image group satisfies a preset requirement, for example, an image whose matching degree with the reference image is optimal.
Or under the condition that the termination condition is not met, selecting Q middle first images with matching values meeting the iteration requirement from the N first images; continuously hybridizing chromosomes corresponding to the middle first images in the Q middle first images to obtain D + 1-generation chromosomes, continuously hybridizing according to the hybridization processing mode, and repeating the steps to determine the matching values of the images corresponding to the D + 1-generation chromosomes until the target first images with the matching values meeting preset requirements are selected under the condition that termination conditions are met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
Therefore, based on the genetic algorithm, iteration of parameter values is realized by simulating the evolution rule of the nature organisms, and further parameter debugging is realized; in addition, the excellent gene characteristics (namely parameter characteristics) can be ensured to be continuously evolved through hybridization treatment in the process so as to be inherited to the next generation, thus the optimal parameter values (namely target parameter characteristics) are obtained, the automatic debugging process is realized, the process is efficient, and the foundation is laid for engineering popularization. Meanwhile, a foundation is laid for reducing the labor cost.
In a specific example of the present application, the performing hybridization on at least chromosomes corresponding to each of the Q intermediate first images to obtain a D +1 th generation chromosome includes:
deleting images corresponding to chromosomes from the D-th generation chromosomes, wherein the matching values of the images do not meet the iteration requirement, so that the matching values of the images corresponding to all the remaining chromosomes in the D-th generation chromosomes meet the iteration requirement, namely all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement; for example, the chromosome corresponding to the image with the matching value smaller than the threshold value is deleted from the D-th generation chromosome, and the remaining chromosomes are the chromosomes meeting the hybridization requirement. Or, sorting is performed based on the matching values, and if the sorting is performed from large to small, the first preset number of matching values are used as the matching values of the images meeting the iteration requirement, so that the preset number of chromosomes are obtained, and the preset number of chromosomes are the chromosomes meeting the hybridization requirement. That is, only the gene features corresponding to the image with the matching value meeting the iteration requirement are retained, otherwise, the gene features not meeting the requirement are directly deleted, and thus, a foundation is laid for efficiently obtaining the target parameter features.
Further, any two chromosomes are selected from all chromosomes which meet the hybridization requirement in the D-th generation chromosome and are subjected to hybridization treatment to obtain offspring chromosomes of the D-th generation chromosome;
and taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
It should be noted that, in the present application, the excellent chromosomes in the D-th generation chromosomes are directly used as the next generation chromosomes, i.e., the D + 1-th generation chromosomes, so as to prevent the excellent genes from degenerating during the evolution process, and thus, a foundation is laid for obtaining the optimal parameter values (i.e., the target parameter characteristics). Here, the degree of matching between the obtained image and the reference image is also optimal for the optimal parameter value.
Here, it should be noted that the iteration requirement, the preset requirement, and the like described above can be determined based on actual genetic requirements, and the present application does not limit this.
In a specific example of the present embodiment, the hybridization process may be performed in the following manner, specifically, the hybridization process includes the steps of:
selecting any two chromosomes meeting the hybridization requirement, for example, selecting any two chromosomes meeting the hybridization requirement from the current generation chromosomes; further carrying out hybridization treatment on the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after the hybridization treatment as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome; wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
It should be noted that an orthotopic gene refers to genes at the same position in different chromosomes, and the parameters corresponding to the genes at the same position, or the characterized parameters, are the same; however, the gene characteristics (i.e., gene values) of the genes at the same position may be the same or different.
For example, the related parameter set includes Z (positive integer greater than or equal to 2) parameters, and in this case, since the genes correspond to the parameters one by one, Z genes are obtained, and the Z genes constitute one chromosome, in other words, in this example, one chromosome includes Z genes, for example, chromosome X can be expressed as (X) X1,x2,…,xp,…,xz),xpCharacterization of the gene at position p in chromosome X, XpThe value is the characteristic gene characteristic (i.e. gene value), and p is largeA positive integer of 1 to Z; similarly, chromosome Y may be expressed as (Y)1,y2,…,yp,…,yz),ypCharacterizing the gene at position p in chromosome Y, YpThe value is the characteristic gene characteristic (namely the gene value), and p is a positive integer which is more than or equal to 1 and less than or equal to Z; at this time, the gene xpWith gene ypI.e. the allele, and the parameters corresponding to the allele are the same.
Here, the parameter feature described in the present application may specifically characterize the meaning of the parameter, and the parameter value of the parameter; accordingly, a gene feature specifically characterizes the positional information of a gene, and the value of the gene (i.e., the gene value). Of course, in practical applications, for simplicity, the parameter characteristics and the gene characteristics may be both specific numerical values.
It should be noted that the gene characteristics of the genes in the chromosome, such as the gene values, will vary with the inheritance, but the meaning of the genes, i.e., the parameter, will not vary, e.g., gene xpCharacterizing the p-th gene in chromosome X, wherein the value of the p-th gene may change during the genetic process, but the parameter corresponding to the p-th gene is not changed, i.e., the meaning of the parameter corresponding to the p-th gene is not changed.
In a specific example of the present embodiment, the hybridizing process of the gene characteristics of the alleles in the two selected chromosomes comprises:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj) (ii) a (formula 1);
yj’=βyj+(1-ɑxj) (ii) a (formula 2);
wherein, the gene xjIn chromosome XA gene at position j; gene yjIs the gene at position j in chromosome Y;
gene X in said chromosome XjWith gene Y in said chromosome Y jIs an orthotopic gene corresponding to the same parameter; gene xj' is a gene at position j in a chromosome of the next generation of chromosome X; gene yj' is a gene at position j in a chromosome of the next generation of chromosome Y; gene X in the next generation chromosome of said chromosome Xj', the gene X in the chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
Here, it should be noted that, in this example, the initial parameter characteristics corresponding to each generation of chromosomes may be normalized based on the foregoing manner, and at this time, in order to ensure that each generation of chromosomes obtained falls within a preset value range corresponding to the normalized processing, the random number also needs to be a random number within the preset value range, so that a foundation is laid for efficiently determining the optimal parameter value.
For example, the chromosomes satisfying the hybridization requirement in the D-th generation chromosome are respectively X1、X2、X3And X4(ii) a At this time, the next generation chromosome X can be obtained after the two-by-two hybridization treatment based on the above formula12’、X21’、X13’、X31’、X14’、X41’,X23’、X32’、X24’、X42’、X34' and X43', here, the X12’、X21' refers to chromosome X 1And chromosome X2Based on the above formula 1 and formula 2, respectively, and the same applies to X13’、X31' is chromosome X1And chromosome X3Obtained based on the above formula 1 and formula 2, respectively, and so on, which are not described herein in detail. Thus, 12 offspring chromosomes can be obtained based on the above formula 4.
Here, both α and β are small random numbers, for example, small numbers such as less than 50 percent of the gene value, compared with the gene characteristic (gene value). For example, when the gene value is between 0 and 1, the α and β may be random numbers between 0 and 0.5. Alternatively, the α and β are values smaller than one or more orders of magnitude of the gene characteristic, and in this case, if the gene value is between 0 and 1, the α and β are random numbers between 0 and 0.1 (or 0 and 0.01, or 0 and 0.001, etc.). Certainly, in practical application, the value range of the random number can be set based on the value range of the gene value, and the scheme of the application is not limited to this, as long as the next generation obtained based on the random number and the formula meets the rule of biological heredity; in other words, when the values of α and β are large, such as far larger than the gene values, the obtained next generation chromosome cannot satisfy the biological genetic rule, and therefore, the value of the random number is prevented from being too large, which results in that the target parameter feature cannot be found because the value of the random number does not conform to the genetic rule.
Of course, in practical application, under the condition of not considering the number of the offspring chromosomes, only one formula can be selected for hybridization, and at the moment, one offspring chromosome is obtained after the hybridization of two chromosomes; or, some generations of chromosomes are hybridized based on one of the above formulas, some generations of chromosomes are hybridized based on the above two formulas, and the like. The scheme of the application is not limited to the method.
It should be noted that, because a and β are both random numbers, in practical applications, only one of the above formulas may be selected for the hybridization process, where, because any two chromosomes satisfying the hybridization requirement in the current generation chromosome need to be hybridized to obtain the next generation chromosome, even if the hybridization process is performed based on one of the above formulas, the obtained offspring chromosome is also exponentially increased; for example, taking 4 chromosomes satisfying the hybridization requirement in the current generation chromosome as an example, in this case, two-by-two hybridization can obtain C (4, 2) =6 progeny chromosomes.
In an example, in order to control the exponential increase of the obtained number of the offspring chromosomes, in other words, to improve the processing efficiency, and avoid an excessive data processing amount caused by an excessive number of chromosomes in the loop iteration process, and reduce the processing efficiency, a probability, such as a first preset probability, may be preset, and the number of the obtained offspring chromosomes may be controlled based on the first preset probability, for example, the first preset probability is multiplied by the total number of the obtained offspring chromosomes, at this time, if the first preset probability is a value smaller than 1, the number of the offspring chromosomes may be controlled and reduced, so as to ensure the processing rate.
Certainly, in practical application, after the total number of the obtained offspring chromosomes is multiplied based on the first preset probability, the obtained new number is inevitably smaller than the total number, at this time, the chromosomes which need to be subjected to next hybridization processing can be selected from the total number based on actual needs, for example, the chromosomes are selected randomly, or selected based on a matching value, and the like, which is not limited by the scheme of the application.
In a specific example of the present embodiment, after performing hybridization to obtain a next-generation chromosome, genetic mutation processing is performed on the obtained next-generation chromosome so that the chromosome after mutation processing satisfies a preset mutation requirement to obtain the next-generation chromosome. For example, after obtaining the offspring chromosome, the offspring chromosome reacts with any random number, and the nature of the offspring chromosome is to make a slight change by using the random number, so as to simulate the gene mutation in biology. Therefore, the method prevents the gene from falling into a certain local interval of the initial gene characteristics in the evolution process and being unable to jump out, breaks through the local optimization, explores a larger evolution space, and further lays a foundation for obtaining the optimal parameter value.
Here, in order to be closer to the biogenetic scene, in a specific example, the genetic variation processing is not performed on all the next generation chromosomes, and the genetic variation processing may be performed on only some of the chromosomes, or performed on some of the chromosomes of one or some generations; for example, a probability, such as a second preset probability, is preset, and after the next generation chromosome is obtained, the chromosome to be subjected to genetic variation is selected based on the second preset probability; or selecting which generation chromosomes need to be subjected to gene variation treatment based on the second preset probability; or selecting which generations of chromosomes need to be subjected to genetic variation processing based on the second preset probability, and then selecting the chromosomes needing to be subjected to the genetic variation processing again from the determined generations based on the third preset probability, so that the method is further close to the biological genetic scene, and further lays a foundation for efficiently determining the target parameter characteristics.
Of course, the selection manner is only exemplary, and in practical applications, other selection manners may be available, which is not limited by the scheme of the present application.
It should be noted that the first preset probability, the second preset probability, and the third preset probability may be set based on actual requirements, or may also be empirical values, which is not limited in the present application.
Therefore, according to the scheme of the application, a group of reference images (namely the preset reference image group) is used as a target, the parameter group (namely the related parameter group) of the ISP is automatically adjusted, so that the target parameter characteristics of each parameter in the parameter group of the ISP are obtained, and then the target image (namely the target first image) with the target style (namely matched with the preset parameter image group) can be output after the original signal is processed based on the target parameter characteristics.
Specifically, when adjusting the parameter set (i.e., the related parameter set) of the ISP, it is usually necessary to set multiple sets of scenes, such as different illuminance adjustments, backlight environments, fast object movements, and the like, and the preset reference image set provides reference images in these scenes to be referred to as the target effect. Therefore, after debugging is finished, the finally output image effect can be close to the target image effect in the preset reference image group as much as possible in each scene.
In practical applications, since parameter adjustment is a trade-off process in many cases, each reference image in the preset reference image group has a weighted value, for example, the higher the weighted value is, the more important the representation of the scene is, and the more the standard of image debugging tends to the scene. Therefore, different scene requirements can be met.
The parameter values (i.e. parameter characteristics) of the parameters in the parameter set of the ISP are set to float, i.e. a float value. In practical applications, the parameter values of the parameters in the parameter set may be normalized for the convenience of algorithm processing. For example, the parameter values are subjected to a real number encoding process, and specifically, the parameter values of the parameters are mapped into a range of [0, 1] with a linear change. For example, the specific value range of the parameter in the parameter set is [ a, b ], and then the standardized variation formula is:
r*= (r-a)/(b-1);
wherein r is the parameter value after the normalization processing, and r is the parameter value before the normalization processing. Further, in practical application, in order to ensure the accuracy, r may also be kept to the accuracy of 9 bits after the decimal point. For example, if the range of the parameter r is [1, 5], the linear transformation formula of r obtained after the normalization process is r = (r-1)/4. Here, when r =1.35, r = 0.087500000. Conversely, based on the above formula, the value of r can also be inferred from r.
Specifically, as shown in fig. 2, the method for automatically debugging the related parameter group of the present example includes:
step 1: determining a related parameter group of an ISP to be debugged; taking each parameter in the related parameter group as a gene so as to enable the gene to correspond to the parameter one by one; generating M groups of random numbers, wherein the number of the random numbers in each group of random numbers is the same as the number of parameters in related parameter groups, and assigning the random numbers in each group of random numbers to different parameters respectively to serve as initial parameter values of the parameters and serve as initial gene characteristics (namely initial gene values) of genes to obtain an initial chromosome; correspondingly, M initial chromosomes, namely M first generation chromosomes, can be obtained by M groups of random numbers; here, the gene characteristics contained in the initial chromosome are known and are correspondingly random numbers. The initial chromosome contains the same number of genes as the number of parameters contained in the set of related parameters.
It should be noted that, in practical applications, before invoking the genetic algorithm, the normalized parameters need to be encoded by genes and chromosomes. In particular, the present example adopts real number coding as a normalization processing manner, and in particular, real number coding has an advantage of being suitable for numerical values with a large range, being applicable to scenes with high precision, and having a large search space. The specific method comprises the steps of regarding each parameter in the adjusted related parameter group as a gene, and recording the mapping relation between the parameters and the genes; furthermore, all genes corresponding to the related parameter sets constitute a chromosome. For example, the related parameter group includes five parameters, five genes are correspondingly obtained, and after initialization processing is performed, the initial gene characteristics of each gene are obtained as shown below; at this time, five genes constitute an initial chromosome in the afternoon.
0.561312201 0.741319244 0.468013293 0.124451976 0.351254131
Step 2: interpreting the first generation chromosome to obtain an initial gene value of each gene in the first generation chromosome so as to obtain initial parameter values of all parameters in the ISP related parameter set; sending initial parameter values of all parameters in the related parameter sets into an ISP (Internet service provider) to obtain initial images; and comparing the generated initial image with a reference image in a preset reference image group through an image comparator to obtain a fitness score value (namely a matching value) of the initial image. Judging whether a preset condition is met, selecting a fitness score value to meet an iteration requirement under the condition that the preset condition is not met, for example, performing subsequent hybridization (namely cross operation) on a first generation chromosome corresponding to an initial image with the fitness score value higher than a threshold value, and eliminating the rest first generation chromosomes. That is, the chromosomes whose fitness score satisfies the iteration requirement are those that satisfy the hybridization requirement, and the remaining chromosomes are deleted.
Here, it should be noted that the obtained initial image may include sub-images corresponding to different scenes, that is, include a plurality of sub-images; at this time, the image comparator may compare the sub-images in the same scene with the reference image, and then perform weighting processing based on the weights corresponding to the different scenes to obtain the fitness score of the initial image.
For example, based on the scene requirements, four scenes, namely a natural light environment, a fluorescent light environment, a dark light environment and a backlight environment, can be set, and the weights of the four scenes can be set; for example, light environments corresponding to the four scenes are set in a laboratory scene, so as to obtain reference images in the four scenes, correspondingly, the initial image obtained in step 2 also includes sub-images corresponding to the four scenes, that is, four sub-images, so as to compare the sub-images in each scene with the reference images in the scenes, so as to obtain four intermediate matching values, and then the four intermediate matching values are weighted to obtain a fitness score value of the initial image.
And step 3: and (3) carrying out hybridization treatment on any two chromosomes in the first generation chromosome which meet the hybridization requirement to obtain the offspring chromosomes of the first generation chromosome.
Therefore, in the genetic evolution process, on one hand, the excellent gene characteristics (namely, the parameter characteristics) of the previous generation can be ensured to be inherited, and meanwhile, the excellent gene characteristics (namely, the parameter characteristics) of the previous generation can be prevented from being lost in the genetic process, in other words, the optimal parameter values are prevented from being lost, so that the foundation is laid for obtaining the optimal parameter values.
And 4, step 4: and (3) taking the offspring chromosomes of the first generation chromosome and the chromosomes of which the fitness score values obtained in the step (2) meet the iteration requirement, namely the first generation chromosome meeting the hybridization requirement as the second generation chromosome. That is, the second generation chromosomes include not only the offspring chromosomes obtained after the first generation chromosome crossing treatment, but also the first generation chromosomes directly remaining.
For example, in practical applications, all chromosomes satisfying the hybridization requirement can be directly used as next generation chromosomes at a time, or a predetermined number, for example, 5 chromosomes are retained from all chromosomes satisfying the hybridization requirement and directly enter the next generation chromosomes. In this case, all chromosomes of the next generation are compared, including chromosomes obtained after hybridization and chromosomes directly remaining after non-hybridization, and in practical applications, if the matching value of the image obtained by directly entering the next generation in the comparison process is not as good as that of the chromosomes obtained after hybridization, the chromosomes entering the next generation can be left and eliminated.
And 5: interpreting a second generation chromosome to obtain a gene value of each gene in the second generation chromosome so as to obtain a parameter value of each parameter in the ISP related parameter set; sending parameter values of all parameters in the related parameter groups into an ISP (Internet service provider) to generate an image; and comparing the generated image with a reference image in a preset reference image group through an image comparator to obtain a fitness score value (namely a matching value) of the generated image. Judging whether a preset condition is met, selecting a fitness score value to meet an iteration requirement under the condition that the preset condition is not met, for example, performing subsequent hybridization treatment (namely cross operation) on a second-generation chromosome corresponding to an image with the fitness score value higher than a threshold value, and eliminating the rest second-generation chromosomes.
That is, chromosomes whose fitness score values satisfy the iteration requirement are subjected to subsequent hybridization processing as chromosomes satisfying the hybridization requirement, and the remaining chromosomes are eliminated.
It should be noted that the comparison method in step 5 is similar to the comparison method in step 2, and all the comparison methods are to compare the sub-image in the same scene with the reference image, so as to obtain the fitness score value, which is not described herein again.
Step 6: performing loop iteration based on the manner from step 3 to step 5 to obtain a third generation chromosome, and looping until a preset condition is met, for example, a specified number of iterations is reached, or a target image (i.e., a target first image) with a matching value meeting a preset requirement is found; and outputting the target parameter value corresponding to the target image as the optimal parameter value.
Here, after the hybridization process is performed to obtain the next-generation chromosome, the genetic mutation process is further performed on the obtained next-generation chromosome so that the mutated chromosome satisfies a predetermined mutation requirement to obtain the mutated next-generation chromosome. For example, after obtaining the offspring chromosome, the offspring chromosome reacts with any random number, and the nature of the offspring chromosome is to make a slight change by using the random number, so as to simulate the gene mutation in biology. Therefore, the method prevents the gene from falling into a certain local interval of the initial gene characteristics in the evolution process and being unable to jump out, breaks through the local optimization, explores a larger evolution space, and further lays a foundation for obtaining the optimal parameter value.
It should be noted that, in this example, the core principle of the image comparator is to perform weighted scoring on the images of different scenes and the corresponding reference images output by the ISP related parameter group corresponding to the chromosome to be evaluated under various values, so as to serve as the fitness score value, i.e., the total score, of the image corresponding to the chromosome, and further quantify the degree of superiority and inferiority of the value of the related parameter group based on the total score.
As shown in fig. 3, the evaluation items of the image comparator include image features such as image details, image sharpness, color reduction, color depth, and white balance. In this way, when the group of relevant parameters of the ISP is input, an image shooting scene is automatically set, and an image in the scene is obtained, and further, in the image comparator, the image in the scene is compared with the corresponding reference image from the image characteristics of each dimension to obtain a total score, wherein the closer the obtained image and the reference image is, the higher the score is, and the lower the score is otherwise.
Further, specific examples are given below to describe the hybridization process and mutation process in detail, and specifically, it is assumed that 2 parent chromosomes used for the hybridization process are respectively:
X = [x1, x2, ... xp, ... xz];Y = [y1, y2, ... yp, ... yz];
Here, Z represents the number of genes, i.e. the number of parameters in the set of relevant parameters. Thus, the two progeny chromosomes obtained after crossing can be designated as X 'and Y', respectively; here, the first and second liquid crystal display panels are,
X’= [x1’, x2’, ...xp’,...xz’];Y’ = [y1’,y2’,... yp’,... yz’];
wherein x isp’=ɑpxp+(1-βpxp);yp’=βpYp+ (1-ɑpxp) (ii) a Here, alpha isp,βpIs a random number, and p is a positive integer of 1 to Z. Here, in a specific example, x is describedpAnd ypIs a normalized value between 0 and 1, wherein alpha isp,βpAnd correspondingly a random number between 0 and 1.
For example, the chromosomes satisfying the hybridization requirement in the D-th generation chromosome are respectively X1、X2、X3And X4(ii) a At this time, the next generation chromosome X can be obtained after the two-by-two hybridization treatment based on the above formula12’、X21’、X13’、X31’、X14’、X41’,X23’、X32’、X24’、X42’、X34' and X43', here, the X12’、X21' refers to chromosome X1And chromosome X2Based on two formulae, respectively, said X13’、X31' is chromosome X1And chromosome X3Respectively based on the above two formulas, and so on, which are not described herein in detail. Thus, 12 offspring chromosomes can be obtained based on the above formula 4.
Of course, in practical application, under the condition of not considering the number of the offspring chromosomes, only one formula can be selected for hybridization, and at the moment, one offspring chromosome is obtained after the hybridization of two chromosomes; or, some generations of chromosomes are hybridized based on one of the above formulas, some generations of chromosomes are hybridized based on the above two formulas, and the like.
It should be noted that, because a and β are both random numbers, in practical applications, only one of the above formulas may be selected for the hybridization process, where, because any two chromosomes satisfying the hybridization requirement in the current generation chromosome need to be hybridized to obtain the next generation chromosome, even if the hybridization process is performed based on one of the above formulas, the obtained offspring chromosome is also exponentially increased; for example, taking 4 chromosomes satisfying the hybridization requirement in the current generation chromosome as an example, in this case, two-by-two hybridization can obtain C (4, 2) =6 progeny chromosomes.
In an example, a probability Pc can also be set, and the number of resulting children can be controlled based on the set probability Pc. Here, in order to control the exponential increase of the obtained number of the offspring chromosomes, in other words, to improve the processing efficiency, avoid the excessive data processing amount caused by the excessive number of the chromosomes in the loop iteration process, and reduce the processing efficiency, a probability, such as a first preset probability (that is, the probability Pc), may be preset, and then the number of the obtained offspring chromosomes is controlled based on the first preset probability, for example, the first preset probability is multiplied by the total number of the obtained offspring chromosomes, at this time, if the first preset probability is a value smaller than 1, the number of the offspring chromosomes may be controlled and reduced, so as to ensure the processing rate.
In the scheme of the present application, after obtaining the offspring chromosomes based on the above manner, mutation operation can be performed, for example, X = X' +1(ii) a For the same reason, Y '= Y' +2(ii) a And, where1An2Is a very small random number, e.g., between 0 and 1. Thus, the variant offspring chromosomes X 'and Y' are obtained.
Here, in order to be closer to the biological inheritance scene, instead of performing genetic variation processing (i.e., variation operation) on all chromosomes of the next generation, only some chromosomes may be subjected to genetic variation processing, or some chromosomes of one or some generations may be subjected to genetic variation processing, or some chromosomes of one or some generations may be subjected to genetic variation processing; for example, a probability, such as a second predetermined probability (i.e., mutation probability), is preset, and after obtaining the next generation chromosome, the chromosome to be subjected to genetic mutation is selected based on the second predetermined probability; or selecting which generation chromosomes need to be subjected to gene variation treatment based on the second preset probability; or, based on the second preset probability, selecting which generations of chromosomes need to be subjected to gene mutation processing, and then based on the third preset probability, selecting the chromosomes needing to be subjected to gene mutation processing again from the determined generations, so that not every offspring of chromosomes can be mutated, and only the gene characteristics of the parent generation are occasionally broken, thereby avoiding the loss of excellent genes, and meanwhile, the method is further close to the biological genetic scene, and further laying a foundation for efficiently determining the target parameter characteristics.
Of course, the selection manner is only exemplary, and in practical applications, other selection manners may be available, which is not limited by the scheme of the present application.
Therefore, in the chromosomes of the filial generations, a small probability is used for carrying out gene mutation, and a plurality of variables are generated for the feeding, so that the situation that the genes fall into the local optimum of the parent genes in the evolution can be avoided, and a foundation is laid for determining the optimum parameter value with the highest matching degree with the reference image.
Therefore, according to the scheme of the application, a group of reference images (namely the preset reference image group) is used as a target, the parameter group (namely the related parameter group) of the ISP is automatically adjusted, so that the target parameter characteristics of each parameter in the parameter group of the ISP are obtained, and then the target image (namely the target first image) with the target style (namely matched with the preset parameter image group) can be output after the original signal is processed based on the target parameter characteristics.
Fig. 4 is a schematic structural diagram of an apparatus for automatically debugging parameters related to an image signal processor according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
A gene characteristic processing unit 401, configured to obtain current gene characteristics of each gene in the N D-th generation chromosomes; the D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter set of the image signal processor, and the parameters corresponding to different genes are different; the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome and chromosomes meeting the hybridization requirement in the D-1 generation chromosome; n is an integer greater than or equal to 2; d is an integer greater than or equal to 2;
a parameter feature processing unit 402, configured to obtain, based on current gene features of each gene in an ith D-th generation chromosome, current parameter features of each parameter in a related parameter set corresponding to the ith D-th generation chromosome; wherein i is an integer greater than or equal to 1 and less than or equal to N;
a target parameter characteristic determining unit 403, configured to obtain, from the image signal processor, a first image corresponding to the ith D-th generation chromosome to obtain N first images; the first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor; comparing the image characteristics of the first image with the image characteristics of a reference image in a preset reference image group to obtain a matching value of the first image; and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
In a specific example of the scheme of the present application, the target parameter characteristic determining unit is further configured to:
under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; alternatively, the first and second electrodes may be,
under the condition that a termination condition is not met, Q middle first images with matching values meeting iteration requirements are selected from the N first images; at least continuing to perform hybridization processing on chromosomes corresponding to each intermediate first image in the Q intermediate first images to obtain D + 1-generation chromosomes, and repeating the steps to determine matching values of the images corresponding to the D + 1-generation chromosomes until the target first image with the matching value meeting preset requirements is selected under the condition that a termination condition is met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
In a specific example of the scheme of the present application, the target parameter characteristic determining unit is further configured to:
deleting chromosomes, of which the matching values of the images corresponding to the chromosomes do not meet the iteration requirement, from the D-th generation chromosomes so that all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement;
selecting any two chromosomes from all chromosomes meeting the hybridization requirement in the D-th generation chromosome for hybridization to obtain a filial generation chromosome of the D-th generation chromosome;
And taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
In a specific example of the scheme of the present application, the method further includes:
the initial gene characteristic determining unit is used for determining a related parameter group of the image signal processor to be debugged; taking each parameter in the related parameter group as a gene; determining M initial parameter characteristics of each parameter in the related parameter group to obtain M initial gene characteristics of each gene so as to obtain M first generation chromosomes; the first generation chromosome contains the same number of genes as the number of parameters in the set of related parameters.
In a specific example of the present application, the initial gene feature determination unit is further configured to:
directly taking the initial parameter characteristics of each parameter in the related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics; alternatively, the first and second electrodes may be,
carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics.
In a specific example of the present embodiment, the gene signature processing unit is further configured to perform a hybridization process; the step of hybridization treatment comprises:
selecting any two chromosomes meeting the hybridization requirement;
hybridizing the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after hybridization as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome;
wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
In a specific example of the present disclosure, the gene signature processing unit is further configured to:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj);
yj’=βyj+(1-ɑxj);
wherein, the gene X in the chromosome XjWith gene Y in said chromosome YjIs an orthotopic gene; gene X in the next generation chromosome of said chromosome Xj', the gene X in the chromosome X jAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
In a specific example of the present disclosure, the gene signature processing unit is further configured to:
and after hybridization treatment is carried out to obtain the next generation chromosome, carrying out gene mutation treatment on the obtained next generation chromosome so that the chromosome after mutation treatment meets the preset mutation requirement to obtain the next generation chromosome.
In a specific example of the present application, the apparatus further includes a reference image determination unit; wherein the content of the first and second substances,
the reference image determining unit is used for acquiring a plurality of reference images representing different scenes and forming the reference images into the preset reference image group; determining the weight of each reference image based on the importance degree of different scenes;
the target parameter characteristic determining unit is further configured to compare image characteristics of the sub-images in the same scene with image characteristics of the reference image to obtain a plurality of intermediate matching values; weighting the intermediate matching values based on the weight of the reference image to obtain the matching value of the first image; the first image comprises a plurality of sub-images corresponding to different scenes.
In a specific example of the present application, the image feature includes at least one of the following dimensions: image details, image definition, color reduction and color depth; white balance; wherein the apparatus further comprises: an image feature weighting unit; wherein the content of the first and second substances,
the image feature weighting unit is used for determining the weight corresponding to the image feature of each dimension;
the target parameter characteristic determining unit is further configured to compare the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result; and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
Therefore, according to the scheme of the application, a group of reference images (namely the preset reference image group) is used as a target, the parameter group (namely the related parameter group) of the ISP is automatically adjusted, so that the target parameter characteristics of each parameter in the parameter group of the ISP are obtained, and then the target image (namely the target first image) with the target style (namely matched with the preset parameter image group) can be output after the original signal is processed based on the target parameter characteristics.
The functions of each module in each apparatus in the embodiments of the present invention may refer to the corresponding description in the above method, and are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device implementing a method for automatically debugging related parameters of an image signal processor according to an embodiment of the present disclosure. As shown in fig. 5, the electronic apparatus includes: a memory 510 and a processor 520, the memory 510 having stored therein computer programs that are executable on the processor 520. The number of the memory 510 and the processor 520 may be one or more. The memory 510 may store one or more computer programs that, when executed by the electronic device, cause the electronic device to perform the methods provided by the above-described method embodiments.
The electronic device further includes:
the communication interface 530 is used for communicating with an external device to perform data interactive transmission.
If the memory 510, the processor 520, and the communication interface 530 are implemented independently, the memory 510, the processor 520, and the communication interface 530 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Optionally, in an implementation, if the memory 510, the processor 520, and the communication interface 530 are integrated on a chip, the memory 510, the processor 520, and the communication interface 530 may complete communication with each other through an internal interface.
The embodiment of the present disclosure also provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are run on a computer, the computer is caused to execute the method provided by the above method embodiment.
The embodiment of the present disclosure further provides a computer program product, where the computer program product is used to store a computer program, and when the computer program is executed by a computer, the computer may implement the method provided by the above method embodiment.
The embodiment of the disclosure also provides a chip, which is coupled with the memory, and is used for implementing the method provided by the embodiment of the method.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an Advanced reduced instruction set machine (ARM) architecture.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may include a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can include Random Access Memory (RAM), which acts as external cache Memory. By way of example, and not limitation, many forms of RAM are available. For example, Static Random Access Memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data rate Synchronous Dynamic Random Access Memory (DDR SDRAM), Enhanced SDRAM (ESDRAM), SLDRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the disclosure to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, bluetooth, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others. Notably, the computer-readable storage media referred to in this disclosure may be non-volatile storage media, in other words, non-transitory storage media.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In the description of the embodiments of the present disclosure, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the description of the embodiments of the present disclosure, "/" indicates an OR meaning, for example, A/B may indicate A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the description of the embodiments of the present disclosure, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present disclosure, "a plurality" means two or more unless otherwise specified.
The above description is only exemplary of the present disclosure and is not intended to limit the present disclosure, and any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (22)

1. A method for automatically debugging parameters associated with an image signal processor, comprising:
obtaining the current gene characteristics of each gene in N D-th generation chromosomes; the D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter set of the image signal processor, and the parameters corresponding to different genes are different; the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome and chromosomes meeting the hybridization requirement in the D-1 generation chromosome; n is an integer greater than or equal to 2; d is an integer greater than or equal to 2;
Obtaining the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene characteristics of each gene in the ith D-th generation chromosome; wherein i is an integer greater than or equal to 1 and less than or equal to N;
acquiring a first image corresponding to the ith D-th generation chromosome from the image signal processor to obtain N first images; the first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor;
comparing the image characteristics of the first image with the image characteristics of a reference image in a preset reference image group to obtain a matching value of the first image;
and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
2. The method according to claim 1, wherein selecting the target first image with the matching value satisfying a preset requirement comprises:
Under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; alternatively, the first and second electrodes may be,
under the condition that a termination condition is not met, Q middle first images with matching values meeting iteration requirements are selected from the N first images; at least continuing to perform hybridization processing on chromosomes corresponding to each intermediate first image in the Q intermediate first images to obtain D + 1-generation chromosomes, and repeating the steps to determine matching values of the images corresponding to the D + 1-generation chromosomes until the target first image with the matching value meeting preset requirements is selected under the condition that a termination condition is met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
3. The method according to claim 2, wherein the step of performing at least hybridization on the chromosomes corresponding to each of the Q intermediate first images to obtain D +1 th generation chromosomes comprises:
deleting chromosomes, of which the matching values of the images corresponding to the chromosomes do not meet the iteration requirement, from the D-th generation chromosomes so that all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement;
selecting any two chromosomes from all chromosomes meeting the hybridization requirement in the D-th generation chromosome for hybridization to obtain a filial generation chromosome of the D-th generation chromosome;
And taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
4. A method according to claim 1, 2 or 3, characterized in that the method further comprises:
determining a related parameter group of an image signal processor to be debugged;
taking each parameter in the related parameter group as a gene;
determining M initial parameter characteristics of each parameter in the related parameter group to obtain M initial gene characteristics of each gene so as to obtain M first generation chromosomes; the first generation chromosome contains the same number of genes as the number of parameters in the set of related parameters.
5. The method of claim 4, wherein said deriving M initial gene signatures for each of said genes comprises:
directly taking the initial parameter characteristics of each parameter in the related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics; alternatively, the first and second electrodes may be,
carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics.
6. The method of claim 1, 2 or 3, wherein the step of hybridizing comprises:
selecting any two chromosomes meeting the hybridization requirement;
hybridizing the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after hybridization as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome;
wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
7. The method of claim 6, wherein hybridizing the gene signatures of the alleles in the selected two chromosomes comprises:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj);
yj’=βyj+(1-ɑxj);
wherein, the gene X in the chromosome XjWith gene Y in said chromosome YjIs an orthotopic gene; gene X in the next generation chromosome of said chromosome X j', the gene X in the chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
8. The method of claim 7, further comprising:
and after hybridization treatment is carried out to obtain the next generation chromosome, carrying out gene mutation treatment on the obtained next generation chromosome so that the chromosome after mutation treatment meets the preset mutation requirement to obtain the next generation chromosome.
9. A method according to claim 1, 2 or 3, characterized in that the method further comprises:
acquiring a plurality of reference images representing different scenes, and forming the reference images into a preset reference image group;
determining the weight of each reference image based on the importance degree of different scenes;
the first image comprises a plurality of sub-images corresponding to different scenes;
the comparing the image features of the first image with the image features of the reference images in a preset reference image group to obtain the matching value of the first image includes:
Comparing the image characteristics of the sub-images under the same scene with the image characteristics of the reference image to obtain a plurality of intermediate matching values;
and weighting the plurality of intermediate matching values based on the weight of the reference image to obtain the matching value of the first image.
10. The method of claim 9, wherein the image features comprise at least one of the following dimensions: image details, image definition, color reduction and color depth; white balance;
the method further comprises the following steps: determining the weight corresponding to the image characteristics of each dimension;
wherein, comparing the sub-image under the same scene with the reference image comprises:
comparing the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result;
and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
11. An automated commissioning device, comprising:
the gene characteristic processing unit is used for acquiring the current gene characteristics of each gene in the N D-th generation chromosomes; the D-th generation chromosome can represent the current gene characteristics of all genes contained in the D-th generation chromosome, the genes correspond to parameters in a related parameter set of the image signal processor, and the parameters corresponding to different genes are different; the D-th generation chromosome carries at least the gene characteristics of the previous generation chromosome, and comprises chromosomes obtained by carrying out hybridization treatment on any two chromosomes meeting the hybridization requirement in the D-1 generation chromosome and chromosomes meeting the hybridization requirement in the D-1 generation chromosome; n is an integer greater than or equal to 2; d is an integer greater than or equal to 2;
The parameter feature processing unit is used for obtaining the current parameter features of all parameters in the related parameter group corresponding to the ith D-th generation chromosome based on the current gene features of all genes in the ith D-th generation chromosome; wherein i is an integer greater than or equal to 1 and less than or equal to N;
a target parameter characteristic determining unit, configured to obtain, from the image signal processor, a first image corresponding to the ith D-th generation chromosome to obtain N first images; the first image is obtained by processing an original signal by the image signal processor based on the current parameter characteristics of each parameter in the related parameter group corresponding to the ith D-th generation chromosome, wherein the original signal is obtained by image acquisition hardware connected with the image signal processor; comparing the image characteristics of the first image with the image characteristics of a reference image in a preset reference image group to obtain a matching value of the first image; and selecting a target first image with a matching value meeting a preset requirement to obtain target parameter characteristics of each parameter in a related parameter set corresponding to the target first image.
12. The apparatus of claim 11, wherein the target parameter characteristic determining unit is further configured to:
Under the condition that a termination condition is met, selecting a target first image of which the matching value meets a preset requirement; alternatively, the first and second electrodes may be,
under the condition that a termination condition is not met, Q middle first images with matching values meeting iteration requirements are selected from the N first images; at least continuing to perform hybridization processing on chromosomes corresponding to each intermediate first image in the Q intermediate first images to obtain D + 1-generation chromosomes, and repeating the steps to determine matching values of the images corresponding to the D + 1-generation chromosomes until the target first image with the matching value meeting preset requirements is selected under the condition that a termination condition is met; wherein X is an integer of more than or equal to 1 and less than or equal to N.
13. The apparatus of claim 12, wherein the target parameter characteristic determining unit is further configured to:
deleting chromosomes, of which the matching values of the images corresponding to the chromosomes do not meet the iteration requirement, from the D-th generation chromosomes so that all the remaining chromosomes in the D-th generation chromosomes meet the hybridization requirement;
selecting any two chromosomes from all chromosomes meeting the hybridization requirement in the D-th generation chromosome for hybridization to obtain a filial generation chromosome of the D-th generation chromosome;
And taking the obtained offspring chromosomes of the D generation chromosome and all chromosomes in the D generation chromosome, which meet the hybridization requirement, as the D +1 generation chromosome.
14. The apparatus of claim 11, 12 or 13, further comprising:
the initial gene characteristic determining unit is used for determining a related parameter group of the image signal processor to be debugged; taking each parameter in the related parameter group as a gene; determining M initial parameter characteristics of each parameter in the related parameter group to obtain M initial gene characteristics of each gene so as to obtain M first generation chromosomes; the first generation chromosome contains the same number of genes as the number of parameters in the set of related parameters.
15. The apparatus of claim 14, wherein the initial gene signature determination unit is further configured to:
directly taking the initial parameter characteristics of each parameter in the related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics; alternatively, the first and second electrodes may be,
carrying out standardization processing on initial parameter characteristics of each parameter in the related parameter group so as to enable the processed numerical value to be within a preset value range; and taking the initial parameter characteristics of each parameter in the processed related parameter group as the initial gene characteristics of each gene to obtain M initial gene characteristics.
16. The apparatus according to claim 11, 12 or 13, wherein the gene signature processing unit is further configured to perform a hybridization process; the step of hybridization treatment comprises:
selecting any two chromosomes meeting the hybridization requirement;
hybridizing the gene characteristics of the alleles in the two selected chromosomes, and taking the gene characteristics obtained after hybridization as the gene characteristics of the genes corresponding to the alleles in the next generation chromosome to obtain the next generation chromosome;
wherein the alleles characterize genes at the same position in different chromosomes and corresponding to the same parameter.
17. The apparatus of claim 16, wherein the genetic signature processing unit is further configured to:
acquiring a random number alpha and a random number beta;
processing the selected alleles of chromosome X and chromosome Y based on at least one of the following formulas to obtain gene characteristics of genes corresponding to the alleles in the next generation chromosome; wherein the formula is:
xj’=ɑxj+(1-βyj);
yj’=βyj+(1-ɑxj);
wherein, the gene X in the chromosome XjWith gene Y in said chromosome YjIs an orthotopic gene; gene X in the next generation chromosome of said chromosome X j', the gene X in the chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene; gene Y in the next generation chromosome of chromosome Yj', X-based in said chromosome XjAnd gene Y in said chromosome YjIs an orthotopic gene.
18. The apparatus of claim 17, wherein the genetic signature processing unit is further configured to:
and after hybridization treatment is carried out to obtain the next generation chromosome, carrying out gene mutation treatment on the obtained next generation chromosome so that the chromosome after mutation treatment meets the preset mutation requirement to obtain the next generation chromosome.
19. The apparatus according to claim 11, 12 or 13, characterized in that the apparatus further comprises a reference image determination unit; wherein the content of the first and second substances,
the reference image determining unit is used for acquiring a plurality of reference images representing different scenes and forming the reference images into the preset reference image group; determining the weight of each reference image based on the importance degree of different scenes;
the target parameter characteristic determining unit is further configured to compare image characteristics of the sub-images in the same scene with image characteristics of the reference image to obtain a plurality of intermediate matching values; weighting the intermediate matching values based on the weight of the reference image to obtain the matching value of the first image; the first image comprises a plurality of sub-images corresponding to different scenes.
20. The apparatus of claim 19, wherein the image features comprise at least one of the following dimensions: image details, image definition, color reduction and color depth; white balance; wherein the apparatus further comprises: an image feature weighting unit; wherein the content of the first and second substances,
the image feature weighting unit is used for determining the weight corresponding to the image feature of each dimension;
the target parameter characteristic determining unit is further configured to compare the sub-images in the same scene with the image characteristics in the same dimension in the reference image to obtain an initial comparison result; and weighting the initial comparison result based on the weights corresponding to the image features of different dimensions to obtain an intermediate matching value.
21. An electronic device, comprising:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more computer programs, wherein the one or more computer programs are stored in the memory, which when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-10.
22. A computer-readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 10.
CN202111194767.9A 2021-10-14 2021-10-14 Method, device, equipment and storage medium for automatic debugging Active CN113645457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111194767.9A CN113645457B (en) 2021-10-14 2021-10-14 Method, device, equipment and storage medium for automatic debugging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111194767.9A CN113645457B (en) 2021-10-14 2021-10-14 Method, device, equipment and storage medium for automatic debugging

Publications (2)

Publication Number Publication Date
CN113645457A true CN113645457A (en) 2021-11-12
CN113645457B CN113645457B (en) 2021-12-24

Family

ID=78426788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111194767.9A Active CN113645457B (en) 2021-10-14 2021-10-14 Method, device, equipment and storage medium for automatic debugging

Country Status (1)

Country Link
CN (1) CN113645457B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020168010A1 (en) * 2001-05-11 2002-11-14 Koninklijke Philips Electronics N. V. System and method for efficient automatic design and tuning of video processing systems
US6594375B1 (en) * 1998-09-28 2003-07-15 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN1470014A (en) * 2001-01-10 2004-01-21 皇家菲利浦电子有限公司 System and method for optimizing control parameter settings in a chain of video processnig algorithms
JP2008089574A (en) * 2006-09-05 2008-04-17 Dainippon Screen Mfg Co Ltd Image processor, data processor, parameter adjustment method, and program
US8051018B1 (en) * 2007-12-04 2011-11-01 Hrl Laboratories, Llc Method for the design and optimization of morphing strategies for reconfigurable surfaces
CN106156854A (en) * 2016-08-18 2016-11-23 山东师范大学 A kind of support vector machine parameter prediction method based on DNA encoding
CN111445407A (en) * 2020-03-24 2020-07-24 赣南师范大学 Improved genetic algorithm-based reconstruction parameter optimization method for photoacoustic image

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6594375B1 (en) * 1998-09-28 2003-07-15 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
CN1470014A (en) * 2001-01-10 2004-01-21 皇家菲利浦电子有限公司 System and method for optimizing control parameter settings in a chain of video processnig algorithms
US20020168010A1 (en) * 2001-05-11 2002-11-14 Koninklijke Philips Electronics N. V. System and method for efficient automatic design and tuning of video processing systems
JP2008089574A (en) * 2006-09-05 2008-04-17 Dainippon Screen Mfg Co Ltd Image processor, data processor, parameter adjustment method, and program
US8051018B1 (en) * 2007-12-04 2011-11-01 Hrl Laboratories, Llc Method for the design and optimization of morphing strategies for reconfigurable surfaces
CN106156854A (en) * 2016-08-18 2016-11-23 山东师范大学 A kind of support vector machine parameter prediction method based on DNA encoding
CN111445407A (en) * 2020-03-24 2020-07-24 赣南师范大学 Improved genetic algorithm-based reconstruction parameter optimization method for photoacoustic image

Also Published As

Publication number Publication date
CN113645457B (en) 2021-12-24

Similar Documents

Publication Publication Date Title
Williams et al. How evolution modifies the variability of range expansion
WO2021121108A1 (en) Image super-resolution and model training method and apparatus, electronic device, and medium
WO2022042123A1 (en) Image recognition model generation method and apparatus, computer device and storage medium
CN111080528A (en) Image super-resolution and model training method, device, electronic equipment and medium
JP7287397B2 (en) Information processing method, information processing apparatus, and information processing program
CN112287968A (en) Image model training method, image processing method, chip, device and medium
CN111160531B (en) Distributed training method and device for neural network model and electronic equipment
WO2022042506A1 (en) Convolutional neural network-based cell screening method and device
CN114708412B (en) Indoor setting method, device and system based on VR
CN112446441B (en) Model training data screening method, device, equipment and storage medium
CN110909663A (en) Human body key point identification method and device and electronic equipment
US20210295475A1 (en) Method and apparatus for generating image, and electronic device
CN115249315A (en) Heterogeneous computing device-oriented deep learning image classification method and device
CN113645457B (en) Method, device, equipment and storage medium for automatic debugging
CN110717529B (en) Data sampling method and device
CN112527676A (en) Model automation test method, device and storage medium
CN114168318A (en) Training method of storage release model, storage release method and equipment
CN110909888A (en) Method, device and equipment for constructing generic decision tree and readable storage medium
CN111046944A (en) Method and device for determining object class, electronic equipment and storage medium
CN109245948B (en) Security-aware virtual network mapping method and device
CN112308939A (en) Image generation method and device
CN111340140A (en) Image data set acquisition method and device, electronic equipment and storage medium
CN114372941B (en) Low-light image enhancement method, device, equipment and medium
CN113627538B (en) Method for training asymmetric generation of image generated by countermeasure network and electronic device
CN113642593B (en) Image processing method and image processing system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Room 410-1, floor 4, building 1, courtyard 10, North Longyu street, Changping District, Beijing 100085

Patentee after: Beijing chuangmizhihui IOT Technology Co.,Ltd.

Patentee after: Shanghai chuangmi Shulian Intelligent Technology Development Co.,Ltd.

Address before: Room 410-1, floor 4, building 1, courtyard 10, North Longyu street, Changping District, Beijing 100085

Patentee before: Beijing chuangmizhihui IOT Technology Co.,Ltd.

Patentee before: SHANGHAI CHUANGMI TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20230602

Address after: Room 001a, 11 / F, building 1, 588 Zixing Road, Minhang District, Shanghai, 200241

Patentee after: Shanghai chuangmi Shulian Intelligent Technology Development Co.,Ltd.

Address before: Room 410-1, floor 4, building 1, courtyard 10, North Longyu street, Changping District, Beijing 100085

Patentee before: Beijing chuangmizhihui IOT Technology Co.,Ltd.

Patentee before: Shanghai chuangmi Shulian Intelligent Technology Development Co.,Ltd.

TR01 Transfer of patent right