Method for identifying specific body surface information and generating feeding suggestions and corresponding device

Automatically identifying pig body surface information through image recognition technology, solving the problems of low recognition efficiency and poor timeliness caused by traditional relying on artificial experience, achieving efficient and timely identification of health information, and improving pig herd health management.

CN119649398APending Publication Date: 2025-03-18MUYUAN FOOD GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411574011.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The traditional method of identifying pig body surface information relies too much on manual experience, resulting in low recognition efficiency and poor timeliness, which can easily miss or delay the discovery of pig health problems, which in turn affects the overall health status of the pig herd.

Method used

By acquiring pig body surface images, identifying them using image recognition technology, automatically identifying a specific target area, and obtaining specific body surface information based on the area, reducing manual intervention.

Benefits of technology

It realizes automatic and timely identification of specific body surface information without relying on manual experience, improves identification efficiency, reduces the omissions and delays of health problems, and improves the health management of pig herds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649398A_ABST
    Figure CN119649398A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a corresponding device for identifying specific body surface information and generating feeding suggestions. The method for identifying the specific body surface information comprises the following steps: acquiring a body surface image of a pig; identifying the body surface image to obtain an identification result; wherein the identification result comprises one or more first areas, a first category corresponding to the first area and category confidence of the first category; the first category comprises a specific category corresponding to the specific body surface information, and a first area of the specific category is a specific target area; determining a specific target area according to the first area in the recognition result, the category confidence of the first category and a preset category confidence threshold; and automatically obtaining specific body surface information according to the specific target area. According to the method, the dependence on artificial experience can be reduced, and the efficiency of identifying the specific body surface information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of image processing technology. More specifically, the present disclosure relates to a method and a corresponding device for identifying specific body surface information and generating feeding suggestions. Background Art

[0002] In the process of raising pigs, the health status of the pigs can be identified through the surface of the pigs' skin. If the pigs are in poor health, the surface of the pigs' skin will show abnormal hair color or tear spots. In addition, when the pigs have different degrees of symptoms, the surface of the pigs' skin will show different degrees of phenomena. Therefore, collecting and identifying the skin surface or body surface information of the pigs is an important step in pig breeding.

[0003] The traditional method of identifying the pig's body surface information is usually done by breeders. This method relies too much on manual experience. If the breeder does not have rich breeding experience, it will lead to missing body surface information or untimely identification of body surface information, which will cause the pig's health to deteriorate or the disease to spread to the entire pig herd. In addition, the efficiency of manually identifying body surface information is very low.

[0004] In view of this, there is an urgent need to provide a solution for identifying specific body surface information so as to avoid over-reliance on manual experience, identify body surface information in a timely manner, and improve the efficiency of identifying specific body surface information. Summary of the invention

[0005] In order to at least solve one or more of the technical problems mentioned above, the present disclosure proposes methods and corresponding devices for identifying specific body surface information and generating feeding suggestions in multiple aspects.

[0006] In a first aspect, the present disclosure provides a method for identifying specific body surface information, the method comprising acquiring a body surface image of a pig; identifying the body surface image to obtain an identification result; wherein the identification result comprises one or more first areas, a first category corresponding to the first area, and a category confidence of the first category; the first category comprises a specific category corresponding to the specific body surface information, and the first area of ​​the specific category is a specific target area; the specific target area is determined based on the first area, the category confidence of the first category, and a preset category confidence threshold; and the specific body surface information is automatically obtained based on the specific target area.

[0007] In a second aspect, the present disclosure provides a method for generating feeding recommendations, the method comprising obtaining specific body surface information of the pig, wherein the specific body surface information is extracted according to the method for identifying specific body surface information described in the first aspect; obtaining the living conditions of the pig; analyzing the reasons for the occurrence of the specific body surface information based on the specific body surface information and the living conditions; and generating feeding recommendations based on the reasons.

[0008] In a third aspect, the present disclosure provides a device for identifying specific body surface information, comprising: an acquisition module for acquiring a body surface image of a pig; an identification module for identifying the body surface image to obtain an identification result; wherein the identification result includes one or more first areas, a first category corresponding to the first area, and a category confidence of the first category; the first category includes a specific category corresponding to the specific body surface information, and the first area of ​​the specific category is a specific target area; a determination module for determining the specific target area based on the first area, the category confidence of the first category and a preset category confidence threshold; an acquisition module for automatically obtaining the specific body surface information based on the specific target area.

[0009] In a fourth aspect, the present disclosure provides a device for generating feeding recommendations for pigs, comprising: an acquisition module for acquiring specific body surface information of the pig, wherein the specific body surface information is extracted according to the method for identifying specific body surface information described in the first aspect; an acquisition module for obtaining the living conditions of the pig; an analysis module for analyzing the cause of the specific body surface information based on the specific body surface information and the living conditions; and a generation module for generating feeding recommendations based on the cause.

