CN113487107A - Large animal weight automatic evaluation method, system and medium based on multilayer radial basis network - Google Patents

Large animal weight automatic evaluation method, system and medium based on multilayer radial basis network Download PDF

Info

Publication number
CN113487107A
CN113487107A CN202110854716.8A CN202110854716A CN113487107A CN 113487107 A CN113487107 A CN 113487107A CN 202110854716 A CN202110854716 A CN 202110854716A CN 113487107 A CN113487107 A CN 113487107A
Authority
CN
China
Prior art keywords
radial basis
weight
layer
multilayer
network model
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
CN202110854716.8A
Other languages
Chinese (zh)
Other versions
CN113487107B (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.)
South China Agricultural University
Original Assignee
South China Agricultural University
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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN202110854716.8A priority Critical patent/CN113487107B/en
Publication of CN113487107A publication Critical patent/CN113487107A/en
Application granted granted Critical
Publication of CN113487107B publication Critical patent/CN113487107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06395Quality analysis or management

Abstract

The invention discloses a method, a system and a medium for automatically evaluating the weight of a large animal based on a multilayer radial basis network, wherein the method comprises the following steps: firstly, randomly generating a radial basis function central point in each layer, then generating radial basis neurons to form a radial basis layer, and finally connecting the radial basis layer and a full connection layer to construct a multilayer radial basis network model; inputting normalized body condition parameters of the large animals to train a multilayer radial basis network model, and optimizing the parameters of the model by adopting a loss function; and automatically estimating the weight by using the trained multilayer radial basis network model. The method adopts the one-dimensional body condition parameters of the large animals to predict the weight of the large animals, is basically not influenced by the postures and the motions of the animals, and has higher robustness for estimating the weight of the animals; the invention connects the plurality of radial basis network layers through the full connection layer, has higher fitting capability and has higher estimation precision only under the condition of inputting a one-dimensional body condition.

Description

