1 Introduction

BRDF is used to describe how irradiance in a given incident direction affects radiance in a given direction of reflection [1], it has a wide utilization in graphic rendering [2, 3], remote sensing [4, 5], target recognition [6], and other fields [7, 8]. In general, BRDF model can be divided into three categories: theoretical, empirical, and experimental model [9].

An empirical BRDF model named five-parameter model was proposed by Wu [10]. Wu used genetic algorithm to fit the undetermined parameters, the results demonstrate that the model has good agreement with experimental BRDF data, and it is a good choice to analyze reflectance properties of materials [11]. However, each of the different models is only suitable for typical material. To construct a model with wider applicability, we proposed a data-driven model based on GA-BP network.

The Back-Propagation neural network (BP Network) is the most widely used network (about 80%), which embodies the essence of neural network [12]. BP network can judge the error of output value and actual value according to the error formula, and it can modify the connection weight and threshold repeatedly to make the network error reach the expected value, so it has a strong function approximation ability. As long as the reasonable network structure and parameters are chosen, it can approximate any continuous function [13], so BP is a good choice to build BRDF model. However, BP network has its own disadvantages; because of the principle of gradient descent to adjust the weights, the training results can easily fall into local optimum and cannot achieve the desired results [14].

An effective way to solve this problem is to optimize the initial parameters of BP network for the initial parameters which have a great impact on training [15]. The genetic algorithm (GA) is good at finding candidates potentially close to global optimum and generally not disturbed by local minimum value, so it is suitable for solving the problem of training BP network. In the end of 1980s, Whitley [16], Montana [17], and Miller [18] first attempted to use genetic algorithm to train BP neural network. In recent years, a multitude of scholars have studied the combination of genetic algorithm and BP network, which has a wide range of applications, such as model building [19, 20], fault diagnosis [21], and strategy evaluation [22]. Compared to BP network, the GA-BP network algorithm has better convergence and computational accuracy.

To test the performance of GA-BP in BRDF applications, the BRDF data of two different kinds of materials were measured, and the calculation results demonstrate that GA-BP model has good agreement with experimental data and more accurate than BP model.

2 BP network

The BP network includes input layer, hidden layer, and output layer [23]. In general, there is only one input layer and one output layer, but the hidden layer can be one layer or multiple layers [12]. Single hidden layer is able to approximate continuous function at any interval [24] and too much layers will lead to long training time and over fitting, so a three-layer BP network with five neurons in a single hidden layer was employed. After determining the network structure, the BP network calculates the output H of the hidden layer according to the input data, the connection weights between the input layer and the hidden layer, and the threshold value of the hidden layer. The predicted output of BP neural network is calculated according to weights and thresholds of network connection and the output H of the hidden layer [25]. BP neural network used Levenberg–Marquardt as training algorithm, and corrects weight and threshold from the negative gradient direction of network prediction error until satisfactory error values are obtained [26].

In the case of the same network structure, weight value, and interval value, the relationship between the prediction error, mean square error, and node activation function of the output layer is shown in Table 1.

Table 1 Prediction errors corresponding to different activation functions

It can be seen that the selection of the hidden layer and output layer activation functions has a great impact on the prediction accuracy of the BP neural network. In this paper, we select logsig function and purelin function as the activation function of the hidden layer and output layer, respectively. The logsig function is:

$${\text{y = 1/}}\left[ {1 + \exp ( - x)} \right].$$
(1)

And the purelin function is:

$${\text{y}} = x$$
(2)

The structure of BP network is shown in Fig. 1. We chose the scattering angle and incidence angle as input layer, so the node of the input layer is 2. The BRDF value is set as the output data, so the node of the output layer is 1.

Fig. 1
figure 1

Structure of BP network

BP neural network must train the network before prediction to make the network to have associative memory and prediction ability through training. We choose 80% of the experimental data as training data, 10% as testing data, and 10% as validation data to verify the prediction ability of the BP network. The learning process of BP includes information forward and error backward propagation [27]. The input angle data are transferred from the input layer to the hidden layer and then to the output layer. The errors between network output results and expected value are transferred from the output layer to the hidden layer and the input layer in turn. During this process, the weights and thresholds of each layer are modified one by one. These two processes cooperate with each other, so that the network can get better parameters and achieve the desired results.

3 GA-BP network