[0010] Through the scheme for identifying specific body surface information as provided above, first, the body surface image of the pig is identified to obtain an identification result; then, based on the first area in the identification result, the confidence of the first category and the preset confidence threshold, the first area of ​​the specific category corresponding to the specific body surface information, that is, the specific target area, is determined; then, based on the specific target area, the specific body surface information is automatically obtained. This method can avoid missing or erroneously identifying the specific target area, thereby accurately identifying the specific body surface information of the specific target area. Moreover, in this way, the specific body surface information can be automatically and timely identified without relying on human experience, thereby reducing the reliance on human experience and improving the efficiency of identifying specific body surface information. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0012] Figure 1 An exemplary flow chart showing a method for identifying specific body surface information according to some embodiments of the present disclosure;

[0013] Figure 2An exemplary flow chart showing a method for acquiring a body surface image of a pig according to some embodiments of the present disclosure;

[0014] Figure 3 An exemplary flow chart of a method for identifying a body surface image according to some embodiments of the present disclosure is shown;

[0015] Figure 4 A schematic diagram showing merging two candidate regions according to some embodiments of the present disclosure is shown;

[0016] Figure 5 An exemplary flow chart illustrating a method of generating feeding recommendations for pigs according to some embodiments of the present disclosure is shown;

[0017] Figure 6 An exemplary structural block diagram of a device for identifying body surface information according to an embodiment of the present disclosure is shown;

[0018] Figure 7 An exemplary structural block diagram of an apparatus for generating feeding recommendations for pigs according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0020] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0021] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0022] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0023] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0024] Exemplary application scenarios

[0025] In the traditional pig farming model, breeders usually observe each group of pigs in the pig house to identify or detect specific body surface information of the pigs, and then judge the health status of the pigs based on the specific body surface information. This method has a low degree of automation and intelligence, and is heavily dependent on the breeder's manual breeding experience. If the breeder's breeding experience is not rich enough, it will lead to the omission of body surface information or the failure to identify body surface information in a timely manner, which will cause the health of the pigs to deteriorate or the disease to spread to the entire pig herd; moreover, this method requires manual observation of the body surface of each pig in the herd, resulting in low efficiency in identifying specific body surface information.

[0026] Exemplary Application Scenarios

[0027] In view of this, the first aspect of the disclosed embodiment provides a scheme for identifying specific body surface information, which specifically includes: first, identifying the body surface image of a pig to obtain one or more first areas of the body surface image, a first category corresponding to the first area, and a category confidence of the first category; then, determining the specific target area based on the first area, the category confidence of the first category, and a preset category confidence threshold, and being able to automatically and timely identify specific body surface information based on the specific target area without relying on manual experience, thereby reducing reliance on manual experience and improving the efficiency of identifying specific body surface information.

[0028] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

[0029] Figure 1 An exemplary flow chart 100 of a method for identifying specific body surface information according to some embodiments of the present disclosure is shown.

[0030] like Figure 1As shown, the present disclosure provides a method for identifying specific body surface information, which is the symptoms of a pig and the severity of the symptoms. The method includes: in step S110, obtaining a body surface image of the pig; in step S120, identifying the body surface image to obtain an identification result; wherein the identification result includes one or more first areas, a first category corresponding to the first area, and a confidence level of the first category; the first category includes a specific category corresponding to the specific body surface information, and the first area of ​​the specific category is a specific target area; in step S130, determining the specific target area according to the first area, the confidence level of the first category and a preset confidence threshold; in step S140, automatically obtaining specific body surface information according to the specific target area.

[0031] In some embodiments, the "surface image of a pig" in step S110 refers to an image of the body surface or skin of a pig, which is captured or collected by an image acquisition device. Specifically, the image acquisition device includes but is not limited to mobile phones, cameras, cameras, monitors and other shooting devices. It should be noted that the lens of the shooting device used in this embodiment is required to be clean and spotless; the brightness of the shooting environment meets the basic shooting requirements; the shooting height should be level or looking down; the shooting angles include the front and side; the image obtained by shooting needs to meet the requirements of the film, and the film requirement here refers to the clear surface of the pig, for example, the features of the external parts such as the eyes and nose are obvious.

[0032] In some embodiments, the above-mentioned "specific body surface information" refers to the symptoms exhibited on the skin or body surface of the pig due to a specific disease, and the severity of the symptoms, and the severity refers to the different categories of symptoms divided according to the degree. For example, the specific body surface information may include tear stains, scabs or swelling, and the severity corresponding to the tear stains, scabs or swelling. For example, the severity may be mild tear stains and / or severe tear stains, mild scabs and / or severe scabs, mild swelling and / or severe swelling. However, it should be understood that the above-mentioned specific body surface information is only an example, and the specific body surface information is not limited in any way.

[0033] In some embodiments, the aforementioned symptoms include but are not limited to tear stains.

[0034] In some examples, there are two modes of automatic shooting and manual shooting to obtain the above images. In the manual shooting mode, the breeder or other photographer can use a mobile phone or camera to shoot the pig's body surface image at a preset height and angle; in the automatic shooting mode, different shooting time intervals, shooting heights and angles can be set to automatically take pictures of the pigs in the pig house.

[0035] In the above process of taking the pig's body surface image, the shooting time interval, shooting height and angle can be set by oneself and are not fixed, and can be changed according to different pig houses or environments.

[0036] Figure 2 An exemplary flowchart 110 of a method for acquiring a body surface image of a pig according to some embodiments of the present disclosure is shown.