Large animal weight automatic evaluation method, system and medium based on multilayer radial basis network
Technical Field
The invention belongs to the technical field of deep learning, and particularly relates to a method, a system and a medium for automatically evaluating the weight of a large animal based on a multilayer radial basis network.
Background
The live weight is an important index of large animals, the weight of the large animals can be timely and accurately obtained, the growth condition and the health condition of the large animals can be immediately evaluated, and the feed absorption rate of the large animals is detected according to the weight, or the large animals with different nutrition conditions are respectively fed, so that the maximum utilization rate and the optimal growth control of the feed are achieved. How to automatically and accurately measure the weight of a large animal is one of the research focuses of current intelligent agriculture. The traditional large-scale animal weight detection usually needs to be in direct contact with a large-scale animal, the large-scale animal needs to be moved to weighing equipment such as an electronic scale, the whole process is time-consuming and labor-consuming, errors of manual measurement are large, and epidemic disease spread is easily caused by human and animal contact; sometimes, drugs such as sedatives are used for assisting, so that great stress is brought to large animals, daily activities such as eating and mating are influenced, and even sudden death of the large animals is caused, so that great economic loss is caused.
Recently, various methods for evaluating the body weight of large animals have been proposed, and are largely classified into 2 categories, i.e., direct measurement and indirect measurement. In the direct measurement method, a force downward in addition to the body weight due to the movement of a large animal or the like is difficult to solve. In indirect measurement, the current method needs to obtain a two-dimensional area of a large animal, the acquisition of the parameter has high precision requirement on a captured image, the large animal is required to be in a relatively fixed position, and the method is extremely susceptible to the posture of the large animal. According to the animal feeding theory, the body condition and the weight of the large-scale animal have a potential relation, and after the breed of the large-scale animal is determined, the body condition and the weight can be automatically estimated by constructing a deduction model of the body condition and the weight. Meanwhile, if only a few one-dimensional body condition characteristics, such as body height, girth and the like, of the large-sized animal need to be acquired, the requirement for capturing images of the large-sized animal is greatly reduced, and the captured images have higher robustness.
Disclosure of Invention
The invention mainly aims to overcome the defects of the prior art and provide a method, a system and a medium for automatically evaluating the weight of a large animal based on a multilayer radial basis network.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a method for automatically evaluating the weight of a large animal based on a multilayer radial basis network, which comprises the following steps:
generating central points in a position random mode according to the number of the central points of each set radial base layer, generating corresponding radial basis kernel functions and radial basis neurons based on the central points, adjusting dimensions by connecting full-connection layers to connect the next layer, and repeating the steps to construct a multilayer radial basis network model;
training a multilayer radial basic network model, firstly inputting body condition parameters subjected to respective normalization processing into the multilayer radial basic network model to obtain output data, inputting the output data and standard data as parameters of a loss function to calculate a loss value, then optimizing parameters of the multilayer radial basic network model by using the loss function, and obtaining the trained multilayer radial basic network model when the loss value stably reaches an expected minimum value;
and inputting the normalized body condition parameter result of the large animal to be predicted into the trained multilayer radial basis network model by taking the normalized body condition parameter result of the large animal to be predicted as input data, wherein the output of the multilayer radial basis network model is the estimated value of the weight of the large animal to be predicted.
As a preferred technical scheme, the central point is a vector with the same dimension as the input data, represents a point in the dimension space, has a random initial position, and is updated and adjusted by derivation through a loss function;
the process of generating the radial basis kernel function and the radial basis neuron corresponding to the central point specifically includes: randomly generating a radial basis neuron control number sigma by each central point, and regenerating a radial basis neuron by each central point
Figure BDA0003183699550000031
Wherein the content of the first and second substances,
Figure BDA0003183699550000032
is the ith central point, x, of the kth layerkFor the input data of the k layer, sigma controls the shape and the action range of the radial basis neuron, the initial value is random, and the updating adjustment is carried out by derivation of a loss function; the output data of the layer is a matrix with the row number of the radial basis network neurons of the layer and the column number of 1;
the full connection layer is a matrix with the row number equal to the column number of the output matrix of the radial base layer, and the dimensionality of output data is adjusted through matrix multiplication.
As a preferred technical solution, the working process of the radial basis function is as follows:
mapping the input data from low latitude to high latitude, and sequentially calculating Euclidean distances between the data mapped to the high latitude and each central point of the kth layer
Figure BDA0003183699550000033
Is that
Figure BDA0003183699550000034
Wherein xkFor input data mapped on all radial basis kernels of the k-th layer, ciIs the ith central point, ciAnd xiAre one-dimensional vectors of the same dimension;
of ith radial basis function of layer k controlled according to sigmaShape of
Figure BDA0003183699550000035
And by means of radial basis kernel functions, i.e.
Figure BDA0003183699550000036
Wherein
Figure BDA0003183699550000037
Sequentially outputting reaction values of all central points under the action of the radial basis kernel function for the output value of the ith radial basis kernel function of the kth layer;
connecting the full connection layer and obtaining its output
Figure BDA0003183699550000038
Wherein
Figure BDA0003183699550000039
Is the output value of the j-th neuron in the k-th layer in the fully connected layer, bkRepresents the offset number of the k-th layer of the full link layer,
Figure BDA00031836995500000310
and representing the weight of the jth fully-connected neuron in the kth layer, and then connecting the next layer of radial basis network.
As a preferred technical solution, the body condition parameters include body length, body height, body width, abdominal circumference, and waist circumference.
As a preferred technical solution, the normalization processing is specifically to normalize the input body condition parameters and the corresponding body weights respectively, and the normalization methods are the same, specifically as the following formula:
Figure BDA0003183699550000041
wherein x and x' respectively represent a one-dimensional vector consisting of body condition parameters of a large animal before normalization and a one-dimensional vector consisting of body condition parameters of the large animal after normalization, min is a one-dimensional vector consisting of theoretical minimum values of body conditions of the large animal, and max is theoretical minimum value of body conditions of the large animalThe maximum value constitutes a one-dimensional vector.
As a preferred technical solution, the step of inputting the body condition parameters after the normalization processing into the multilayer radial basis network model to obtain output data specifically includes the following steps:
calculating the ith input data of the k layer and the central point of each neuron of the k layer
Figure BDA0003183699550000042
European distance of
Figure BDA0003183699550000043
Figure BDA0003183699550000044
Expanding the data by a power series:
Figure BDA0003183699550000045
mapping from low dimension to high dimension in an expanded form of a polynomial kernel to extract more feature information, where nkIndicates the number of neurons in the k-th layer, xkRepresents the input data of the k-th layer,
Figure BDA0003183699550000046
representing the ith neuron central point of the kth layer;
adjusting the dimensionality of the output data matrix by the last full-connection layer, outputting the estimated weight y' of the current multilayer radial basis network model, and performing inverse normalization: y ═ y' (Weight)max-Weightmin)+WeightminObtaining estimated Weight of large animal, wherein WeightmaxAnd WeightminThe theoretical maximum and minimum body weights for the large animal are shown.
As a preferred technical solution, the loss function is specifically:
Figure BDA0003183699550000047
the function is expressed in an expansion mode to obtain a network general formula as follows:
Figure BDA0003183699550000048
wherein L is the loss value derived from the loss function, YiIs a pre-measured standard weight data, y, for the ith large animaliEstimating the weight data of the ith large animal for the multilayer radial basis network, wherein N is the data quantity input into the multilayer radial basis network model, and N iskNumber of neurons representing layer k network, wkFull connection layer weight, x, representing the k-th layer networkkRepresenting the input to the k-th network,
Figure BDA0003183699550000051
representing the center point of the jth neuron at the kth level.
As a preferred technical solution, the parameters for optimizing the multilayer radial basis network model by using the loss function specifically include:
firstly, aiming at a loss function, gradient derivation is carried out by taking a central point c of a radial basis network as a variable, and a value obtained by the derivation is subtracted from the central point before optimization to realize the updating of a central point parameter;
then, aiming at the loss function, gradient derivation is carried out by taking the radial basis neuron control number sigma as a variable, and a value obtained by subtracting the derivation from the sigma is used for updating parameters;
finally, aiming at the loss function, gradient derivation is carried out by taking the neuron weight w of the full connection layer as a variable, and the value obtained by subtracting the derivation from the neuron weight of the full connection layer is used for updating parameters;
and continuously inputting multiple groups of large animal normalized body condition parameters and weights for iteration, and updating the central point, the neuron control number and the weight of the full-connection layer until a nonlinear model for stably expressing the body condition and the weight is obtained.
The invention provides a large animal weight automatic evaluation system based on a multilayer radial basis network, which is applied to the large animal weight automatic evaluation method based on the multilayer radial basis network and comprises a construction module, a training module and a prediction module;
the construction module is used for generating central points in a position random mode according to the number of the central points of each set radial base layer, generating corresponding radial basis kernel functions based on the central points, further obtaining radial basis neurons to form the radial base layers, connecting the radial base layers and the full connection layers to generate a layer of radial basis network model, and repeating the steps to construct a multilayer radial basis network model;
the training module is used for training the multilayer radial basic network model, firstly, inputting the body condition parameters after normalization processing into the multilayer radial basic network model to obtain output data, inputting the output data and standard data as parameters of a loss function to calculate a loss value, then, optimizing the parameters of the multilayer radial basic network model by using the loss function, and obtaining the trained multilayer radial basic network model when the loss value stably reaches an expected minimum value;
and the prediction module is used for inputting the normalized body condition parameters of the large animals to be predicted into the trained multilayer radial basis network model, calculating the weight prediction result after normalization, performing inverse normalization on the result, and outputting the multilayer radial basis network model to obtain the estimated value of the weight of the large animals to be predicted.
The invention further provides a computer readable storage medium, which stores a program, and when the program is executed by a processor, the program realizes the automatic evaluation method for the weight of the large animal based on the multilayer radial basis network.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) compared with the method using two-dimensional area data and three-dimensional volume data of the large animal, the method using the two-dimensional area data and the three-dimensional volume data of the large animal as input data has the advantages that the method using the two-dimensional area data and the three-dimensional volume data of the large animal is not affected by the posture and the motion of the large animal basically, and the two-dimensional data and the three-dimensional data are affected by the posture and the motion greatly, so that the method has high robustness for estimating the weight of the large animal.
(2) The network model constructed by the invention adopts the Gaussian radial basis function, wherein the local fitting enables the Gaussian kernel to only affect a certain local area of the input space by a few weights, so that the data input each time only needs to be adjusted for the corresponding parameters, and the learning speed is high. If the radial basic network layer constructed by the method has enough uniformly distributed Gaussian kernel functions, theoretically, any interested function can be approximated.
(3) According to the method, the multiple layers of radial basis network layers are connected through the full-connection layer, the residual error function of the front layer of radial basis network can be fitted by sequentially using the rear layer of radial basis network, and the multiple layers of radial basis networks with higher fitting capability are sequentially obtained, so that the estimation accuracy is higher only under the condition of inputting a one-dimensional body condition.
(4) The invention solves the problem that the current weight measurement method mainly based on manual measurement in large-scale animal breeding reduces human and animal contact, avoids animal stress reaction caused by human and animal contact, improves animal welfare, reduces the risk of virus mutual transmission between human and animal, and provides a non-contact automatic weight evaluation method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for automatically estimating weight of a live pig based on a multilayer radial basis network according to an embodiment of the invention;
FIG. 2 is a block diagram of a multi-layer radial basis network model according to an embodiment of the present invention;
fig. 3(a) is a graph of the effect of sow samples on weight estimation after multi-level radial basis network training;
FIG. 3(b) is a graph of the effect of boar samples on weight estimation after multi-layer radial basis network training;
FIG. 3(c) is a graph of the effect of a boar and sow mixed sample on weight estimation after multi-layer radial basis network training;
FIG. 4(a) is a graph of the effect of a sow sample on weight estimation after training of a fully-connected neural network;
FIG. 4(b) is a graph of the effect of boar samples on weight estimation after training of a fully-connected neural network;
FIG. 4(c) is a graph showing the effect of a boar and sow mixed sample on weight estimation after full-connectivity neural network training;
FIG. 5(a) is a graph of number of iterations of a fully-connected neural network versus loss value;
FIG. 5(b) is a graph of number of iterations versus loss value for a multi-layer radial basis network;
FIG. 6 is a schematic structural diagram of an automatic pig weight estimation system based on a multilayer radial basis network according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As shown in fig. 1, the embodiment provides a large animal weight automatic evaluation method based on a multilayer radial basis network, the embodiment takes a live pig as an example for description, and other large animals such as cattle, sheep, horses, and the like are similarly applicable to the technical solution of the embodiment, and the embodiment of the weight automatic evaluation method for the live pig includes the following steps:
(1) a stage of constructing a multilayer radial basis network model, comprising:
(1-1) setting the number of central points of each layer, and randomly generating central points c with corresponding number; the central point c is a vector with the same dimension as the input data, represents a point in the dimension space, has a random initial position, and is updated and adjusted by derivation of a loss function.
(1-2) randomly generating a radial basis neuron control number σ for each central point, and regenerating a radial basis neuron from each central point
Figure BDA0003183699550000091
Wherein the content of the first and second substances,
Figure BDA0003183699550000092
is the ith central point, x, of the kth layerkFor the input data of the k layer, sigma controls the shape and the action range of the radial basis neuron, the initial value is random, and the updating adjustment is carried out by derivation of a loss function; the output data of the layer is a matrix with the row number of the radial basis network neurons of the layer and the column number of 1;
and (1-3) connecting the full connection layer for dimension adjustment to connect the next layer of radial basis network. The fully-connected layer is a matrix with the row number equal to the column number of the output matrix of the radial base layer, and the dimensionality of output data is adjusted through matrix multiplication.
And (1-4) repeating the steps from (1-1) to (1-3) to construct a multilayer radial basis network model.
(2) Training a multilayer radial basis network model stage, comprising:
(2-1) normalizing the body condition parameters of the live pigs as follows:
Figure BDA0003183699550000093
wherein x and x' represent body condition parameters before and after normalization, respectively, the body condition parameters including body length, body height, body width, abdominal circumference, waist circumference; min is the minimum value of the theoretical weight of the live pig, and max is the maximum value of the theoretical weight of the live pig. The body condition parameters of the live pigs are normalized to be within the range of 0-1, so that the learning of the multilayer radial basis network is facilitated.
(2-2) inputting the normalized body condition parameters into the multilayer radial basis network model to obtain output data of the model, wherein the output data is as follows:
calculating the ith input data of the k layer and the central point of each neuron of the k layer
Figure BDA0003183699550000094
European distance of
Figure BDA0003183699550000095
Figure BDA0003183699550000096
Expanding the data by a power series:
Figure BDA0003183699550000097
mapping from low dimension to high dimension in an expanded form of a polynomial kernel to extract more feature information, where nkIndicates the number of neurons in the k-th layer, xkRepresents the input data of the k-th layer,
Figure BDA0003183699550000098
representing the ith neuron central point of the kth layer;
adjusting the dimensionality of the output data matrix by the last full-connection layer, outputting the estimated weight y' of the current multilayer radial basis network model, and performing inverse normalization: y ═ y' (Weight)max-Weightmin)+WeightminObtaining the estimated Weight of the live pig, wherein WeightmaxAnd WeightminThe maximum value and the minimum value of the theoretical weight of the live pig。
(2-3) inputting the output data and the standard data into a loss function, performing gradient derivation based on the loss function, and updating parameters of the multilayer radial basis network model;
the loss function is specifically:
Figure BDA0003183699550000101
the function is expressed in an expansion mode to obtain a network general formula as follows:
Figure BDA0003183699550000102
wherein L is the loss value derived from the loss function, YiIs a pre-measured standard weight data of the ith live pig, yiThe weight data of the ith live pig estimated for the multilayer radial basis network, N is the data quantity input into the multilayer radial basis network model, NkNumber of neurons representing layer k network, wkFull connection layer weight, x, representing the k-th layer networkkRepresenting the input to the k-th network,
Figure BDA0003183699550000103
representing the center point of the jth neuron at the kth level.
The parameters for updating the multilayer radial basis network model specifically include:
performing gradient derivation by taking the central point c as a variable through a loss function, and subtracting a value obtained by the derivation from the central point c to update parameters;
gradient derivation is performed by using the radial basis neuron control number sigma as a variable through a loss function, and a value obtained by subtracting the derivation from sigma is used for parameter updating.
And (4) performing gradient derivation by taking the neuron weight of the full connection layer as a variable through a loss function, and subtracting a value obtained by derivation from the neuron weight of the full connection layer to update the parameter.
And (2-4) repeating the steps from (2-1) to (2-3), and obtaining a nonlinear model of the stable expression body condition and the body weight after iterative updating.
(3) Predicting by using the trained multilayer radial basis network model;
(3-1) normalizing the body condition parameters of the live pigs to be predicted;
(3-2) inputting the normalized body condition parameters of the live pigs into a multilayer radial basis network model;
and (3-3) automatically obtaining a weight estimation value of the live pig to be predicted by the multilayer radial basis network model.
Fig. 2 is a block diagram of a multi-layer radial basis network model of the present invention, in which the Radial Basis (RBF) kernel of the first layer is described in an expanded manner. Firstly, mapping input data from low latitude to high latitude, and sequentially calculating Euclidean distances between the data mapped to the high latitude and each central point of a k-th layer
Figure BDA0003183699550000111
Is that
Figure BDA0003183699550000112
Wherein xkFor input data mapped on all radial basis kernels of the k-th layer, ciIs the ith central point, ciAnd xiAre one-dimensional vectors of the same dimension;
shape of ith radial basis function of kth layer controlled according to sigma
Figure BDA0003183699550000113
And by means of radial basis kernel functions, i.e.
Figure BDA0003183699550000114
Wherein
Figure BDA0003183699550000115
Sequentially outputting reaction values of all central points under the action of the radial basis kernel function for the output value of the ith radial basis kernel function of the kth layer;
connecting the full connection layer and obtaining its output
Figure BDA0003183699550000116
Wherein
Figure BDA0003183699550000117
Is the output value of the j-th neuron in the k-th layer in the fully connected layer, bkRepresents the offset number of the k-th layer of the full link layer,
Figure BDA0003183699550000118
and representing the weight of the jth fully-connected neuron in the kth layer, then connecting the next layer of radial basis network until finally outputting the weight estimated value, and thus, connecting each layer of RBFs together through the fully-connected layer to form the multilayer radial basis network used by the invention.
Fig. 3(a), fig. 3(b) and fig. 3(c) respectively illustrate the weight prediction results of a multilayer radial basis network (multilayer RBF network) for three mixed samples of boars, sows and sows after network training, and fig. 4(a), fig. 4(b) and fig. 4(c) respectively illustrate the weight prediction results of a fully-connected neural network (BP network) for three samples of boars, sows and boars after mixed network training. In the figure, the abscissa represents the actual weight of a live pig, the ordinate represents the predicted weight of the neural network on the live pig, each point represents each pig, the oblique dotted line represents the perfect weight prediction, therefore, the points closer to the oblique dotted line indicate that the prediction result is more perfect, and it can be seen that in the multilayer radial basis network, the prediction of the sow weight (figure 3(a)) is better than that of a boar (figure 3(b)), the prediction of the boar weight is better than that of a boar mixture (figure 3(c)), and the weight prediction effect of the multilayer radial basis network is better than that of a fully-connected neural network as a whole, so that the local fitting performance of the multilayer radial basis network is proved to be better in body condition-weight prediction.
Fig. 5(a) and 5(b) depict loss curves of a training set and a test set of a multilayer radial basis function neural network and a fully-connected neural network in network training, and it can be seen that the training iteration number of the multilayer radial basis function network is almost trained in about one hundred, the training iteration number of the fully-connected neural network needs more than three hundred, and the learning speed of the multilayer radial basis function network is higher than that of the fully-connected neural network.
As can be seen from table 1, the predicted result of the multilayer radial basis network of the present embodiment is better than that of the fully-connected neural network; wherein, the absolute error is defined as the average value of the difference value between the predicted weight and the real weight, and can directly reflect the error of weight prediction; the relative error is defined as the average error value which is larger than the average weight of the live pigs, and all errors can be scaled to the same scale, so that the accuracy of the errors can be reflected better.
Sex Network model Absolute error Relative error
Duroc boar Radial basis function neural network 1.71 1.10%
Duroc sow Radial basis function neural network 1.42 1.02%
Duroc male and female mix Radial basis function neural network 1.95 1.05%
Duroc boar Fully connected neural network 1.96 1.70%
Duroc sow Fully connected neural network 1.85 1.35%
Duroc male and female mix Fully connected neural network 2.2 1.95%
TABLE 1 error statistics of multi-layer radial basis network and BP network prediction results
As shown in fig. 6, in another embodiment of the present application, there is provided an automatic pig weight evaluation system based on a multilayer radial basis network, which includes a construction module, a training module and a prediction module;
the construction module is used for generating a central point in a position random mode according to the number of the central points of the set radial basic layers, generating a corresponding radial basic kernel function and a radial basic neuron based on the central point, adjusting dimensionality by connecting full-connection layers to connect the next layer, and repeating the steps to construct a multilayer radial basic network model;
the training module is used for training the multilayer radial basic network model, firstly, inputting the body condition parameters after normalization processing into the multilayer radial basic network model to obtain output data, constructing a loss function according to the output data and standard data, and then optimizing the parameters of the multilayer radial basic network model by using the loss function to obtain the trained multilayer radial basic network model;
and the prediction module is used for inputting the normalized body condition parameter result of the live pig to be predicted into the trained multilayer radial basis network model, and the output of the multilayer radial basis network model is the estimated value of the weight of the large animal to be predicted.
It should be noted that the system provided in the above embodiment is only illustrated by dividing the above function modules, and in practical applications, the above function allocation may be completed by different function modules according to needs, that is, the internal structure is divided into different function modules to complete all or part of the above described functions.
As shown in fig. 7, in another embodiment of the present application, there is further provided a computer-readable storage medium storing a program, which when executed by a processor, implements a method for automatically estimating the weight of a large animal based on a multi-layer radial basis network, specifically:
generating central points in a position random mode according to the number of the central points of each set radial base layer, generating corresponding radial basis kernel functions and radial basis neurons based on the central points, adjusting dimensions by connecting full-connection layers to connect the next layer, and repeating the steps to construct a multilayer radial basis network model;
training a multilayer radial basic network model, firstly inputting body condition parameters after normalization processing into the multilayer radial basic network model to obtain output data, constructing a loss function according to the output data and standard data, and then optimizing parameters of the multilayer radial basic network model by using the loss function to obtain the trained multilayer radial basic network model;
and taking the normalized body condition parameter result of the live pig to be predicted as input, inputting the body condition parameter result into the trained multilayer radial basis network model, and outputting the output of the multilayer radial basis network model, namely the estimated value of the weight of the large animal to be predicted.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (10)

