Farm inspection method and system based on image recognition
By creating a target database and using image recognition technology to extract pig characteristics, the problem of high missed pig detection rate in intelligent inspections is solved, and the comprehensive coverage of pig inspections and health assessments of pigs is achieved, and the missed detection rate is reduced.
Patent Information
- Application Number
- CN202510596574.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent inspection technology is difficult to effectively reduce the rate of pig missed inspection in pig farms, especially when equipment failures or false alarms.
By creating a target database, each target has a unique identity code and records its characteristics and inspection ledgers. Image recognition technology is used to extract target features from inspection images, determine health assessment values, and obtain the location of undetected targets through positioning equipment for supplementary detection.
The comprehensive coverage of live pigs has been achieved, the missed inspection rate has been reduced, and the missed inspection or misjudgment caused by individual identification errors has been reduced.
Smart Images

Figure CN120108004A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of aquaculture inspection, and in particular to a method and system for inspecting aquaculture farms based on image recognition. Background Art
[0002] With the rapid development of pig farming and the continuous expansion of the scale of farming, the inspection method of pigs has gradually changed from traditional manual inspection to intelligent inspection. Intelligent inspection uses sensors, Internet of Things, big data, artificial intelligence, etc. to analyze the growth environment, health status, feed consumption, etc. of pigs. Although intelligent inspection has reduced manual intervention, it still requires manual assistance. If manual intervention is not timely, pigs may be missed. If pigs with infectious diseases are missed, it will cause huge losses.
[0003] The specific circumstances in which live pigs were missed from inspection may be that intelligent inspections rely on various sensors, cameras and other equipment to collect data. These devices may malfunction or give false alarms. When the cameras are blocked, contaminated or damaged, the collected images become distorted or missing. When analyzing distorted or missing images, the results obtained are also inaccurate. Summary of the invention
[0004] The purpose of the present invention is to provide a farm inspection method and system based on image recognition, and the technical problem to be solved is how to reduce the missed inspection rate of live pigs.
[0005] The present invention is achieved through the following technical solutions:
[0006] The first aspect provides a farm inspection method based on image recognition, comprising the following steps:
[0007] S100, creating a target database, the target database is used to store the identity code, target characteristics and inspection records of each target in the farm;
[0008] S200, dividing the above breeding farm into several inspection areas;
[0009] Acquire images of the inspection area to obtain an inspection image set;
[0010] S300, extracting target features of the target from the inspection image; wherein the target features include an identity code;
[0011] S400, determining the health assessment value of the target through the target characteristics of the target; updating the inspection record of the target;
[0012] S500, after traversing each of the above inspection areas, extracting the inspection records of all targets for the current inspection from the target database;
[0013] Determine whether there are any of the above targets that have not been inspected;
[0014] If so, the position of the target that has not been inspected is obtained, the target feature of the target is extracted, and S400 is executed;
[0015] If it does not exist, the inspection ends.
[0016] By creating a target database, each target is assigned a unique identity code, and its characteristics and inspection records are recorded. When the target is missing from the inspection record, the undetected target can be obtained, and the current position of the target can be obtained through the positioning device to perform supplementary detection to ensure comprehensive coverage of the inspection work, reduce missed inspections due to inspection omissions, and reduce the target missed detection rate; extract the target features of each target from the inspection image, and reduce missed detections or misjudgments due to individual recognition errors through analysis of the target features (including identity codes).
[0017] Furthermore, the images of the inspection area are obtained to obtain an inspection image set, and the specific steps include:
[0018] Creating a three-dimensional coordinate system based on the center of the inspection area, presetting the image acquisition position of the inspection area, and obtaining a preset acquisition position set;
[0019] Based on the preset acquisition position set, images of the inspection area are acquired at each preset acquisition position at the same time to obtain an inspection image set.
[0020] A three-dimensional coordinate system is established for each inspection area to describe the spatial relationship of each position in the area, which helps to determine the image acquisition point and ensure that the inspection area is scanned from multiple angles and heights; the entire inspection area is covered without blind spots by presetting the image acquisition position; at the same time point, the image of the inspection area is captured from each preset acquisition position, ensuring that all images are captured in the same time period, which not only reduces the error caused by target movement or state change due to time difference, but also obtains richer spatial information through image sets taken at different positions and angles, which is convenient for subsequent target recognition and feature extraction. It can also complete image acquisition at multiple positions at one time, improve the efficiency of inspection work, and reduce the interference or behavioral changes of target animals that may be caused by entering the inspection area multiple times.
[0021] Furthermore, the specific steps of S300 include:
[0022] S310, randomly selecting an inspection image from the inspection image set as a processing image;
[0023] S320, performing target detection on the processed image, selecting the detected target on the processed image, and obtaining a target image;
[0024] S330, extracting a QR code from the target image;
[0025] When the above QR code is extracted, the target feature stored in the QR code is retrieved;
[0026] When the QR code is not extracted, the three-dimensional coordinates of the selected target are determined through the three-dimensional coordinate system of the inspection area and the processed image;
[0027] S340, selecting another inspection image from the inspection image set as a processing image;
[0028] S350, based on the three-dimensional coordinates of the framed target, obtaining the framed target from the processed image mentioned in S340;
[0029] Return to S320 to continue execution. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated.
[0030] S360: Expel the target to an ear tag missing area through the first warning signal; wherein the ear tag missing area is divided from the breeding farm.
[0031] The above inspection image set contains inspection images from multiple angles. Since there are usually multiple targets in the inspection area and each target can be moved, the position of the QR code is also mobile. To solve the problem of QR code occlusion, the QR code can be extracted from multiple angles and the complete QR code can be selected as the extraction object. Each QR code only stores the information of one target.
[0032] Furthermore, the specific steps of S400 include:
[0033] S410, the target features further include the target's eye images, ear images, nose images, skin images, body temperature and weight;
[0034] S420, determining the eye health value of the target through the eye image of the target;
[0035] Determine the ear health value of the target through the ear image of the target;
[0036] Determine the nose health value of the target through the nose image of the target;
[0037] Determine the skin health value of the target through the skin image of the target;
[0038] Determine the target's body temperature health value through the above body temperature;
[0039] The target's health value of weight is determined by the weight of the previous inspection and the weight of the current inspection;
[0040] S430. Determine the health assessment value of the target through the eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights of the above target.
[0041] Collect various physiological characteristics of the target and analyze various characteristic data to comprehensively evaluate its health status; through multi-dimensional data collection and analysis, conduct a comprehensive inspection of each target from multiple aspects to reduce false detections caused by missing a single feature.
[0042] Further, S440, comparing the health assessment value and the health threshold of the above target;
[0043] When the health assessment value of the above target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated;
[0044] The sub-health target is driven to the sub-health area through the second warning signal; wherein the sub-health area is divided from the breeding farm.
[0045] After completing the health assessment of the target, identify the targets in sub-health status and isolate the sub-health targets to specific areas to reduce the spread of potential diseases and protect other healthy target groups.
[0046] The second aspect provides a farm inspection system based on image recognition, which is used to implement the above inspection method;
[0047] The inspection system includes:
[0048] An input module, which is used to create a target database and input the identity code, target characteristics and inspection records of each target in the farm into the target database;
[0049] A map acquisition module, which is used to obtain a map of the farm;
[0050] An image acquisition module, the image acquisition module is used to acquire images of the inspection area to obtain inspection images;
[0051] A positioning module, wherein the positioning module is arranged on the target;
[0052] The processing module is connected to the input module, the map acquisition module, the image acquisition module and the positioning module, and is used to perform the following steps:
[0053] Based on the map of the farm, the farm is divided into several inspection areas;
[0054] Extracting target features of the target from the inspection image; wherein the target features include an identity code;
[0055] Determine the health assessment value of the target through the target characteristics of the above target; update the inspection record of the above target;
[0056] After traversing each of the above inspection areas, the inspection records of all targets for the current inspection are extracted from the target database;
[0057] Determine whether there are any of the above targets that have not been inspected;
[0058] If it exists, the location of the uninspected target is obtained through the positioning module, the target features of the target are extracted, the health assessment value of the target is determined, and the inspection record of the target is updated;
[0059] If it does not exist, the inspection ends.
[0060] Furthermore, the above-mentioned image acquisition module is used to obtain images of the inspection area, and the specific steps of obtaining the inspection image set include:
[0061] The processing module creates a three-dimensional coordinate system based on the center of the inspection area, presets the image acquisition position of the inspection area, and obtains a preset acquisition position set;
[0062] The image acquisition module acquires images of the inspection area at each preset acquisition position at the same time based on the preset acquisition position set to obtain an inspection image set.
[0063] Furthermore, the specific steps of the processing module for extracting target features include:
[0064] S310, randomly selecting an inspection image from the inspection image set as a processing image;
[0065] S320, performing target detection on the processed image, selecting the detected target on the processed image, and obtaining a target image;
[0066] S330, extracting a QR code from the target image;
[0067] When the above QR code is extracted, the target feature stored in the QR code is retrieved;
[0068] When the QR code is not extracted, the three-dimensional coordinates of the selected target are determined through the three-dimensional coordinate system of the inspection area and the processed image;
[0069] S340, selecting another inspection image from the inspection image set as a processing image;
[0070] S350, based on the three-dimensional coordinates of the framed target, obtaining the framed target from the processed image mentioned in S340;
[0071] Return to S320 to continue execution. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated.
[0072] S360: Expel the target to an ear tag missing area through the first warning signal; wherein the ear tag missing area is divided from the breeding farm.
[0073] Furthermore, the processing module is used to determine the health assessment value of the target, and the specific steps include:
[0074] The target features also include the target's eye images, ear images, nose images, skin images, body temperature and weight;
[0075] Determining the eye health value of the target through the eye image of the target;
[0076] Determine the ear health value of the target through the ear image of the target;
[0077] Determine the nose health value of the target through the nose image of the target;
[0078] Determine the skin health value of the target through the skin image of the target;
[0079] Determine the target's body temperature health value through the above body temperature;
[0080] The target's health value of weight is determined by the weight of the previous inspection and the weight of the current inspection;
[0081] The health assessment value of the target is determined by the eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights of the above targets.
[0082] Furthermore, the processing module is also used to compare the health assessment value and health threshold of the target;
[0083] When the health assessment value of the above target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated;
[0084] The sub-health target is driven to the sub-health area through the second warning signal; wherein the sub-health area is divided from the breeding farm.
[0085] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0086] By creating a target database, each target is given a unique identity code, and its characteristics and inspection records are recorded. When the target is missing from the inspection record, the undetected target can be obtained, and the current position of the target can be obtained through the positioning device to perform supplementary detection to ensure comprehensive coverage of the inspection work, reduce missed inspections due to inspection omissions, and reduce the target missed detection rate; extract the target features of each target from the inspection image, and reduce missed detections or misjudgments due to individual recognition errors through analysis of the target features. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0088] Figure 1 Main flow chart. DETAILED DESCRIPTION
[0089] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0090] First embodiment:
[0091] Farm inspection method based on image recognition, combined with Figure 1 , including the following steps:
[0092] S100, creating a target database, which is used to store the identity code, target characteristics and inspection records of each target in the farm (the target can be pigs, cattle, sheep, etc.);
[0093] S200, dividing the above breeding farm into several inspection areas;
[0094] Acquire images of the inspection area to obtain an inspection image set;
[0095] S300, extracting target features of the target from the inspection image; wherein the target features include an identity code;
[0096] S400, determining the health assessment value of the target through the target characteristics of the target; updating the inspection record of the target;
[0097] S500, after traversing each of the above inspection areas, extracting the inspection records of all targets of the current inspection from the target database; and determining whether there are any of the above targets that have not been inspected;
[0098] If there are any, the position of the above-mentioned target that has not been inspected is obtained, the target feature of the target is extracted, and S400 is executed; by comparing the inspection record, it is checked whether there are any targets that have not been inspected. Once found, the positions of these targets are quickly located and supplementary inspections are performed, which greatly reduces the possibility of missed inspections and ensures that all targets can receive regular health assessments;
[0099] If it does not exist, the inspection ends.
[0100] By creating a target database, each target is assigned a unique identity code, and its characteristics and inspection records are recorded. When the target is missing from the inspection record, the undetected target can be obtained, and the current position of the target can be obtained through the positioning device to perform supplementary detection to ensure comprehensive coverage of the inspection work, reduce missed inspections due to inspection omissions, and reduce the target missed detection rate; extract the target features of each target from the inspection image, and reduce missed detections or misjudgments due to individual recognition errors through analysis of the target features (including identity codes).
[0101] A usage scenario for reference is that a farm raises 100 pigs, each of which has a unique identity code. The farm is divided into 10 inspection areas. Before the inspection, an inspection log is created for each identity code, and 0 is assigned to the inspection log, "0" indicating no inspection. When the pig corresponding to the identity code is inspected, the inspection log is set to 1, "1" indicating inspection. After the 10 inspection areas are inspected, the inspection log is checked and it is found that the value of identity code 0051 is 0, then it can be determined that the pig with identity code 0051 has not been inspected. The pig with identity code 0051 is found based on the positioning, and the inspection operation is completed.
[0102] Second embodiment:
[0103] On the basis of the first embodiment, the image of the inspection area is acquired to obtain an inspection image set. The specific steps include:
[0104] A three-dimensional coordinate system is created based on the center of the inspection area, and the image acquisition position of the inspection area is preset to obtain a preset acquisition position set; the image acquisition position is planned by the three-dimensional coordinate system to reduce the visual blind spot;
[0105] Based on the preset acquisition position set, images of the inspection area are acquired at each preset acquisition position at the same time to obtain an inspection image set.
[0106] A three-dimensional coordinate system is established for each inspection area to describe the spatial relationship of each position in the area, which helps to determine the image acquisition point and ensure that the inspection area is scanned from multiple angles and heights; the entire inspection area is covered without blind spots by presetting the image acquisition position; at the same time point, the image of the inspection area is captured from each preset acquisition position, ensuring that all images are captured in the same time period, which not only reduces the error caused by target movement or state change due to time difference, but also obtains richer spatial information through image sets taken at different positions and angles, which is convenient for subsequent target recognition and feature extraction. It can also complete image acquisition at multiple positions at one time, improve the efficiency of inspection work, and reduce the interference or behavioral changes of target animals that may be caused by entering the inspection area multiple times.
[0107] Third embodiment:
[0108] Based on any of the above embodiments, the specific steps of S300 include:
[0109] S310, randomly selecting an inspection image from the inspection image set as a processing image;
[0110] S320, performing target detection on the processed image (computer vision technology such as a deep learning model may be used to analyze the selected processed image, automatically detect and select the target object in the image), selecting the detected target on the processed image to obtain a target image;
[0111] S330, extracting a QR code from the target image; only when the QR code is complete is it determined that the QR code is extracted;
[0112] When the above QR code is extracted, the target feature stored in the QR code is retrieved;
[0113] When the QR code is not extracted, the three-dimensional coordinates of the selected target are determined through the three-dimensional coordinate system of the inspection area and the processed image;
[0114] S340, selecting another inspection image from the inspection image set as a processing image;
[0115] S350, based on the three-dimensional coordinates of the above-mentioned framed target, obtain the framed target from the processed image mentioned in S340; based on the spatial position of the target, find the same target from the newly selected processed image, so as to extract the QR code of the same target and realize the tracking and recognition of the target; improve the accuracy of target recognition by cross-validation of multiple images, and try to capture the complete QR code of the target at different viewing angles.
[0116] Return to S320 to continue execution. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated.
[0117] S360: Use the first warning signal to drive the target to an ear tag missing area, wherein the ear tag missing area is divided from the farm. Isolate the target that cannot be automatically identified by the system to facilitate manual inspection or supplementation of necessary identification information, such as installing or repairing ear tags.
[0118] The above inspection image set contains inspection images from multiple angles. Since there are usually multiple targets in the inspection area and each target can be moved, the position of the QR code is also mobile. To solve the problem of QR code occlusion, the QR code can be extracted from multiple angles and the complete QR code can be selected as the extraction object. Each QR code only stores the information of one target.
[0119] Fourth embodiment:
[0120] Based on any of the above embodiments, the specific steps of S400 include:
[0121] S410, the target features further include the target's eye images, ear images, nose images, skin images, body temperature and weight;
[0122] S420, determining the eye health value of the target through the eye image of the target;
[0123] Analyze the eye image to determine whether the eyes are red, yellow, white, or have secretions, and calculate the eye health value using the following formula:
[0124] ,
[0125] in, Indicates eye health value; This value indicates that the eyes are in very good health; Indicates the weight of the effect of eye redness on the eye health value; Indicates whether the eyes are red. It means the eyes are not red. Indicates red eyes; Indicates the weight of the effect of yellow eyes on the eye health value; Indicates whether the eyes are yellow. It means the eyes are not yellow. It means yellow eyes; Indicates the weight of the effect of white of the eyes on the eye health value; Indicates whether the eyes are white. The eyes are not white. It means the whites of the eyes; Indicates the weight of the effect of eye secretions on eye health value; Indicates whether there is discharge from the eyes. There is no discharge from the eyes. Indicates eye discharge.
[0126] Determine the ear health value of the target through the ear image of the target;
[0127] Analyze the ear image to determine whether the ear is droopy and purple, and calculate the ear health value using the following formula:
[0128] ,
[0129] in, Indicates ear health value; This value indicates that the ear is in very good health; Indicates the weight of the effect of ear droop on ear health value; Indicates whether the ears are drooping. It means that the ears are erect. It means the ears are drooping; Indicates the weight of the impact of purple ears on ear health value; Indicates whether the ears are purple. It means the ears are not purple. It means the ears are purple.
[0130] Determine the nose health value of the target through the nose image of the target;
[0131] Analyze the nose image to determine whether the nose is cracked and runny, and calculate the nose health value using the following formula:
[0132] ,
[0133] in, Indicates the health value of the nose; This value indicates that the nose is very healthy; Indicates the weight of the impact of nose cracking on nose health value; Indicates whether the nose is cracked. It means the nose is not cracked. It means a cracked nose; Indicates the weight of the effect of runny nose on the health value of the nose; Indicates whether the nose is runny, It means the nose is not runny. Indicates a runny nose.
[0134] Determine the skin health value of the target through the skin image of the target;
[0135] Analyze the skin image to determine whether there are rashes, pustules, and local hair loss on the skin, and calculate the skin health value using the following formula:
[0136] ,
[0137] in, Indicates skin health value; This value indicates that the skin is very healthy; Indicates the weight of the effect of rash on skin health value; Indicates whether there is a rash on the skin. It means there is no rash on the skin. It means there is a rash on the skin; Indicates the weight of the impact of skin pustules on skin health value; Indicates whether there are pustules on the skin. It means there are no pustules on the skin. It means there are pustules on the skin; Indicates the weight of the effect of local hair removal on skin health value; Indicates whether there is local hair loss, It means there is no local hair removal. Indicates localized hair loss.
[0138] Determine the target's body temperature health value through the above body temperature;
[0139] According to the preset temperature range of the measured body temperature, each preset temperature range has a corresponding temperature health value defined. The temperature health value of the preset temperature range is called to obtain the temperature health value of the target. ;
[0140] The target's health value of weight is determined by the weight of the previous inspection and the weight of the current inspection;
[0141] The weight gain is obtained based on the difference between the weight measured in the last inspection and the weight measured in the current inspection;
[0142] According to the preset weight growth interval in which the weight gain is located, each preset weight growth interval is defined with a corresponding weight health value. The weight health value of the preset weight growth interval is called to obtain the weight health value of the target ;
[0143] S430, determining the health assessment value of the target through the eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights of the above targets, the formula is as follows:
[0144] ,
[0145] in, represents the health assessment value of the target; Indicates the weight of the impact of eye health value on health assessment value; Indicates the weight of the impact of ear health value on health assessment value; Indicates the weight of the influence of nose health value on health assessment value; Indicates the weight of the impact of skin health value on health assessment value; Indicates the weight of the impact of body temperature health value on health assessment value; Indicates the weight of the impact of the weight health value on the health assessment value. The weight can be set according to the needs and experience of the specific farm. For example, for areas with high incidence of certain infectious diseases, the weight of body temperature and skin health can be increased; a quantitative health score is generated to help farmers quickly understand the overall health status of each pig and take corresponding management measures accordingly.
[0146] Collect various physiological characteristics of the target and analyze various characteristic data to comprehensively evaluate its health status; through multi-dimensional data collection and analysis, conduct a comprehensive inspection of each target from multiple aspects to reduce false detections caused by missing a single feature.
[0147] In a specific embodiment, S440, comparing the health assessment value of the target with the health threshold;
[0148] When the health assessment value of the above target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated;
[0149] The sub-health target is driven to the sub-health area by the second warning signal, wherein the sub-health area is divided from the farm. The sub-health area and the ear tag missing area can be classified as the inspection area.
[0150] After completing the health assessment of the target, identify the targets in sub-health status and isolate the sub-health targets to specific areas to reduce the spread of potential diseases and protect other healthy target groups.
[0151] Fifth embodiment:
[0152] A farm inspection system based on image recognition, which is used to implement the above inspection method;
[0153] The inspection system includes:
[0154] An input module, which is used to create a target database and input the identity code, target characteristics and inspection records of each target in the farm into the target database;
[0155] A map acquisition module, which is used to obtain a map of the farm;
[0156] An image acquisition module, the image acquisition module is used to acquire images of the inspection area to obtain inspection images;
[0157] A positioning module, wherein the positioning module is arranged on the target;
[0158] The processing module is connected to the input module, the map acquisition module, the image acquisition module and the positioning module, and is used to perform the following steps:
[0159] Based on the map of the farm, the farm is divided into several inspection areas;
[0160] Extracting target features of the target from the inspection image; wherein the target features include an identity code;
[0161] Determine the health assessment value of the target through the target characteristics of the above target; update the inspection record of the above target;
[0162] After traversing each of the above inspection areas, the inspection records of all targets for the current inspection are extracted from the target database;
[0163] Determine whether there are any of the above targets that have not been inspected;
[0164] If it exists, the location of the uninspected target is obtained through the positioning module, the target features of the target are extracted, the health assessment value of the target is determined, and the inspection record of the target is updated;
[0165] If it does not exist, the inspection ends.
[0166] In a specific embodiment, the above-mentioned image acquisition module is used to obtain images of the inspection area, and the specific steps of obtaining the inspection image set include:
[0167] The processing module creates a three-dimensional coordinate system based on the center of the inspection area, presets the image acquisition position of the inspection area, and obtains a preset acquisition position set;
[0168] The image acquisition module acquires images of the inspection area at each preset acquisition position at the same time based on the preset acquisition position set to obtain an inspection image set.
[0169] In a specific embodiment, the specific steps of the processing module for extracting target features include:
[0170] S310, randomly selecting an inspection image from the inspection image set as a processing image;
[0171] S320, performing target detection on the processed image, selecting the detected target on the processed image, and obtaining a target image;
[0172] S330, extracting a QR code from the target image;
[0173] When the above QR code is extracted, the target feature stored in the QR code is retrieved;
[0174] When the QR code is not extracted, the three-dimensional coordinates of the selected target are determined through the three-dimensional coordinate system of the inspection area and the processed image;
[0175] S340, selecting another inspection image from the inspection image set as a processing image;
[0176] S350, based on the three-dimensional coordinates of the framed target, obtaining the framed target from the processed image mentioned in S340;
[0177] Return to S320 to continue execution. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated.
[0178] S360: Expel the target to an ear tag missing area through the first warning signal; wherein the ear tag missing area is divided from the breeding farm.
[0179] In a specific embodiment, the processing module is used to determine the health assessment value of the target, and the specific steps include:
[0180] The target features also include the target's eye images, ear images, nose images, skin images, body temperature and weight;
[0181] Determining the eye health value of the target through the eye image of the target;
[0182] Determine the ear health value of the target through the ear image of the target;
[0183] Determine the nose health value of the target through the nose image of the target;
[0184] Determine the skin health value of the target through the skin image of the target;
[0185] Determine the target's body temperature health value through the above body temperature;
[0186] The target's health value of weight is determined by the weight of the previous inspection and the weight of the current inspection;
[0187] The health assessment value of the target is determined by the eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights of the above targets.
[0188] In a specific embodiment, the processing module is further used to compare the health assessment value and the health threshold of the target;
[0189] When the health assessment value of the above target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated;
[0190] The sub-health target is driven to the sub-health area through the second warning signal; wherein the sub-health area is divided from the breeding farm.
[0191] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A farm inspection method based on image recognition, characterized in that: The following steps are involved: S100, creating a target database, wherein the target database is used to store the identity code, target characteristics and inspection records of each target in the farm; S200, dividing the breeding farm into a number of inspection areas; Acquire images of the inspection area to obtain an inspection image set; S300, extracting target features of a target from the inspection image; wherein the target features include an identity code; S400, determining a health assessment value of the target through the target characteristics of the target; and updating the inspection record of the target; S500, after traversing each inspection area, extracting the inspection records of all targets for the current inspection from the target database; Determine whether there is the target that has not been inspected; if so, obtain the position of the target that has not been inspected, extract the target feature of the target, and execute S400; if not, end the inspection.
2. The farm inspection method according to claim 1, characterized in that: Acquiring images of the inspection area to obtain an inspection image set, the specific steps include: Creating a three-dimensional coordinate system based on the center of the inspection area, presetting the image acquisition position of the inspection area, and obtaining a preset acquisition position set; Based on the preset acquisition position set, an image of the inspection area is acquired at each preset acquisition position at the same time to obtain an inspection image set.
3. The farm inspection method according to claim 1, characterized in that: The specific steps of S300 include: S310, randomly selecting an inspection image from the inspection image set as a processing image; S320, performing target detection on the processed image, selecting the detected target on the processed image, and obtaining a target image; S330, extracting a QR code from the target image; When the QR code is extracted, the target feature stored in the QR code is retrieved; When the two-dimensional code is not extracted, the three-dimensional coordinates of the framed target are determined through the three-dimensional coordinate system of the inspection area and the processed image; S340, selecting another inspection image from the inspection image set as a processing image; S350, based on the three-dimensional coordinates of the frame-selected object, obtaining the frame-selected object from the processed image mentioned in S340; Return to S320 and continue to execute. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated; S360: Expel the target to an ear tag missing area through the first warning signal; wherein the ear tag missing area is divided from the breeding farm.
4. The farm inspection method according to claim 1, characterized in that: The specific steps of S400 include: S410, the target features further include the target's eye images, ear images, nose images, skin images, body temperature and weight; S420, determining an eye health value of the target through the eye image of the target; Determining an ear health value of the target through the ear image of the target; Determining a nose health value of the target through the nose image of the target; Determining a skin health value of the target through the skin image of the target; Determine the target's body temperature health value based on the body temperature; Determine the target's health weight value based on the weight of the last inspection and the weight of the current inspection; S430. Determine the health assessment value of the target through the target's eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights.
5. The farm inspection method according to claim 1, characterized in that: S440, comparing the health assessment value of the target with the health threshold; When the health assessment value of the target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated; The sub-health target is driven to a sub-health area through the second early warning signal; wherein the sub-health area is divided from the breeding farm.
6. The farm inspection system based on image recognition is characterized by: The inspection system is used to implement the inspection method described in any one of claims 1 to 5; The inspection system includes: An input module, which is used to create a target database and input the identity code, target characteristics and inspection records of each target in the farm into the target database; A map acquisition module, wherein the map acquisition module is used to obtain a map of the breeding farm; An image acquisition module, wherein the image acquisition module is used to acquire images of the inspection area to obtain inspection images; A positioning module, wherein the positioning module is arranged on the target; A processing module, the processing module is connected to the input module, the map acquisition module, the image acquisition module and the positioning module, and the processing module is used to perform the following steps: Dividing the farm based on the map of the farm to obtain a number of inspection areas; Extracting target features of the target from the inspection image; wherein the target features include an identity code; Determine the health assessment value of the target through the target characteristics of the target; update the inspection record of the target; After traversing each inspection area, extracting the inspection records of all targets for the current inspection from the target database; Determining whether there is an uninspected target; If so, the location of the uninspected target is obtained through the positioning module, the target features of the target are extracted, the health assessment value of the target is determined, and the inspection record of the target is updated; If it does not exist, the inspection ends.
7. The farm inspection system according to claim 6, characterized in that: The image acquisition module is used to obtain images of the inspection area, and the specific steps of obtaining the inspection image set include: The processing module creates a three-dimensional coordinate system based on the center of the inspection area, presets the image acquisition position of the inspection area, and obtains a preset acquisition position set; The image acquisition module acquires images of the inspection area at each preset acquisition position at the same time based on the preset acquisition position set to obtain an inspection image set.
8. The farm inspection system according to claim 6, characterized in that: The specific steps of the processing module for extracting target features include: S310, randomly selecting an inspection image from the inspection image set as a processing image; S320, performing target detection on the processed image, selecting the detected target on the processed image, and obtaining a target image; S330, extracting a QR code from the target image; When the QR code is extracted, the target feature stored in the QR code is retrieved; When the two-dimensional code is not extracted, the three-dimensional coordinates of the framed target are determined through the three-dimensional coordinate system of the inspection area and the processed image; S340, selecting another inspection image from the inspection image set as a processing image; S350, based on the three-dimensional coordinates of the frame-selected object, obtaining the frame-selected object from the processed image mentioned in S340; Return to S320 and continue to execute. If no QR code is extracted after traversing the inspection image set, a first warning signal is generated; S360: Expel the target to an ear tag missing area through the first warning signal; wherein the ear tag missing area is divided from the breeding farm.
9. The farm inspection system according to claim 6, characterized in that: The processing module is used to determine the health assessment value of the target, and the specific steps include: The target features also include the target's eye images, ear images, nose images, skin images, body temperature and weight; Determining an eye health value of the target through an eye image of the target; Determining an ear health value of the target through the ear image of the target; Determining a nose health value of the target through the nose image of the target; Determining a skin health value of the target through the skin image of the target; Determine the target's body temperature health value based on the body temperature; Determine the target's health weight value based on the weight of the last inspection and the weight of the current inspection; The health assessment value of the target is determined by the target's eye health value, ear health value, nose health value, skin health value, body temperature health value, weight health value and corresponding weights.
10. The farm inspection system according to claim 9, characterized in that: The processing module is also used to compare the health assessment value of the target with a health threshold; When the health assessment value of the target is lower than the health threshold, the target is marked as a sub-health target and a second warning signal is generated; The sub-health target is driven to a sub-health area through the second early warning signal; wherein the sub-health area is divided from the breeding farm.
Citation Information
Patent Citations
Large-area epidemic situation detection system for indoor pig farm
CN111667037A
Livestock breeding management system based on Internet of things
CN112000051A
Livestock potential disease prediction method
CN116798113A
Pig health assessment method based on rail type inspection robot
CN119251870A
Navigation method and system for inspection robot in breeding house
CN119437248A