[0037] like Figure 2 As shown, step S110 specifically includes: in step S111, an initial body surface image of a pig is obtained; in step S112, data cleaning is performed on the initial body surface image to obtain a body surface image.

[0038] In some embodiments, the "initial body surface image" in step S111 refers to the image directly obtained by the method of step S110 above, and the "initial body surface image" has not been data cleaned. In order to distinguish it from the above-mentioned body surface image, the image directly obtained here is called the "initial body surface image".

[0039] In the above-mentioned step S112, data cleaning is performed on the initial body surface images in order to filter out images in the initial body surface images that do not meet the film requirements. The above-mentioned "images that do not meet the film requirements" refer to images whose specific contents cannot be discerned due to abnormal shooting angles, abnormal shooting positions, abnormal lighting, blurred images, or the presence of water mist.

[0040] In some embodiments, the image quality determination model can be used to identify the image that does not meet the filming requirements. In some embodiments, any open source model such as Residual Neural Network (Resnet), EfficientNet, Visual Geometry Group Network (VGG), etc. can be trained to obtain the image quality determination model.

[0041] In the embodiment of the present disclosure, images that do not meet the film requirements will be deleted, that is, the subsequent image recognition steps will not be performed on the images that do not meet the film requirements to avoid generating erroneous recognition results. In this embodiment, the image obtained after data cleaning of the "initial body surface image of the pig" is called the "body surface image of the pig".

[0042] After obtaining the pig's body surface image in the manner described in the above embodiment, it is also necessary to summarize the filtered images that do not meet the film requirements, that is, the blurred images of the pig's body surface, such as the images of the external parts such as the eyes and nose that are not obvious, and adjust the above image quality determination model according to the summarized results, so as to continuously iterate the image quality determination model to continuously improve the recognition accuracy of the image quality determination model. Moreover, the image acquisition device for obtaining the body surface image can also be adjusted according to the above summarized results, so that the body surface image acquired by the image acquisition device meets the requirements of the image captured in the above embodiment.

[0043] Figure 3 An exemplary flowchart 120 of a method for identifying a body surface image according to some embodiments of the present disclosure is shown.

[0044] like Figure 3 As shown, the present disclosure provides a method for identifying a body surface image, that is, in step S120, comprising: in step S121, performing feature extraction on the body surface image to extract image features of the body surface image; in step S122, obtaining one or more candidate areas for each specific target area, a second category corresponding to each candidate area, and a category confidence of the second category based on the image features; in step S123, merging the candidate areas based on each second category, the category confidence of the second category and a preset intersection-over-union threshold to obtain a first area, a first category, and a category confidence of the first category.

[0045] The "image features of the body surface image" in the above step S121 can be represented by a semantically rich feature map, which is a matrix obtained after the body surface image is convolved. The image features of the body surface image are used to characterize the semantic information in the body surface image, and the semantic information includes but is not limited to brightness, edge, texture, and color. In the embodiment of the present disclosure, a convolutional neural network can be used to extract features of the body surface image to extract the image features of the body surface image. It should be noted that the specific method of extracting features from the body surface image in the present disclosure is not limited in any way.

[0046] In this embodiment, through the above step S121, the image features of the body surface image can be extracted to convert the body surface image into features that can be recognized by a computer.

[0047] In some embodiments, the image features extracted in step S121 may be feature maps of different scales, where “feature maps of different scales” refer to feature maps of different sizes. For example, feature maps of different scales may be 8×8 feature maps and 4×4 feature maps, and the specific unit of measurement may be pixels or millimeters. The feature maps of different scales may be obtained using filters or convolution kernels of different sizes.

[0048] In some embodiments, the "specific target area" in step S122 refers to the area where the pig's symptoms are located in the body surface image, which is specifically expressed as an outer rectangular frame of the pig's symptoms in the body surface image. For example, the specific target area can be an outer rectangular frame of a tear spot in the body surface image or the area where the tear spot is located.

[0049] The "candidate area" in the above step S122 is the area in the body surface image where the pig's symptoms may be located or the circumscribed rectangular box where the pig's symptoms may exist. Specifically, the candidate area can be represented by the coordinates of the four vertices corresponding to the circumscribed rectangular box. The "second category" corresponding to each of the above candidate areas refers to a category in which the candidate area is divided according to the severity of the symptoms. For example, if the pig's symptom is tear stains, the second category includes any one of mild tear stains, moderate tear stains and severe tear stains. The "category confidence of the second category" in step S122 refers to the probability that the candidate area belongs to the second category.

[0050] For example, when the pig's symptom is tear stains, the candidate area is the area where the tear stains may be located. The area can be specifically represented by the circumscribed rectangular frame of the tear stains. The second category corresponding to each candidate area can be mild tear stains, moderate tear stains, and severe tear stains. The category confidence of the second category represents the probability that the pig's symptoms belong to mild tear stains, moderate tear stains, or severe tear stains, respectively, if the pig's symptoms exist in the candidate area. The category confidence is usually represented by a fraction or percentage not greater than 1. If the category confidence is closer to 1, the probability that the candidate area belongs to the second category is greater; conversely, if the category confidence is further away from 1, the probability that the candidate area belongs to the second category is smaller. It should be noted that if there are no pig symptoms in the candidate area, the category confidence of the second category corresponding to the candidate area is 0.