1. The method for automatically evaluating the weight of the large animal based on the multilayer radial basis network is characterized by comprising the following steps of:
generating central points in a position random mode according to the number of the central points of each set radial base layer, generating corresponding radial basis kernel functions and radial basis neurons based on the central points, adjusting dimensions by connecting full-connection layers to connect the next layer, and repeating the steps to construct a multilayer radial basis network model;
training a multilayer radial basic network model, firstly inputting body condition parameters subjected to respective normalization processing into the multilayer radial basic network model to obtain output data, inputting the output data and standard data as parameters of a loss function to calculate a loss value, then optimizing parameters of the multilayer radial basic network model by using the loss function, and obtaining the trained multilayer radial basic network model when the loss value stably reaches an expected minimum value;
and inputting the normalized body condition parameter result of the large animal to be predicted into the trained multilayer radial basis network model by taking the normalized body condition parameter result of the large animal to be predicted as input data, wherein the output of the multilayer radial basis network model is the estimated value of the weight of the large animal to be predicted.
2. The method for automatically evaluating the weight of the large animal based on the multilayer radial basis network is characterized in that the central point is a vector with the same dimension as the input data, represents a point in the dimension space, has a random initial position, and is updated and adjusted by derivation through a loss function;
the process of generating the radial basis kernel function and the radial basis neuron corresponding to the central point specifically includes: randomly generating a radial basis neuron control number sigma by each central point, and regenerating a radial basis neuron by each central point
Figure RE-FDA0003211332530000011
Wherein the content of the first and second substances,
Figure RE-FDA0003211332530000012
is the ith central point, x, of the kth layerkFor the input data of the k layer, sigma controls the shape and the action range of the radial basis neuron, the initial value is random, and the updating adjustment is carried out by derivation of a loss function; the output data of the layer is a matrix with the row number of the radial basis network neurons of the layer and the column number of 1;
the full connection layer is a matrix with the row number equal to the column number of the output matrix of the radial base layer, and the dimensionality of output data is adjusted through matrix multiplication.
3. The method for automatically evaluating the body weight of the large animal based on the multilayer radial basis network as claimed in claim 1, wherein the working process of the radial basis kernel function is as follows:
mapping the input data from low latitude to high latitude, and sequentially calculating Euclidean distances between the data mapped to the high latitude and each central point of the kth layer
Figure RE-FDA0003211332530000021
Is that
Figure RE-FDA0003211332530000022
Wherein xkFor input data mapped on all radial basis kernels of the k-th layer, ciIs the ith central point, ciAnd xiAre one-dimensional vectors of the same dimension;
shape of ith radial basis function of kth layer controlled according to sigma
Figure RE-FDA0003211332530000023
And by means of radial basis kernel functions, i.e.
Figure RE-FDA0003211332530000024
Wherein
Figure RE-FDA0003211332530000025
Sequentially outputting reaction values of all central points under the action of the radial basis kernel function for the output value of the ith radial basis kernel function of the kth layer;
connecting the full connection layer and obtaining its output
Figure RE-FDA0003211332530000026
Wherein
Figure RE-FDA0003211332530000027
Is the output value of the j-th neuron in the k-th layer in the fully connected layer, bkRepresents the offset number of the k-th layer of the full link layer,
Figure RE-FDA0003211332530000028
and representing the weight of the jth fully-connected neuron in the kth layer, and then connecting the next layer of radial basis network.
4. The method for automatically estimating the body weight of the large-scale animal based on the multilayer radial basis network as claimed in claim 1, wherein the body condition parameters comprise body length, body height, body width, abdominal circumference and waist circumference.
5. The method for automatically evaluating the body weight of the large animal based on the multilayer radial basis network as claimed in claim 1, wherein the normalization process is to normalize the input body condition parameters and the corresponding body weights respectively, and the normalization methods are the same, and are specifically as follows:
Figure RE-FDA0003211332530000029
wherein x and x' respectively represent a one-dimensional vector consisting of body condition parameters of a certain large animal before normalization and a one-dimensional vector consisting of body condition parameters of the large animal after normalization, min is a one-dimensional vector consisting of theoretical minimum values of all body conditions of the large animal, and max is a one-dimensional vector consisting of theoretical maximum values of all body conditions of the large animal.
6. The method for automatically evaluating the body weight of the large animal based on the multilayer radial basis network as claimed in claim 1, wherein the step of inputting the body condition parameters after the normalization processing into the multilayer radial basis network model to obtain the output data specifically comprises the following steps:
calculating the ith input data of the k layer and the central point of each neuron of the k layer
Figure RE-FDA00032113325300000210
European distance of
Figure RE-FDA00032113325300000211
Figure RE-FDA00032113325300000212
Expanding the data by a power series:
Figure RE-FDA00032113325300000213
mapping from low dimension to high dimension in an expanded form of a polynomial kernel to extract more feature information, where nkIndicates the number of neurons in the k-th layer, xkRepresents the input data of the k-th layer,
Figure RE-FDA0003211332530000031
representing the ith neuron central point of the kth layer;
adjusting the dimensionality of the output data matrix by the last full-connection layer, outputting the estimated weight y' of the current multilayer radial basis network model, and performing inverse normalization: y ═ y' (Weight)max-Weightmin)+WeightminObtaining estimated Weight of large animal, wherein WeightmaxAnd WeightminThe theoretical maximum and minimum body weights for the large animal are shown.
7. The method for automatically evaluating the body weight of the large animal based on the multilayer radial basis network as claimed in claim 1, wherein the loss function is specifically as follows:
Figure RE-FDA0003211332530000032
the function is expressed in an expansion mode to obtain a network general formula as follows:
Figure RE-FDA0003211332530000033
wherein L is the loss value derived from the loss function, YiIs a pre-measured standard weight data, y, for the ith large animaliEstimating the weight data of the ith large animal for the multilayer radial basis network, wherein N is the data quantity input into the multilayer radial basis network model, and N iskNumber of neurons representing layer k network, wkFull connection layer weight, x, representing the k-th layer networkkRepresenting the input to the k-th network,
Figure RE-FDA0003211332530000034
representing the center point of the jth neuron at the kth level.
8. The method for automatically evaluating the body weight of the large animal based on the multilayer radial basis network according to claim 1, wherein the parameters for optimizing the multilayer radial basis network model by using the loss function are specifically as follows:
firstly, aiming at a loss function, gradient derivation is carried out by taking a central point c of a radial basis network as a variable, and a value obtained by the derivation is subtracted from the central point before optimization to realize the updating of a central point parameter;
then, aiming at the loss function, gradient derivation is carried out by taking the radial basis neuron control number sigma as a variable, and a value obtained by subtracting the derivation from the sigma is used for updating parameters;
finally, aiming at the loss function, gradient derivation is carried out by taking the neuron weight w of the full connection layer as a variable, and the value obtained by subtracting the derivation from the neuron weight of the full connection layer is used for updating parameters;
and continuously inputting multiple groups of large animal normalized body condition parameters and weights for iteration, and updating the central point, the neuron control number and the weight of the full-connection layer until a nonlinear model for stably expressing the body condition and the weight is obtained.
9. The automatic large animal weight evaluation system based on the multilayer radial basis network is characterized by being applied to the automatic large animal weight evaluation method based on the multilayer radial basis network, which is disclosed by any one of claims 1 to 8, and comprising a construction module, a training module and a prediction module;
the construction module is used for generating central points in a position random mode according to the number of the central points of each set radial base layer, generating corresponding radial basis kernel functions based on the central points, further obtaining radial basis neurons to form the radial base layers, connecting the radial base layers and the full connection layers to generate a layer of radial basis network model, and repeating the steps to construct a multilayer radial basis network model;
the training module is used for training the multilayer radial basic network model, firstly, inputting the body condition parameters after normalization processing into the multilayer radial basic network model to obtain output data, inputting the output data and standard data as parameters of a loss function to calculate a loss value, then, optimizing the parameters of the multilayer radial basic network model by using the loss function, and obtaining the trained multilayer radial basic network model when the loss value stably reaches an expected minimum value;
and the prediction module is used for inputting the normalized body condition parameters of the large animals to be predicted into the trained multilayer radial basis network model, calculating the weight prediction result after normalization, performing inverse normalization on the result, and outputting the multilayer radial basis network model to obtain the estimated value of the weight of the large animals to be predicted.
10. A computer-readable storage medium storing a program, wherein the program, when executed by a processor, implements the method for automatically estimating the weight of a large animal based on a multi-layer radial basis network according to any one of claims 1 to 8.
CN202110854716.8A 2021-07-28 2021-07-28 Automatic large animal weight assessment method, system and medium based on multilayer radial basis network Active CN113487107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110854716.8A CN113487107B (en) 2021-07-28 2021-07-28 Automatic large animal weight assessment method, system and medium based on multilayer radial basis network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110854716.8A CN113487107B (en) 2021-07-28 2021-07-28 Automatic large animal weight assessment method, system and medium based on multilayer radial basis network

