Disclosure of Invention
The technology to be solved by the application is to provide the method and the device for identifying the pregnancy of the sow, so that the accuracy of sow pregnancy identification can be improved, and the cost of manpower, material resources and time can be reduced.
In order to solve the above technical problem, the present application provides a method of identifying pregnancy of a sow, the method comprising:
for a sow to be detected, collecting characteristic information of the sow;
inputting the characteristic information into a trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant;
wherein the characteristic information comprises one or more of the following information:
the image information of the predetermined part of the sow, the movement time data of the sow, the feed intake data of the sow and the movement track information of the sow.
Optionally, the pregnancy recognition model is trained by:
marking characteristic information of a plurality of sows as samples, wherein the sows are marked as pregnant or not pregnant;
and taking the marked characteristic information as training data to train the pregnancy recognition model.
Optionally, the form of the recognition result includes pregnancy probability, and identification information indicating whether the pregnant person is pregnant.
Optionally, the inputting the feature information into the trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant or not includes:
respectively inputting different types of characteristic information into the trained pregnancy recognition model to obtain recognition results corresponding to the different types of characteristic information;
and obtaining a final identification result of whether the sow is pregnant according to a plurality of identification results according to a preset rule.
Optionally, the method further comprises:
updating a model training data pool;
and when the set conditions are met, updating the pregnancy recognition model according to the training data in the updated model training data pool.
The present application also provides a device for identifying that a sow is pregnant, the device comprising: a memory and a processor;
the memory for storing a program for identifying a sow as pregnant;
the processor is used for reading and executing the program for identifying the pregnancy of the sow and executing the following operations:
for a sow to be detected, collecting characteristic information of the sow;
inputting the characteristic information into a trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant;
wherein the characteristic information comprises one or more of the following information:
the image information of the predetermined part of the sow, the movement time data of the sow, the feed intake data of the sow and the movement track information of the sow.
Optionally, the pregnancy recognition model is trained by:
marking characteristic information of a plurality of sows as samples, wherein the sows are marked as pregnant or not pregnant;
and taking the marked characteristic information as training data to train the pregnancy recognition model.
Optionally, the form of the recognition result includes pregnancy probability, and identification information indicating whether the pregnant person is pregnant.
Optionally, the inputting the feature information into the trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant or not includes:
respectively inputting different types of characteristic information into the trained pregnancy recognition model to obtain recognition results corresponding to the different types of characteristic information;
and obtaining a final identification result of whether the sow is pregnant according to a plurality of identification results according to a preset rule.
Optionally, the processor is configured to read and execute the program for identifying pregnancy of the sow, and further perform the following operations:
updating a model training data pool;
and when the set conditions are met, updating the pregnancy recognition model according to the training data in the updated model training data pool.
The application includes: for a sow to be detected, collecting characteristic information of the sow; inputting the characteristic information into a trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant; wherein the characteristic information comprises one or more of the following information: the image information of the predetermined part of the sow, the movement time data of the sow, the feed intake data of the sow and the movement track information of the sow. By the technical scheme, the accuracy of sow pregnancy identification can be improved, and the cost of manpower and material resources and the cost of time are reduced.
Example one
As shown in fig. 1, the present embodiment provides a method of identifying pregnancy of a sow, the method comprising:
s101, collecting characteristic information of a sow to be detected;
s102, inputting the characteristic information into a trained pregnancy identification model to obtain an identification result of whether the sow is pregnant;
wherein the characteristic information comprises one or more of the following information:
the image information of the predetermined part of the sow, the movement time data of the sow, the feed intake data of the sow and the movement track information of the sow.
Optionally, the pregnancy recognition model may be trained by:
marking characteristic information of a plurality of sows as samples, wherein the sows are marked as pregnant or not pregnant;
and taking the marked characteristic information as training data to train the pregnancy recognition model.
In this embodiment, a plurality of automatic patrol cameras and a plurality of fixed cameras can be arranged in the pig farm, and the bred sow is used as the sow to be detected. The method comprises the steps of collecting image information of a preset part of a sow to be detected, movement time data of the sow, food intake data of the sow and movement track information of the sow. The predetermined site may be one or more of the following sites: face, breast, waist, back, tail and genitals.
In the embodiment, the image information of the eyes of the sow can be acquired through the camera or the patrol camera, and the change of the eye spirit of the sow is identified through the image information of the eyes. Under normal conditions, the catch-eye of the sow becomes bright after pregnancy, and the sow can be marked whether pregnant or not by comparing the catch-eye with historical eye image information.
In this embodiment, the body hair image information of the sow can be acquired, and the change of the body hair brightness can be identified through the body hair image information of the sow. In general, the brightness of the body hair of the sow after pregnancy is improved, and the sow can be marked whether to be pregnant or not by comparing the brightness with the brightness of the body hair in the historical image information.
In the embodiment, the fart image information of the sow can be acquired in the feeding state or the sleeping state of the sow, and the shape of the genitals of the sow can be identified from the image information. Generally, after the sow is pregnant, the genitals of the sow are contracted into a line, so that the sow can be marked whether to be pregnant or not according to comparison of the passage and the genitals in the historical image information.
In this embodiment, the image information of the sow breast can be acquired, and the change of the nipple color can be identified by the breast image information. Generally, if the nipples of the sows are black 30 days after the mating, and the nipple attachment parts are dark purple halo, the sows are pregnant, so that the sows can be marked whether to be pregnant or not by comparing the breast image information of the sows with the historical image information.
In the embodiment, the waist image information and the back image information of the sow can be acquired, and the abdomen of the sow is sagged and the back is collapsed after the sow is pregnant under normal conditions, so that the comparison can be carried out according to the waist and back image information and the historical image information to identify whether the sow is pregnant or not.
In the embodiment, the image information of the tail of the sow can be acquired, and the tail of the sow is in a drooping state after the sow is pregnant, so that the sow can be identified whether to be pregnant or not by comparing the image information of the tail with the historical image information.
In the embodiment, the behavior data of the feeding state, the behavior data of the sleeping state, the exercise time data of the sow and the food intake of the sow can be obtained, and the comparison with the historical data is carried out to mark whether the sow is pregnant or not.
In this embodiment, one or more of the above feature information may be collected, and the training of the pregnancy model may be performed according to the collected feature information.
Optionally, the form of the recognition result may include pregnancy probability, identification information indicating whether or not it is pregnant.
In this embodiment, the recognition result may be presented in a probability form, for example: "probability of pregnancy is 78.1%". The recognition result may also be identification information indicating whether or not it is pregnant, such as: "not pregnant", "positive", "negative", "plus", "minus", "pregnant with a high probability", or "pregnant with a low probability", etc., and may be other information that can identify whether pregnant or not.
Optionally, the inputting the characteristic information into the trained pregnancy recognition model to obtain the recognition result of whether the sow is pregnant or not may include:
respectively inputting different types of characteristic information into the trained pregnancy recognition model to obtain recognition results corresponding to the different types of characteristic information;
and obtaining a final identification result of whether the sow is pregnant according to a plurality of identification results according to a preset rule.
In this embodiment, a plurality of characteristic information of the sow to be detected can be collected, and then the identification result is obtained according to the plurality of characteristic information respectively.
Suppose that 3 pieces of characteristic information of sows to be detected are collected: the feed intake of the sow, the sleeping time of the sow and the tail image of the sow can be respectively input into a pregnancy identification model to obtain 3 identification results.
For example, the identification result obtained from the feed intake of the sow is "not pregnant", the identification result obtained from the sleeping time of the sow is "pregnant", the identification result obtained from the tail image of the sow is "pregnant", and then the final identification result of the sow is "pregnant" or "probability of pregnancy is 66.7%" from the 3 identification results according to the set rule.
Or the identification result obtained according to the food intake of the sow is 30% ", the identification result obtained according to the sleeping time of the sow is 70%", the identification result obtained according to the tail image of the sow is 90% ", and then the final identification result of the sow is pregnant or the pregnancy probability is 63.3%" according to a set rule and 3 identification results.
Also taking the above assumption as an example, in other embodiments, 3 pieces of feature information may be input into the pregnancy recognition model together to obtain a recognition result. For example, the identification result is "pregnant" or "probability of pregnancy is 73.3%" based on the feed intake, the sleeping time period, and the tail image of the sow.
Optionally, the method may further include:
updating a model training data pool;
and when the set conditions are met, updating the pregnancy recognition model according to the training data in the updated model training data pool.
In this embodiment, the setting condition may be a setting of a periodic update, for example, once a month, once a half year, or once a year.
The setting condition may be setting of an update time, and when the update time is reached, the pregnancy recognition model is updated.
The setting condition may also be a setting updating condition, for example, a training data amount threshold value may be set, and when the data amount in the model training data pool is greater than or equal to the set training data amount threshold value, the pregnancy recognition model is updated. The training data amount threshold may also be updated.
The setting condition can also be that an updating instruction is received, and after the updating instruction is received, the pregnancy identification model is updated.
By continuously expanding the training data in the model training data pool and updating the pregnancy recognition model, the pregnancy recognition model can be continuously optimized, and the recognition accuracy is effectively improved.
By the technical scheme, the accuracy of sow pregnancy identification can be improved, and the cost of manpower and material resources and the cost of time are reduced. Meanwhile, the sow with the problem can be found in the process of pregnancy identification of the sow, so that the breeding personnel can be reminded to take measures.
In addition, because the accuracy of machine learning has a certain relation with the quantity of training data, and the habits of different breeds of pigs also have a certain difference, therefore, in the initial stage of training the pregnancy recognition model, a breeder is required to cooperate with the continuous correction model to obtain a conclusion, and the quantity of the training data is increased, so that the accuracy and the stability of the model to obtain the conclusion can be improved through continuous cycle training and correction.
As shown in fig. 2, the present embodiment also provides an apparatus for identifying pregnancy of a sow, the apparatus comprising: a memory 10 and a processor 11;
the memory 10 for storing a program for identifying pregnancy of the sow;
the processor 11 is used for reading and executing the program for identifying the pregnancy of the sow, and the following operations are carried out:
for a sow to be detected, collecting characteristic information of the sow;
inputting the characteristic information into a trained pregnancy recognition model to obtain a recognition result of whether the sow is pregnant;
wherein the characteristic information comprises one or more of the following information:
the image information of the predetermined part of the sow, the movement time data of the sow, the feed intake data of the sow and the movement track information of the sow.
Optionally, the pregnancy recognition model may be trained by:
marking characteristic information of a plurality of sows as samples, wherein the sows are marked as pregnant or not pregnant;
and taking the marked characteristic information as training data to train the pregnancy recognition model.
Optionally, the form of the recognition result may include pregnancy probability, identification information indicating whether or not it is pregnant.
Optionally, the inputting the characteristic information into the trained pregnancy recognition model to obtain the recognition result of whether the sow is pregnant or not may include:
respectively inputting different types of characteristic information into the trained pregnancy recognition model to obtain recognition results corresponding to the different types of characteristic information;
and obtaining a final identification result of whether the sow is pregnant according to a plurality of identification results according to a preset rule.
Optionally, the processor 11 is configured to read and execute the program for identifying pregnancy of the sow, and may further perform the following operations:
updating a model training data pool;
and when the set conditions are met, updating the pregnancy recognition model according to the training data in the updated model training data pool.
By the technical scheme, the accuracy of sow pregnancy identification can be improved, and the cost of manpower and material resources and the cost of time are reduced. Meanwhile, the sow with the problem can be found in the process of pregnancy identification of the sow, so that the breeding personnel can be reminded to take measures.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.