[0051] Specifically, the process in the above step S122 specifically includes: first, dividing the above body surface image into n×m cells, each cell has the same size, the above n and m are both positive integers, and n and m can be the same, the specific values ​​of n and m can be set by yourself, n means that there are n rows of cells in the body surface image, and m means that there are m columns of cells in the body surface image, and the specific method of dividing the body surface image is the same as the specific method of dividing the feature map of the above body surface image.

[0052] Next, if the center of the pig's symptom exists in a cell of the feature map, multiple candidate regions of the pig's symptom corresponding to the cell, the third category corresponding to each candidate region, and the category confidence of each third category are predicted.

[0053] The "third category" here refers to all possible categories of characteristic symptoms in each candidate area. For example, the third category may include mild symptoms, moderate symptoms and severe symptoms. The "category confidence of the third category" here refers to the probability that the characteristic symptoms in the candidate area belong to different categories. For example, when the third category includes mild symptoms, moderate symptoms and severe symptoms, the category confidence of the third category corresponding to a candidate area includes the probability that the characteristic symptoms in the candidate area belong to mild symptoms, the probability of belonging to moderate symptoms and the probability of belonging to severe symptoms.

[0054] In some embodiments, a variety of open source models or algorithms such as SSD, YOLO (You Only Look Once, deep learning model) series and R-CNN (Regin-CNN, regional convolutional neural network) series can be used to implement the above steps S121-S122, that is, extract image features of the body surface image and predict one or more candidate regions based on the image features.

[0055] Then, the second category corresponding to each candidate region and the category confidence of the second category are determined according to the category confidence of each third category.

[0056] Specifically, for each candidate region, the third category corresponding to the highest category confidence is used as the category to which the current candidate region belongs, that is, the second category, and the highest category confidence is used as the category probability of the second category. For example, if the third category of a candidate region includes mild symptoms, moderate symptoms, and severe symptoms, the category confidence corresponding to mild symptoms is 0.7, the category confidence corresponding to moderate symptoms is 0.2, and the category confidence corresponding to severe symptoms is 0.1, then the highest category confidence of the candidate region is mild symptoms; mild symptoms are used as the second category of the candidate region, and the category confidence of the second category of the candidate region is 0.7.

[0057] It can be seen from the description of the above embodiments that each candidate region may have multiple third categories, and each candidate region has one second category.

[0058] In some embodiments, the specific location of the candidate area may also be pre-set.

[0059] The above-mentioned "second category corresponding to each candidate area" refers to the specific category corresponding to the characteristic symptoms in the candidate area. For example, the second category may include any one of mild symptoms, moderate symptoms and severe symptoms. In the above embodiment, it is necessary to predict the probability that each candidate area belongs to the second category; then, for each candidate area, the third category corresponding to the highest category probability is used as the category to which the current candidate area belongs, that is, the second category, and the category probability of the third category is used as the category probability of the second category. It can be seen from the above that each candidate category can have multiple third categories, and each candidate category has one second category.

[0060] In some embodiments, the candidate regions can also be determined by pre-set rectangular boxes, without predicting the candidate regions. Each unit of the feature map can first preset multiple rectangular boxes of different shapes; then, the SSD (Single Shot Multibox Detector) model is used to extract the features of the image in each rectangular box.

[0061] In some embodiments, for the convenience of description, the area after the candidate areas are merged in the above step S123 is referred to as the "first area". In order to distinguish it from the above-mentioned second category, the category corresponding to each first area is referred to as the "first category". The "category confidence of the first category" is the credibility or confirmation degree that the first area belongs to the second category, which is not elaborated here.

[0062] It should be noted that the intersection-and-union ratio refers to the ratio of the intersection between two regions to the union between the two regions. Specifically, in this embodiment, the intersection-and-union ratio is the ratio of the overlapping area of ​​two regions to the union area. Here, the "union area" refers to the area where the two regions overlap plus the area of ​​each non-overlapping area of ​​the two regions. The formula of the intersection-and-union ratio is as follows: IOU = A∩B / A∪B. In the above formula, IOU represents the intersection-and-union ratio; A and B represent two regions respectively, A∩B is the overlapping area between A and B, and A∪B is the union area between A and B.

[0063] In the embodiment of the present disclosure, if the IoU is larger, it means that the overlap between the two regions is higher. The above means that if the IoU stored between the two candidate regions is greater than the "preset IoU threshold" in step S123, it is considered that the parts or symptoms included in the two candidate regions belong to the same one, and the above preset IoU threshold can be set according to different needs. Further, in step S123, the two regions whose IoU is greater than the preset IoU threshold are merged into the same one.

[0064] Specifically, step S123 includes the following steps.

[0065] First, the intersection-over-union ratio between every two different regions in the candidate regions is determined.

[0066] Specifically, the intersection-and-union ratio between every two different candidate regions can be determined by obtaining the bounding rectangular boxes corresponding to two different candidate regions and the position coordinates corresponding to the two bounding rectangular boxes and calculating the intersection-and-union ratio between the two candidate regions based on the position coordinates corresponding to the two bounding rectangular boxes.