Publications (2)

Publication Number Publication Date
CN113487107A true CN113487107A (en) 2021-10-08
CN113487107B CN113487107B (en) 2024-04-12

Family

ID=77943029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110854716.8A Active CN113487107B (en) 2021-07-28 2021-07-28 Automatic large animal weight assessment method, system and medium based on multilayer radial basis network

Country Status (1)

Country Link
CN (1) CN113487107B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416483A (en) * 2018-04-27 2018-08-17 无锡南洋职业技术学院 RBF type teaching quality evaluation prediction techniques based on PSO optimizations
CN109002942A (en) * 2018-09-28 2018-12-14 河南理工大学 A kind of short-term load forecasting method based on stochastic neural net
CN109144099A (en) * 2018-08-28 2019-01-04 北京航空航天大学 Unmanned aerial vehicle group action scheme fast evaluation method based on convolutional neural networks
US20190114531A1 (en) * 2017-10-13 2019-04-18 Cambia Health Solutions, Inc. Differential equations network
CN110426112A (en) * 2019-07-04 2019-11-08 平安科技(深圳)有限公司 Live pig weight measuring method and device
CN110443364A (en) * 2019-06-21 2019-11-12 深圳大学 A kind of deep neural network multitask hyperparameter optimization method and device
CN110472280A (en) * 2019-07-10 2019-11-19 广东工业大学 A kind of power amplifier behavior modeling method based on generation confrontation neural network
CN111353631A (en) * 2019-11-26 2020-06-30 国网山东省电力公司电力科学研究院 Thermal power plant condenser vacuum degree prediction method based on multilayer LSTM
CN112037011A (en) * 2020-08-14 2020-12-04 百维金科(上海)信息科技有限公司 Credit scoring method based on FOA-RBF neural network
WO2021082809A1 (en) * 2019-10-29 2021-05-06 山东科技大学 Training optimization method for foreign exchange time series prediction
CN112862757A (en) * 2021-01-14 2021-05-28 四川大学 Weight evaluation system based on computer vision technology and implementation method
CN112967238A (en) * 2021-02-23 2021-06-15 广东工业大学 Porous medium permeability prediction method, electronic device and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190114531A1 (en) * 2017-10-13 2019-04-18 Cambia Health Solutions, Inc. Differential equations network
CN108416483A (en) * 2018-04-27 2018-08-17 无锡南洋职业技术学院 RBF type teaching quality evaluation prediction techniques based on PSO optimizations
CN109144099A (en) * 2018-08-28 2019-01-04 北京航空航天大学 Unmanned aerial vehicle group action scheme fast evaluation method based on convolutional neural networks
CN109002942A (en) * 2018-09-28 2018-12-14 河南理工大学 A kind of short-term load forecasting method based on stochastic neural net
CN110443364A (en) * 2019-06-21 2019-11-12 深圳大学 A kind of deep neural network multitask hyperparameter optimization method and device
CN110426112A (en) * 2019-07-04 2019-11-08 平安科技(深圳)有限公司 Live pig weight measuring method and device
CN110472280A (en) * 2019-07-10 2019-11-19 广东工业大学 A kind of power amplifier behavior modeling method based on generation confrontation neural network
WO2021082809A1 (en) * 2019-10-29 2021-05-06 山东科技大学 Training optimization method for foreign exchange time series prediction
CN111353631A (en) * 2019-11-26 2020-06-30 国网山东省电力公司电力科学研究院 Thermal power plant condenser vacuum degree prediction method based on multilayer LSTM
CN112037011A (en) * 2020-08-14 2020-12-04 百维金科(上海)信息科技有限公司 Credit scoring method based on FOA-RBF neural network
CN112862757A (en) * 2021-01-14 2021-05-28 四川大学 Weight evaluation system based on computer vision technology and implementation method
CN112967238A (en) * 2021-02-23 2021-06-15 广东工业大学 Porous medium permeability prediction method, electronic device and storage medium