BP neural network optimization based on genetic algorithm can be divided into three parts: BP neural network structure determination, genetic algorithm optimization, and BP neural network prediction. The purpose of optimizing BP neural network by genetic algorithm is to get better initial weights and threshold [28, 29]. Each weight and threshold of BP neural network is encoded by genetic algorithm and connected into a real number array as a chromosome in a certain order, and then the selection, crossover, and mutation operations are performed in the initial chromosome group [30]. In this way, the connection and the threshold of BP network can be optimized to make the network fitting effect more stable [31].

3.1 GA operation

Genetic algorithm filters individuals through selection operation, crossover operation, and mutation operation, so that individuals with good fitness are retained and individuals with poor fitness are eliminated [32]. The new population not only inherits the information of the previous generation, but also is superior to the previous generation. This process repeated until the desired results are obtained.

Selection operation refers to the selection of individuals from the old group to the new group with a certain probability [33]. The probability of individuals being selected is related to the fitness value. The prediction error of BP neural network is taken as the fitness value of the individual. It can be calculated from the formula 3:

$$F_{{\text{i}}} = \sum\limits_{i = 1}^{n} {abs(BRDF_{io} - BRDF_{ic} )} ,$$
(3)

where \(n\) is the number of output nodes, \(BRDF_{i0}\) is the ith experimental data, and \(BRDF_{ic}\) is the ith calculated data by BP network.

The better the fitness value of individuals, the greater the probability of being selected [34]. The selection strategy of genetic algorithm is based on roulette method and the selection probability of each individual is:

$$p_{i} = \frac{{f_{i} }}{{\sum\nolimits_{i = 1}^{N} {f_{i} } }},f_{i} = \frac{k}{{F_{i} }},$$
(4)

where \(F_{i}\) is the fitness value of individual \(i\), \(k\) is a coefficient, and \(N\) is the number of individual population.

Then, we use real number crossover method. The crossover operation at the j position between kth individual \(a_{k}\) and \(l\) th individual \(a_{l}\) is [35]:

$$\left\{ {\begin{array}{*{20}c} {a_{kj} = a_{kj} \cdot (1 - b) + a_{lj} \cdot b} \\ {a_{lj} = a_{lj} \cdot (1 - b) + a_{kj} \cdot b} \\ \end{array} } \right.,$$
(5)

where \(b\) is a random number in the interval [0,1].

Finally, the mutation operation is executed. It refers to the selection of an individual from a population and the selection of a point in the chromosome for mutation to produce a better individual. The operation method of selecting the \(j\) th gene of the first individual for mutation is [35]:

$$a_{ij} = \left\{ {\begin{array}{*{20}c} {a_{ij} + \left( {a_{ij} - a_{\max } } \right) \cdot f\left( g \right){\text{ r } > \text{ 0}}{.5}} \\ {a_{ij} + \left( {a_{\min } - a_{ij} } \right) \cdot f\left( g \right){\text{ r}} \le {0}{\text{.5}}} \\ \end{array} } \right.$$
(6)
$$f\left( g \right) = r \cdot \left( {1 - \frac{g}{{G_{\max } }}} \right)^{2} ,$$
(7)

where \(a_{\max }\) and \(a_{\min }\) are the upper and lower bounds of \(a_{ij}\), \(g\) is the current iteration number, \(G_{\max }\) is the largest number of evolutions, and \(r\) is a random number in the interval [0,1].

3.2 GA-BP operation

As shown in Fig. 2, the optimization procedure of the GA-BP model includes the determination of the structure of BP network, the population initialization, and the iterative operation of genetic algorithm. During the iteration, the BP network is used as an objective function of the genetic algorithm and the output of the function is the prediction error of the sample. The weights and thresholds of BP network are selected, mutated, and crossed due to the “natural environment”, and the individual fitness value are calculated after the evolution. After multiple iterations, the fitness of the individual obtained in the genetic algorithm will be greater as the error get smaller, and the "genes" of weights and thresholds will become better and better. Then, the superior varieties (weights and thresholds) will left so as to achieve the training purpose. After the weights and thresholds of BP network are determined by genetic algorithm, the GA-BP network is will be executed to train and fit the BRDF data.

Fig. 2
figure 2

Optimization process of GA-BP network algorithm

4 Experiments

We measured BRDF of two different materials and built BRDF models by BP algorithm and GA-BP algorithm, respectively. The accuracy and validity of GA-BP model are verified by comparing the results of these two models.

4.1 BRDF measurement

The BRDF experiment system consists of a visible light source, a precise turntable, a photo-detector, and a power meter. Under condition of the same incident angles (10°, 30°, and 45°) with the scattering angles range from − 70° to 70° in five steps, the BRDF values were measured. As shown in Figs. 3 and 4, these two materials have obvious specular reflection.

Fig. 3
figure 3

Relationship between wavelength, scattering angle, and BRDF of sample 1 (the incident angles are a 10°, b 30°, and c 45°)

Fig. 4
figure 4

Relationship between wavelength, scattering angle, and BRDF of sample 2 (the incident angles are a 10°, b 30°, and c 45°)

4.2 Data preprocessing

After obtaining the experimental BRDF data of two kinds of materials, to facilitate the calculation and analysis of BRDF by neural network, spectral integration is needed. Since the measured values are discrete, the BRDF values between 400 and 900 nm are integrated by the following formula:

$$\overline{{f_{r} }} = \frac{1}{{\lambda_{2} - \lambda_{1} }}\sum\limits_{i - 1}^{n} {f_{ri} \left( \lambda \right)\Delta \lambda } ,$$
(8)

where \(f_{ri}\) is the BRDF value of the ith wavelength and \(\Delta \lambda\) is the interval of wavelength.

4.3 Five-parameter BRDF model

The equation of five-parameter model is:

$$f_{r} \left( {\theta_{i} ,\theta_{r} ,\varphi_{r} } \right) = k_{b} \left[ {\frac{{k_{r}^{2} \cos \alpha }}{{1 + \left( {k_{r}^{2} - 1} \right)\cos \alpha }} \cdot \exp \left[ {b \cdot \left( {1 - \cos \gamma } \right)^{a} } \right] \cdot \frac{{G\left( {\theta_{i} ,\theta_{r} ,\varphi_{r} } \right)}}{{\cos \theta_{i} \cos \theta_{r} }}} \right]{ + }\frac{{k_{d} }}{{\cos \theta_{i} }},$$
(9)

where \(\theta_{r}\) and \(\theta_{i}\) are the scattering and incident angles, respectively; \(G\) is a geometric attenuation factor describes a shadowing phenomenon; \(k_{b}\), \(k_{d}\), \(k_{r}\), \(a\), \(b\) are parameters that need to be determined. We used GA to calculate the five undermined parameters.

4.4 GA-BP model

To improve the robustness and accuracy of the network, we use GA to optimize the initial weights and thresholds and locate some better search spaces in the solution space. Figure 5 shows the genetic search performance from an example. With generations, the better solutions are continuously found.

Fig. 5
figure 5

Genetic performance in optimization process

After optimization by genetic algorithm, the optimal weights and thresholds are brought into the network and combined with the experimental data for training. As shown in Fig. 6, the BP network optimized by GA has better training performance than BP network.

Fig. 6
figure 6

Performance of a BP network and b GA-BP network

Figures 7 and 8 show all the fitting results of sample 1 and sample 2, respectively, and the calculated curves of both BP network and GA-BP network have great agreement with experimental data at incident angles of 10°, 30°, and 45°. In comparison with these three models, the curve of the GA-BP network fits best with experimental data.

Fig. 7
figure 7

Fitting results of sample 1 (the incident angles are a 10°, b 30°, and c 45°)

Fig. 8
figure 8

Fitting results of sample 2 (the incident angles are a 10°, b 30°, and c 45°)

Tables 2 and 3 show the comparison of mean square error and time based on BP network and GA-BP network calculation for sample 1 and sample 2, respectively. It is obviously that the mean square error of GA-BP model is significantly lower than the value of BP model and the operation time of GA-BP model is perfectly short.

Table 2 Comparison of GA-BP network and BP network algorithm for sample 1
Table 3 Comparison of GA-BP network and BP network algorithm for sample 2

5 Conclusion

We proposed a method of building data-driven model based on GA-BP neural network and experimental data. To verify the performance of the GA-BP network, the BRDF values of two different space target materials in the spectral range of 400 nm–900 nm were measured, and the relationship between BRDF and wavelength and scattering angle was analyzed. The feasibility and practicability of the method are verified by the good agreement between the calculation data using the GA-BP model and experimental BRDF data. The BRDF model built by GA-BP neural network proposed in this paper has higher calculation accuracy compared to five-parameter model and BP neural network. In addition, the GA-BP model is not limited to typical materials, and it has more extensive applicability and fast speed.