[0067] Next, if there are any two regions in the candidate regions that are the first candidate region and the second candidate region, and the intersection-and-union ratio between the first candidate region and the second candidate region is greater than the above-mentioned intersection-and-union ratio threshold, the first candidate region and the second candidate region are merged to obtain a merged region, wherein the second category corresponding to the first candidate region is the first candidate category, and the second category corresponding to the second candidate region is the second candidate category.

[0068] Specifically, the specific method of merging the first candidate area and the second candidate area requires obtaining the minimum enclosing rectangular frame of the first candidate area and the second candidate area, where the "minimum enclosing rectangular frame" refers to a rectangular frame with the smallest area that can include all areas in the first candidate area and the second candidate area; and the area where the minimum enclosing rectangular frame is located is used as the above-mentioned merged area.

[0069] Figure 4 A schematic diagram of merging two candidate regions according to some embodiments of the present disclosure is shown.

[0070] like Figure 4 As shown, the first candidate region is a region a1 of 4×5 size, and the area of ​​region a1 is 20, the second candidate region is a region b1 of 5×4 size, and the area of ​​region b1 is 20, and the overlap between region a1 and region b1 is called region c1, the size of region c1 is 4×4, and the area of ​​region c1 is 16; region a1 also includes region a2 that does not overlap with region c1, the size of region a2 is 4×1, and the area of ​​region a2 is 4, and region b1 also includes region b2 that does not overlap with region c1, the size of region b2 is 1×4, and the area of ​​region b2 is 4. In this embodiment, the length unit of the region can be any one of the length units commonly used in the art, such as millimeters or pixels, and the length unit of the region is not subject to any limitation.

[0071] According to the above description, the combined area between region a1 and region b1 is the sum of the area of ​​region a2, the area of ​​region c1 and the area of ​​region b2, that is, 4+16+4=24, and the intersection-and-union ratio between region a1 and region b1 is the quotient obtained by dividing the area of ​​region c1 by the combined area between region a1 and region b1, that is, 16 / 24=2 / 3. When the preset intersection-and-union ratio threshold is 0.6, since 2 / 3 is greater than 0.6, that is, the intersection-and-union ratio between region a1 and region b1 is greater than the preset intersection-and-union ratio threshold, it is necessary to merge region a1 and region b1.

[0072] According to the description of the above embodiment, to merge the area a1 and the area b1, it is necessary to obtain the minimum circumscribed rectangular frame of the area a1 and the area b1 to obtain the solid rectangular frame r1. The solid rectangular frame r1 is the rectangular frame with the minimum area that can include all areas in the area a1 and the area b1; the area where the rectangular frame r1 is located is used as the merged area.

[0073] It can be seen from the description of the above embodiment that a pig's symptom may have multiple candidate areas. Through the above step S123, multiple candidate areas containing the same characteristic symptoms can be merged to remove redundant candidate areas, thereby reducing the probability of repeated identification of the same characteristic symptom.

[0074] In some embodiments of the present disclosure, since the merged region of the two candidate regions is the region where the minimum circumscribed rectangular frame of the two candidate regions is located, the merged region not only includes all regions in the two candidate regions, but also includes partial regions near the two candidate regions, which may include partial tear spots, that is, partial specific body surface information. It can be seen that when the specific body surface information is automatically obtained based on the image of the merged region in the future, it can be avoided that the specific body surface information obtained is not accurate enough due to the small amount of specific body surface information included in the region or omissions. Therefore, the method provided in this embodiment can more accurately extract specific body surface information.

[0075] Then, the category with higher confidence between the confidence of the first candidate category and the confidence of the second candidate category is used as the category of the merged area, and the confidence of the merged area is the higher confidence between the confidence of the first candidate category and the confidence of the second candidate category.

[0076] The category of the merged area is the category with higher confidence between the confidence of the first candidate category and the confidence of the second candidate category. Further, the confidence of the category of the merged area is the higher confidence between the confidence of the first candidate category and the confidence of the second candidate category.

[0077] For example, there is an intersection-over-union ratio between the first candidate area and the second candidate area that is greater than the above-mentioned predetermined intersection-over-union ratio threshold, and the category of the first candidate area is mild tear stains, and the confidence that the category of the first candidate area is mild tear stains is 0.5; the category of the second candidate area b is severe tear stains, and the confidence that the category of the second candidate area is severe tear stains is 0.7. Since 0.7 is greater than 0.5, the category corresponding to the area after the first candidate area and the second candidate area are merged is severe tear stains, and the confidence that the merged area is severe tear stains is 0.7.

[0078] Finally, the first candidate region and the second candidate region are replaced with the merged region, and the first step is returned to execute until there is no intersection-and-union ratio between any two regions in the candidate region that is greater than the intersection-and-union ratio threshold, and the final candidate region is used as the first region.

[0079] It can be seen from the description of the above embodiment that step S123 can merge two candidate regions with a high degree of overlap to reduce the probability of repeatedly identifying information in the same region.

[0080] In some embodiments, the above step S130 specifically includes: taking a first region whose category confidence of the first category is greater than a category confidence threshold as a specific target region.