Also Published As

Publication number Publication date
CN113487107B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN110426112B (en) Live pig weight measuring method and device
Viazzi et al. Automatic mass estimation of Jade perch Scortum barcoo by computer vision
WO2021259090A1 (en) Method and apparatus for federated learning, and chip
Sharma et al. Prediction of first lactation 305-day milk yield in Karan Fries dairy cattle using ANN modeling
Sant’Ana et al. Weighing live sheep using computer vision techniques and regression machine learning
CN109558889B (en) Live pig comfort degree analysis method and device
AKKOL et al. Comparison of artificial neural network and multiple linear regression for prediction of live weight in hair goats
Li et al. Using artificial neural networks to predict pH, ammonia, and volatile fatty acid concentrations in the rumen
Shen et al. Assessment of dairy cow feed intake based on BP neural network with polynomial decay learning rate
CN111047073B (en) Aquaculture water quality prediction method and system based on neural network
Kwon et al. Deep learning-based weight estimation using a fast-reconstructed mesh model from the point cloud of a pig
Xiao et al. Leaf disease detection based on lightweight deep residual network and attention mechanism
CN113487107A (en) Large animal weight automatic evaluation method, system and medium based on multilayer radial basis network
Benzer Population dynamics forecasting using artificial neural networks
CN116994144A (en) High-resolution winter wheat yield estimation method, system, storage medium and electronic equipment based on synthetic aperture radar image
CN111814804A (en) Human body three-dimensional size information prediction method and device based on GA-BP-MC neural network
Hamadani et al. Evaluation of artificial intelligence algorithms for the prediction of genetic merit
CN112149351B (en) Microwave circuit physical dimension estimation method based on deep learning
Zhang et al. Accurate detection method of pig's temperature based on non‐point source thermal infrared image
CN114239933A (en) Method and device for determining feed formula, electronic equipment and storage medium
Usman et al. Comparative study of artificial neural network algorithms performance for prediction of FL305DMY in crossbred cattle
Ergin et al. Evaluating the prediction performances of artificial neural network, nearest neighbor, and CART algorithms for body weight in Sujiang pigs using morphological measurements
Rahman et al. Prospect and scope of artificial neural network in livestock farming: a review
CN116703897B (en) Pig weight estimation method based on image processing
Permana et al. A Model to Predict The Live Bodyweight of Livestock Using Back-propagation Algorithm

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