[0081] In the above step S130, the "category confidence threshold" here is a boundary value used to determine whether the image in the first area is a correct symptom. If the category confidence of the first category corresponding to the first area is greater than the above category confidence threshold, the image in the first area is determined to be a symptom belonging to a pig, and the first area is used as a specific target area. The "specific target area" here refers to the area where the pig's symptoms are located. If the category confidence of the first category corresponding to the current first area is less than the above category confidence threshold, it means that the image in the current first area does not belong to a pig's symptom.

[0082] Through the above step S130, the first region with low category confidence level, and thus the first region of symptoms in which the image does not belong to the pig, can be deleted, thereby improving the accuracy of identifying pig symptoms.

[0083] It should be noted that if the category confidence threshold is higher, the number of first categories whose category confidence is greater than the category confidence threshold is smaller, then the number of first areas belonging to the specific target area is smaller. In this case, it may happen that the first area of ​​the image in some areas that belongs to the pig's symptoms is not taken as the specific target area, thereby missing the first area that originally belonged to the specific target area, and further reducing the accuracy of identifying the pig's symptoms; conversely, if the category confidence threshold is higher, the number of first categories whose category confidence is greater than the category confidence threshold is larger, then the number of first areas that belong to the specific target area is larger. At this time, the first area that does not belong to the specific target area may be taken as the specific target area.

[0084] In some embodiments, the above-mentioned category confidence threshold is a minimum value while satisfying a certain accuracy rate of identifying pig symptoms.

[0085] Specifically, the process of determining the category confidence threshold includes: first, you need to set the accuracy of identifying pig symptoms by yourself, for example, set the accuracy of identifying pig symptoms to 80%; for the convenience of description, the above-mentioned "accuracy of identifying pig symptoms" is referred to as "set accuracy", and in the process of determining the category confidence threshold, all category confidence thresholds that have not been determined as the final are referred to as "first intermediate category confidence thresholds", and the initial first intermediate category confidence threshold is the first intermediate category confidence threshold adjusted for the first time in the above process, and the initial first intermediate category confidence threshold can be set by yourself; then, starting from the initial first intermediate category confidence threshold, gradually adjust the first intermediate category confidence threshold to a smaller value, and the step size of each adjustment can be set by yourself, for example For example, the step size of each adjustment can be 0.05; then, in the process of adjusting the first intermediate category confidence threshold, the accuracy of identifying pig symptoms in the above method of identifying specific body surface information is obtained under each first intermediate category confidence threshold; here, "the accuracy of identifying pig symptoms in the above method of identifying specific body surface information" is referred to as "the current accuracy of identifying pig symptoms"; obtain all first intermediate category confidence thresholds whose current accuracy of identifying pig symptoms is greater than the set accuracy, and here "all first intermediate category confidence thresholds whose current accuracy of identifying pig symptoms is greater than the set accuracy" is referred to as "the second intermediate category confidence threshold"; finally, the smallest second intermediate category confidence threshold is used as the final category confidence threshold.

[0086] Adjusting the category confidence threshold in the manner described in the above embodiment can identify as many image areas belonging to pig symptoms as possible, thereby avoiding missing image areas of pig symptoms. Further, when analyzing the image areas of pig symptoms, all images belonging to pig symptoms can be analyzed.

[0087] In some embodiments, the process in step S140 specifically includes: using the first category corresponding to the specific target area as the severity of the pig's symptoms. For example, if the specific target area is the area where the pig's mild tear spots are located, the specific body surface information includes the pig's tear spots and the severity of the pig's tear spots is mild tear spots.

[0088] In summary, through steps S110-S140 described in the above embodiment, first, the body surface image of the pig is identified to obtain one or more first areas of the body surface image, the first category corresponding to the first area and the category confidence of the first category; then, the specific target area is determined according to the first area, the category confidence of the first category and the preset category confidence threshold, so that specific body surface information can be automatically and timely identified according to the specific target area without relying on manual experience, thereby reducing dependence on manual experience and improving the efficiency of identifying specific body surface information.

[0089] The disclosed embodiments also provide a method for generating feeding recommendations for pigs. Figure 5 An exemplary flow chart 500 of a method of generating feeding recommendations for pigs according to some embodiments of the present disclosure is shown.

[0090] like Figure 5 As shown, the method for generating feeding recommendations for pigs specifically includes: in step S510, obtaining specific body surface information of the pig; wherein the specific body surface information is extracted according to the method for identifying specific body surface information described in any one of the above embodiments; in step S520, obtaining the living conditions of the pig; in step S530, analyzing the reasons for the occurrence of the specific body surface information based on the specific body surface information and the living conditions; in step S540, generating feeding recommendations based on the reasons.

[0091] In this embodiment, the specific implementation of the above step S510 is the same as the method for identifying specific body surface information provided above, and will not be described in detail here.

[0092] The above-mentioned "living conditions of pigs" refer to the living conditions of pigs and the specific behaviors of pigs. In some embodiments, the living conditions of pigs include at least one of the living environment of pigs, the feeding conditions of pigs and the behaviors of pigs. In addition, the living conditions of pigs also include the lying distribution of pigs, the comfort of pig houses, the lying posture of individual pigs, the condition of the pigs' fur, the feeding conditions of pigs, the mental state of pigs, etc.

[0093] Specifically, the pigs can be analyzed by the pig lying distribution detection model to obtain the pig lying distribution. The pigs can be analyzed by the pig comfort classification model to obtain the pig house comfort; the pigs can be analyzed by the individual pig lying posture detection model to obtain the individual pig lying posture; the pigs can be analyzed by the pig fur status detection model to obtain the pig fur status; the pigs can be analyzed by the pig feeding situation analysis and prediction model to obtain the pig feeding situation; the pigs can be analyzed by the pig mental state detection model to obtain the pig mental state.

[0094] In step S530, after obtaining the living conditions of the pigs, the specific body surface information obtained in step S510 is integrated to analyze the reasons for the specific body surface information of the pigs, that is, the reasons for the symptoms. For example, if the pigs have tear spots, the feeding conditions of the pigs are analyzed to determine that the pigs eat too little, then it is analyzed that the reason for the tear spots may be that the feed contains too much mycotoxin.

[0095] In step S540, based on the cause of the tear spots on the pigs, corresponding feeding suggestions are provided to improve the living conditions of the pigs. Here, "feeding suggestions" refer to feeding suggestions for improving the pigs. For example, if the cause of the tear spots on the pigs is that the pigs are too densely lying, the feeding suggestion is to expand the pig house; if the cause of the tear spots on the pigs is too much mycotoxin in the feed, the feeding suggestion is to adjust the feed formula.

[0096] In some embodiments, the identification results of pig symptoms, the causes of pig symptoms and feeding suggestions of multiple pig groups over a long period of time can also be counted and analyzed through a BI (Business Intelligence) system or an Internet of Things platform to obtain the changing trend of the number of pig groups at each location, the changing trend of the proportion of pig symptoms in the pig group and the reasons for the pig symptoms in the pig group, and the statistical results, the above-mentioned changing trends and the reasons for the pig symptoms can be displayed in the form of a chart. This can provide pig breeders with data analysis of pig symptoms in the pig group, and can predict whether the pig group will develop pig symptoms in the future and the reasons for the pig symptoms through the changing trend of the proportion of pig symptoms in the pig group and the reasons for the pig symptoms in the pig group, thereby providing solutions and suggestions for improving the living conditions of the pigs.

[0097] Specifically, the above-mentioned change trend can be used for data statistics in days, months or years. The above-mentioned BI system can be Tableau, Power BI, pyecharts, etc. It should be noted that in this embodiment, the BI system is not subject to any limitation.

[0098] The disclosed embodiment also provides a device for identifying body surface information.

[0099] Figure 6 An exemplary structural block diagram of an apparatus for identifying body surface information according to an embodiment of the present disclosure is shown.

[0100] like Figure 6 As shown, the apparatus 600 for identifying body surface information according to the embodiment of the present disclosure includes:

[0101] The acquisition module 601 is used to acquire the body surface image of the pig.

[0102] In this embodiment, the function of the acquisition module 601 is the same as that of the above step S110, which will not be described in detail here.

[0103] The recognition module 602 is used to recognize the body surface image to obtain a recognition result; wherein the recognition result includes one or more first areas, a first category corresponding to the first area and a category confidence of the first category; the first category includes a specific category corresponding to the specific body surface information, and the first area of ​​the specific category is a specific target area.

[0104] In this embodiment, the function of the identification module 602 is the same as that of the above step S120, which will not be described in detail here.

[0105] The determination module 603 is used to determine the specific target area according to the first area, the category confidence of the first category and a preset category confidence threshold.

[0106] In this embodiment, the function of the determination module 603 is the same as that of the above step S130, which will not be described in detail here.

[0107] The acquisition module 604 is used to automatically acquire the specific body surface information according to the specific target area.

[0108] In this embodiment, the function of the obtaining module 604 is the same as that of the above step S140, which will not be described in detail here.

[0109] The device for identifying specific body surface information provided in this embodiment can first acquire the body surface image of the pig through the acquisition module 601; secondly, identify the body surface image of the pig through the identification module 602 to obtain the identification result; then, determine the first area of ​​the specific category corresponding to the specific body surface information, that is, the specific target area, according to the first area in the identification result, the confidence of the first category and the preset confidence threshold through the determination module 603; then, automatically obtain the specific body surface information according to the specific target area through the acquisition module 604. This method can avoid missing or erroneously identifying the specific target area, thereby accurately identifying the specific body surface information of the specific target area. Moreover, in this way, the specific body surface information can be automatically and timely identified without relying on manual experience, thereby reducing the dependence on manual experience and improving the efficiency of identifying specific body surface information.

[0110] The disclosed embodiment also provides a device for generating feeding recommendations for pigs.

[0111] Figure 7 An exemplary structural block diagram of an apparatus for generating feeding recommendations for pigs according to an embodiment of the present disclosure is shown.

[0112] like Figure 7 As shown, a device 700 for generating pig feeding suggestions according to an embodiment of the present disclosure includes:

[0113] The acquisition module 701 is used to acquire the specific body surface information of the pig, wherein the specific body surface information is extracted by the method for identifying specific body surface information described in the above embodiment, and will not be described in detail here.

[0114] The obtaining module 702 is used to obtain the living conditions of the pigs.

[0115] In this embodiment, the function of the obtaining module 702 is the same as that of step S520, which will not be described in detail here.

[0116] The analysis module 703 is used to analyze the cause of the specific body surface information according to the specific body surface information and the living conditions.

[0117] In this embodiment, the function of the analysis module 703 is the same as that of step S530, which will not be described in detail here.

[0118] The generating module 704 is used to generate feeding suggestions based on the reasons.

[0119] In this embodiment, the function of the generation module 704 is the same as that of step S540, which will not be described in detail here.

[0120] The device for generating feeding recommendations for pigs provided in this embodiment can firstly obtain specific body surface information of the pig through the acquisition module 701; secondly, obtain the living conditions of the pig through the acquisition module 702; then, the analysis module 703 can analyze the reasons for the occurrence of the specific body surface information according to the specific body surface information and the living conditions; then, the generation module 704 can generate feeding recommendations based on the reasons, thereby providing feeding recommendations for the pig breeders regarding the symptoms of the pigs.

[0121] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for identifying specific body surface information, wherein the specific body surface information is symptoms of pigs and the severity of the symptoms, wherein: The method comprises: Acquire a body surface image of a pig; Recognize the body surface image to obtain a recognition result; wherein the recognition result includes one or more first regions, a first category corresponding to the first region, and a category confidence of the first category; the first category includes a specific category corresponding to the specific body surface information, and the first region of the specific category is a specific target region; Determining the specific target area according to the first area, the category confidence of the first category and a preset category confidence threshold; The specific body surface information is automatically obtained according to the specific target area.

2. The method according to claim 1, wherein: The symptoms include tear stains.

3. The method according to claim 1, wherein: The step of obtaining the pig's body surface image comprises: Acquiring an initial body surface image of the pig; Data cleaning is performed on the initial body surface image to obtain the body surface image.

4. The method according to claim 1, wherein: The identifying the body surface image to obtain an identification result includes: Performing feature extraction on the body surface image to extract image features of the body surface image; Obtaining, according to the image features, one or more candidate regions of each of the specific target regions, a second category corresponding to each of the candidate regions, and a category confidence of the second category; Based on each of the second categories, the category confidence of the second category and a preset intersection-over-union threshold, the candidate regions are merged to obtain the first region, the first category and the category confidence of the first category.

5. The method according to claim 4, wherein: The merging of the candidate regions based on each second category, the category confidence of the second category and a preset intersection-over-union threshold to obtain the first region, the first category and the category confidence of the first category includes: Determine the intersection-over-union ratio between every two different regions in the candidate regions; If any two of the candidate regions are the first candidate region and the second candidate region, and the intersection-and-union ratio between the first candidate region and the second candidate region is greater than the intersection-and-union ratio threshold, the first candidate region and the second candidate region are merged to obtain a merged region, wherein the second category corresponding to the first candidate region is the first candidate category, and the second category corresponding to the second candidate region is the second candidate category; The category with a higher category confidence between the category confidence of the first candidate category and the category confidence of the second candidate category is used as the category of the merged area, and the category confidence of the merged area is the higher category confidence between the category confidence of the first candidate category and the category confidence of the second candidate category; The first candidate region and the second candidate region are replaced with the merged region, and the step of determining the IoU ratio between every two different regions in the candidate region is returned to the step of determining the IoU ratio between every two different regions in the candidate region until there is no IoU ratio between any two regions in the candidate region that is greater than the IoU ratio threshold, and the candidate region finally obtained is used as the first region.

6. The method according to claim 1, wherein: The determining the specific target area according to the first area, the category confidence of the first category and a preset category confidence threshold comprises: A first area whose category confidence of the first category is greater than the category confidence threshold is used as the specific target area.

7. A method for generating feeding recommendations, comprising: Acquiring specific body surface information of a pig, wherein the specific body surface information is extracted according to the method according to any one of claims 1 to 6; obtaining the living conditions of the pig; Analyzing the cause of the specific body surface information according to the specific body surface information and the living conditions; Feeding recommendations are generated based on the reasons.

8. The method according to claim 7, wherein: The living conditions include at least one of the living environment, the eating conditions and behaviors of the pigs.

9. A device for identifying specific body surface information, wherein the specific body surface information is symptoms of pigs and the severity of the symptoms, wherein: The device comprises: An acquisition module, used for acquiring a body surface image of a pig; an identification module, configured to identify the body surface image to obtain an identification result; wherein the identification result includes one or more first regions, a first category corresponding to the first region, and a category confidence of the first category; the first category includes a specific category corresponding to the specific body surface information, and the first region of the specific category is a specific target region; A determination module, configured to determine the specific target area according to the first area, the category confidence of the first category and a preset category confidence threshold; The acquisition module is used to automatically acquire the specific body surface information according to the specific target area.

10. An apparatus for generating feeding recommendations for pigs, comprising: An acquisition module, used for acquiring specific body surface information of the pig, wherein the specific body surface information is extracted according to the method according to any one of claims 1 to 6; An acquisition module, used for acquiring the living conditions of the pig; An analysis module, used for analyzing the cause of the specific body surface information according to the specific body surface information and the living conditions; A generating module is used to generate feeding suggestions based on the reasons.