Pig carcass and pig body code identification method, camera and slaughter line production management system
Through deep learning object detection algorithm and OCR technology, the blood code or pig body code of pig carcasses on pig slaughtering online is solved, and the problem of difficult identification and traceability of pork carcasses source and destination information is achieved, and efficient pork product traceability and quality and safety guarantees are achieved .
Patent Information
- Application Number
- CN202411449996.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-17
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-11
AI Technical Summary
During pig slaughtering, it is difficult for the existing technology to effectively identify and trace the source and destination information of pork carcasses, resulting in the inefficiency of issuing certificates and inconsistent with physical evidence.
Using deep learning object detection algorithm and OCR technology, we collect pig carcass video streams through high-definition cameras, detect and track pig carcass, identify blood codes or pig body codes on its epidermis, obtain their source and destination information, and generate unique traceability codes Perform spray printing.
It improves the efficiency of pork product traceability code information, realizes the identification and traceability of the accurate source and destination information of pork carcasses, and ensures the quality and safety of meat products and food safety.
Smart Images

Figure CN119418242A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a pig carcass pig body code recognition method, a camera and a slaughtering line production management system, in particular to the field of pig slaughtering and pig product marking. Background Art
[0002] According to the law, all animal products must first undergo slaughter quarantine during the slaughter and circulation process. After passing the quarantine, the official veterinarian of the animal health supervision agency shall issue an animal quarantine certificate. Taking live pigs as an example, at present, after transportation, rest, hot water scalding and rolling friction hair removal, head removal, splitting and other processes in the slaughter process, the unique identification information worn by the live pigs, such as ear tags and leg rings, will fall off, resulting in unclear electronic information on the source of the pork carcasses and the destination of the products after passing the quarantine. As a result, the information for issuing certificates still has problems such as one certificate for each batch, low efficiency of issuing certificates, and discrepancies between physical evidence. In addition, ear tags and leg rings are expensive and difficult to popularize.
[0003] In order to be able to identify pork carcasses after slaughter, the main method used by slaughterhouses is to stamp a blood code representing the source and destination information of the live pigs on the skin of the live pigs during the selection and transaction process before slaughter. During the slaughtering process, the blood code information of the pork carcasses is identified to determine its source and destination information, thereby meeting the requirements of pork product information traceability.
[0004] With the advancement of relevant policies on paperless animal quarantine certificates and information-based traceability management of agricultural product quality and safety, there is an urgent need to add non-fall-off and readable identification information to the animal pre-slaughter rest and selection process, quickly sort the pork carcasses on the slaughtering production line, generate a unique identity traceability code for the pork carcasses, collect and bind the source and destination information of the pork carcasses, control the circulation of pork carcass products in the slaughterhouse workshop, and facilitate the generation of refined traceability link information for each piece and each head of pork carcasses.
[0005] The application number is 201811476271.9, and the name of the invention is "A livestock carcass skin marking device, system and marking method". A livestock carcass skin marking device is disclosed, which includes a coding unit and a coding unit. The coding unit reads livestock skin marking data stored locally or on a server to generate a corresponding printing image; the coding unit includes an ink nozzle, which sprays the printing image on the livestock carcass skin.
[0006] At present, artificial intelligence image recognition and text recognition technologies are already very mature. How to use artificial intelligence recognition technology to obtain the pig's blood code or pig body code information, and associate it with the traceability code sprayed on the pig carcass skin, these are all things that need to be considered. Summary of the invention
[0007] The purpose of the present invention is to provide a method for identifying a pig carcass pig body code and a corresponding slaughter line production management system, which can identify the blood code or pig body code on the pig carcass during the slaughtering production process, obtain the source and destination information of the pig carcass, and improve the efficiency of the informationization of the pork product traceability code.
[0008] In order to realize the present invention, the present invention provides a method for identifying a pig body code of a pig carcass, wherein a pig body code representing its attribute information is marked on the surface of the pig carcass, and the method comprises a pig carcass detection step, obtaining a video stream of the pig carcass on a live pig slaughtering line, and detecting the pig carcass from the video stream by a deep learning target detection algorithm; a pig carcass tracking and counting step, counting and numbering the detected pig carcasses, using a target tracking algorithm to track each of the pig carcasses passing through the live pig slaughtering line, and obtaining a picture for identifying the pig body code of the pig carcass; and a pig body code recognition step, using OCR technology to recognize the pig body code on the picture.
[0009] Furthermore, the pig carcass detection step also includes detecting whether the pig carcass in the video stream is the back of the pig carcass or the abdomen of the pig carcass. If it is the back of the pig carcass or the abdomen of the pig carcass, the pig carcass tracking and counting step is performed.
[0010] Furthermore, the pig carcass detection step determines a pig carcass rectangular frame, and the pig carcass tracking and counting step obtains a picture sequence for identifying the pig body code of the pig carcass, and the pictures in the picture sequence are determined by the pig carcass rectangular frame.
[0011] Furthermore, the pig body code recognition step also includes rotating the pictures in the picture sequence and recognizing the pig body code in the rotated pictures.
[0012] Furthermore, the pig body code recognition step also includes searching for multiple pig body code areas on the image and recognizing the pig body code from the multiple pig body code areas.
[0013] Furthermore, the image is rotated according to a set priority rotation angle, or according to the rotation angle of the image with the most correct recognition based on historical statistics, or according to the rotation angle of the last correct recognition, or according to the rotation angle of the most correct recognition in previous times.
[0014] Furthermore, the method also includes a recognition result correction step, comparing the recognized pig body code with the known pig body code corresponding to the live pig slaughtering line, finding the known pig body code that meets the threshold requirement, and using the known pig body code as the recognition result.
[0015] Furthermore, the comparison adopts Levenshtein algorithm, which is a string editing distance algorithm.
[0016] Furthermore, the identification step also includes uploading the photo or video to a server if the known pig body code that meets the threshold requirement cannot be found.
[0017] The present invention also provides a camera, which applies the above-mentioned pig carcass pig body code recognition method.
[0018] The present invention also provides a slaughtering line production management system, wherein the system applies the above-mentioned pig carcass pig body code recognition method.
[0019] After adopting the solution of the present invention, the pig carcass video is collected through a high-definition camera, the bleeding code or pig body code pattern is identified, and the source and destination information of each carcass product is obtained. Subsequently, a unique traceability code for the pork carcass is generated and printed on the surface of the carcass, and it is automatically transported to different pre-cooling rooms and platforms as planned, which is convenient for inspection and traceability of each link. At the same time, this invention also meets the "unification of objects and codes, and connection between slaughtering and marketing", and realizes full-process supervision, thereby ensuring the quality and safety of meat products and food safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a schematic diagram of the slaughter quarantine coding and traceability management information platform; Figure 2 and Figure 3 It is a front view and a side view of the blood code stamping device; Figure 4 and Figure 5 It is the front view and side view of the blood code stamping device 2; Figure 6 and Figure 7 They are the top view and side view of the blood code font respectively; Figures 8a to 8c The blood code of pork carcass surface captured by the camera on the slaughtering production line; Fig. 9 Schematic diagram of AI identifying blood code; Fig.10 This is a schematic diagram of the application of printing traceability QR codes on the skin of pork carcasses in the slaughtering production line. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] The specific implementation scheme of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] In order to realize the present invention, the present invention requires equipment for stamping blood codes on the skin of live pigs, inkjet equipment for printing traceability codes and quarantine stamps and other patterns on the skin of pork carcasses, video data acquisition equipment, and slaughter quarantine inkjet and traceability management information platform. The slaughter quarantine inkjet and traceability management information platform mainly includes a subject file management system, an admission management system, an AI recognition system, a slaughter quarantine inkjet system, and a production, marketing and traceability system. The AI recognition system is mainly a video data acquisition device and a high-performance GPU server.
[0024] In order to facilitate the application of blood codes, it is necessary to standardize the coding rules for the on-site numbers of slaughterhouse customers' pig suppliers and meat dealers. Pig suppliers are also called slaughterhouses, and meat dealers are also called butchers, and establish the main electronic information files for them in the system.
[0025] The on-site number needs to be produced and its characters are used on the equipment for stamping blood codes. After the live pigs enter the site and fill in the relevant animal certificate number, animal species, and source information of the live pig supplier into the system, they enter the selection and transaction stage. The blood code stamping equipment with the number characters of the relevant live pig suppliers and meat dealers is used to stamp the live pigs' skin to form a blood code pattern imprint on the skin, and the selection and transaction information is uploaded to the slaughter quarantine coding system. After the meat dealers are selected, the slaughterhouse will allocate a waiting pen for them and a pre-cooling room and platform for picking up the meat after slaughter.
[0026] After the live pigs have rested in the slaughter pen, they enter the slaughtering production stage. The video data of the blood code pattern of the live pigs is collected by the camera on the slaughtering line. This video data is transmitted to the AI recognition system for blood code pattern recognition, and the on-site numbering information is obtained and transmitted to the slaughtering quarantine coding system.
[0027] The on-site numbers of pig suppliers and meat operators are uploaded to the slaughter quarantine coding system in sequence. The system automatically processes the associated selected transaction information, generates a unique traceability code in sequence, and binds the corresponding source and destination information. The source information includes the pig supplier, animal certificate number and the breeding area in the certificate, etc. The destination information includes the meat operator and its address information, etc. This information serves as the preparation information for the traceability chain of pork products.
[0028] The unique traceability code generated in sequence will be pushed to the coding equipment, and the coding equipment will also spray the traceability code pattern on the surface of the pork carcass in sequence. At the same time, the printed traceability code will be transmitted back to the slaughter quarantine code coding system. The system will then automatically confirm that the traceability code has been printed and used. At the same time, the traceability code is associated with relevant source and destination information to form a traceability chain.
[0029] The pork carcass products slaughtered on the slaughtering line will be automatically transferred to the corresponding pre-cooling rooms and platforms according to the pre-cooling room and platform information allocated to the meat business operators.
[0030] After slaughtering, meat dealers take away the pork carcass products. In the circulation link, consumers and regulators can scan the unique traceability code on the carcass skin. Through this traceability code, they can query the slaughter quarantine coding system and the production, sales and traceability system and return the product certificate information and traceability chain information.
[0031] The basic idea of the present invention is described above and will be described in detail below.
[0032] Figure 1 This is a schematic diagram of the slaughter quarantine coding traceability management information platform. The hardware of the slaughter quarantine coding traceability management information platform includes at least blood coding equipment, coding equipment and cameras. The blood coding equipment is used to print the on-site numbers of the pig suppliers and meat business operators associated with the pigs on the skin of the pig carcass, the coding equipment is used to print the traceability code and quarantine inspection seal on the skin of the pig carcass, and the camera is used to shoot the blood code printed on the skin of the pig carcass, and obtain its source and destination information by identifying the blood code.
[0033] The software involved in the slaughter quarantine coding and traceability management information platform includes at least the subject file management system, admission management system, AI recognition system, slaughter quarantine coding system, and production, sales and traceability system. Among them, the subject file management system is used to manage the information of pig suppliers and meat operators of the slaughterhouse and their on-site numbers. According to the established standardized coding rules, the daily main customers of the slaughterhouse, including pig suppliers, meat operators, etc., are registered and managed. For these subject files, the unique on-site number, subject name, district and address that comply with the coding rules are recorded in the system.
[0034] The admission management system is used to fill in the relevant animal certificate number, animal species, pig supplier and other source information into the system when the pigs enter the farm. In the daily admission link, the system will register the daily admission details of the pigs, including animal certificate number, admission date, animal species, admission quantity, source of the consignor, source of the admission division, pig supplier and other information.
[0035] The AI recognition system is used to identify the blood code on the skin of pig carcasses after slaughter through AI algorithms.
[0036] The slaughter quarantine coding system is used to print the traceability code on the pig carcass skin and associate it with the blood code on the pig carcass skin identified by the AI identification system.
[0037] The production, sales and traceability system is used to record and query the sales information of live pigs and live pig products.
[0038] Table 1 shows the standardized on-site numbering of live pig suppliers and meat operators. In order to facilitate the machine or human eye to read the blood code information, and to ensure that the blood code is read manually after slaughter, so as to accurately obtain the pork products related to oneself, it is necessary to first formulate standardized on-site numbering and coding rules for live pig suppliers and meat operators.
[0039] 1) The number of live pig suppliers is relatively small, so a two-digit code can be used. A code with three or more pure digits or a combination of English and numerals can also be supported, as long as it is unique within a slaughterhouse.
[0040] 2) There are relatively many meat business operators, so a code consisting of one English digit and three digits can be used. A code consisting of four or more pure digits or a combination of English and digits can also be supported. One English digit can represent a customized destination zoning mark, which can be guaranteed to be unique within a slaughterhouse.
[0041] Table 1 Standardized on-site numbering rules for pig suppliers and meat operators
[0042] Figure 2 and Figure 3 The front view and side view of the blood code stamping device. The blood code includes 4 fonts "B116", which are single-row fonts and are stuck in the card slot of the stamping device. One side of the card slot is open for placing the fonts. After the fonts are placed, the bolts set on the open side clamp the fonts. Different pig suppliers and meat operators need to use different fonts due to different on-site numbers. When replacing the font, you only need to unscrew the screws, take out the font, and put in the new font. When using the single-row font of the blood code stamping device, the on-site numbers of pig suppliers and meat operators need to be applied separately, and a total of two taps are required, which is inefficient; the application positions are scattered, which is not conducive to camera AI recognition; and two applications are prone to errors.
[0043] Figure 4 and Figure 5 The front and side views of the second blood code stamping device. The second blood code stamping device has two rows of fonts. The upper row is the on-site number "34" of the pig supplier, and the lower row is the on-site number "B116" of the meat business. They are locked with bolts. When the font needs to be replaced, unscrew the screws, take out the font, and put in a new font. Using the double-row font of the second blood code stamping device to apply the on-site numbers of the pig supplier and the meat business only requires one tap, which is highly efficient; the two rows of blood codes are together and fixed in position, which is convenient for camera AI recognition; the probability of error when applying is low.
[0044] There is another method that can achieve the simultaneous application of the on-site numbers of the pig supplier and the meat business in a single tap, that is, lengthening the card slot to accommodate 6 fonts "34B116" or 7 fonts "34-B116". However, this method requires a relatively long and flat area of the pig's skin, which is difficult to find the corresponding part, affecting the application quality.
[0045] Figure 6 and Figure 7 The top view and side view of the blood code mold are shown respectively. The blood code mold is generally made of aluminum or stainless steel.
[0046] After the entry registration phase, the selection and transaction phase begins. Meat dealers will arrive at the slaughterhouse one after another and select and purchase live pigs from pig suppliers. After the selection is completed, a device for stamping blood codes on the skin of live pigs will be used to combine the characters corresponding to the animal live pig supplier number and its meat dealer number, and stamp them together on the skin of the live pigs to form a blood code mark that is not easy to erase and can be read. In order to facilitate the subsequent reading of blood code information, it is necessary to formulate a standardized blood code stamping pattern. A group of overall blood code patterns has the live pig supplier number above and the meat dealer number below. Multiple groups of blood code patterns are stamped in areas near the pig's back that are not prone to skin wrinkles after being hung on a hook. At the same time, in the selection phase, the live pig supplier will register the entry animal certificate number, the number of live pigs purchased, and the purchased meat dealer information after each meat dealer has completed the selection and purchase, and report them to the slaughter quarantine inkjet system and the production, sales and traceability system, and save the selection transaction information for the certificate issuance phase.
[0047] At the same time, the meat dealer confirms that the selection is completed through the system, and the system will automatically allocate information such as the pre-cooling room and its platform for picking up the meat after slaughtering based on operating habits, or the meat dealer manually fills in information such as the pre-cooling room and its platform for picking up the meat and reports it to the system.
[0048] Figures 8a to 8c This is the blood code of the pork carcass surface captured by the camera on the slaughtering production line. After the selection and transaction and the blood code is stamped, the pigs begin to rest until the slaughtering stage. Figures 8a to 8c Three groups of blood codes "01 A001", "11 B011" and "34 B116" are stamped on it respectively. The slaughtering process will adjust the slaughter batches of live pigs based on the selection transaction information. In the same time period, there are multiple meat operators who select live pigs from multiple different live pig suppliers and enter the slaughtering line at the same time, resulting in the pork carcasses themselves being out of order on the slaughtering line. At this time, after the depilation and trimming process of the slaughtered live pigs, the surface of the pork carcass is relatively clean and tidy. The blood code on the skin of the pork carcass is photographed by a camera, and the video data will be transmitted to the AI recognition system of the slaughter quarantine inkjet coding and traceability management information platform for recognition, and the pig supplier number and meat operator number information contained in the blood code will be identified, and then the physical slaughter line number bound to the camera itself and the identification count of the number of slaughtered heads will be superimposed, forming the pork carcass sorting information and automatically uploading it to the system. For those who cannot be read due to too many scars or other reasons, manual video recording is provided to read and supplement the information to the system.
[0049] Fig. 9Schematic diagram of AI blood code recognition. The camera installed on the slaughter line shoots video and captures photos of the movement of pig carcasses in real time. When a pig carcass is captured, the pig carcass is counted and tracked, and the area in the pig carcass photo that may contain blood codes is searched, and the blood code is identified from the searched blood code area. After the recognition is completed, it is verified whether the blood code or blood code combination is correct. If it is correct, it is uploaded to the slaughter quarantine coding system. If the correct blood code cannot be identified, the photo and video are recorded, and an unrecognizable mark is given, which is also uploaded to the slaughter quarantine coding system for subsequent processing.
[0050] The blood code is also called the pig body code. Due to the angle and force used when the blood code is stamped, as well as factors such as the breed of the live pig, the blood code is sometimes not easy to see clearly. Some slaughterhouses will arrange workers to write the blood code on the pig carcass with a marker for easy manual identification. The AI algorithm of the present invention is applicable to both the blood code and the text written on the pig carcass. For convenience, the present invention takes the blood code as an example for explanation. The recognition principles and methods of both are the same.
[0051] Below, the specific algorithm process of AI recognition is explained in detail.
[0052] After slaughtering on the slaughtering production line, with the help of AI-recognized blood codes, the production automatic management system will automatically transfer the pig carcass to the corresponding workshops according to the source and destination information of the pig carcass, the pre-cooling room and platform plan information submitted by the meat business operator, and then the meat business operator will manually read the blood code information to identify the field number and get his own pork carcass product. Then the pig carcass product enters the circulation link, and the unique traceability QR code printed on the skin of the carcass is used as the only identifier that can be read externally after leaving the market. Consumers or regulators can scan the unique traceability QR code on the skin of the carcass to check the source and destination information of the pork product, etc., which satisfies the inspection and traceability function.
[0053] The video is shot by a high-definition camera installed on the slaughter line, and the GPU server used to identify the blood code needs to be deployed in the same local area network as the high-definition camera, so as to quickly obtain the real-time video stream for analysis in the same network segment to achieve real-time recognition of the blood code.
[0054] Generally, the slaughtering site environment is relatively complex, and the reasons for the difficulty in blood code recognition are as follows: 1) When the pig carcass slides on the slaughter line, it is usually in the same direction to facilitate the staff to clean the internal organs. However, the carcass may occasionally flip over. The camera can only capture the abdomen of the flipped carcass and cannot capture the blood code.
[0055] 2) There were staff working and walking on site. The color of their work clothes was similar to the pig carcass. The pig carcass hanging under the camera was similar in shape to the rectangular frame outside the human body, which led to misidentification.
[0056] 3) In addition to the blood code characters on the pig carcasses, there are other graphic signs on site, such as safety production warning signs, date signs, etc., which interfere with the recognition of the blood code.
[0057] 4) Multiple pig carcasses can be captured simultaneously within the camera’s field of view, and each carcass needs to be assigned a unique number to distinguish the blood code.
[0058] 5) The angles of the manually stamped blood codes are varied, and the blood code characters displayed on the hung pig carcasses have multiple angles. It is difficult to recognize characters at any angle using only OCR technology.
[0059] 6) Due to stains, pig hair, etc. on the skin of some pig carcasses, or unclear manual printing of the blood code, the identified blood code may miss several characters or cannot be identified.
[0060] In order to solve the above problems 1), 2), and 3), before identifying the blood code, the back and abdomen of the pig carcass need to be detected first. In most cases, the blood code is printed on the back of the pig carcass, while the blood code cannot be photographed on the abdomen of a small number of pig carcasses that have been turned over. Based on this, the back and abdomen of the pig carcass can be detected; then the interference of the on-site staff must be eliminated. Therefore, the data training of the detection model for pig carcasses requires three classification labels: pig carcasses with blood codes, the abdomen of the turned pig carcasses, and on-site staff.
[0061] After the pig carcass is detected, the area for blood code recognition is limited to the rectangular frame of the pig carcass. This can eliminate interference from the background environment to the greatest extent possible. At the same time, the size of the picture waiting for blood code recognition is reduced from the size of the entire camera to the size of a single carcass, making subsequent blood code recognition faster.
[0062] In order to solve the above problem 4), it is necessary to track and count the detected carcasses, and use the counted serial number to number the pig carcasses. When the pig carcass appears within the camera's field of view, the above pig carcass detection algorithm is first used to detect the rectangular frame area of the pig carcass, and the tracking algorithm is used to track the motion trajectory of the current rectangular frame and assign a fixed tracking number. Since the slaughter line runs in one direction, it is easy to determine the situation where the pig carcass moves out of the picture, thereby ending the tracking of the carcass. At this time, the currently numbered pig carcass may have taken dozens of pictures, and the timestamp corresponding to each picture is recorded. Considering that the pig carcass will have a slight angle rotation during the entire process of passing through the camera's field of view, and considering the computing power of the GPU server, for this group of pictures with the current number, 3 or 5 pictures can be evenly selected for subsequent recognition. Assume that 3 pictures are selected, that is, at 1 / 5, 1 / 2, and 4 / 5 of the picture sequence, to ensure the position and interval, of course, other positions can also be selected.
[0063] To solve the above problem 5), there are two options: Solution 1: When marking the blood code, all possible angles should be considered, more pictures should be collected, or the same blood code picture should be rotated multiple times before marking, so that the blood code can be directly identified on the pig carcass. The disadvantage of Solution 1 is that a large amount of marking is required.
[0064] Solution 2: Rotate the collected pig carcass images to make the blood code as positive as possible. Considering the convenience of image rotation, usually only one of the rotations of 0, 90, 180, or 270 degrees is required. Rotation at other angles will result in a blank background. In this way, only images with positive blood code characters need to be marked. When a pig carcass is detected for identification, the current image can be tried with the same four rotations according to priority until a blood code that meets the requirements is identified.
[0065] Considering the huge workload of collecting and annotating pictures, the present invention gives priority to solution 2.
[0066] In the above, the image is rotated for recognition based on priority. The priority can be set according to the blood code application habit of the slaughterhouse, or it can be prioritized according to the recognition rotation angle of historical statistics. For example, according to recognition statistics, it is easier to get the correct result by rotating 90 degrees, so it is prioritized to rotate 90 degrees. This can improve efficiency and reduce the performance requirements for the AI server; or, based on the rotation angle of the correct result of the last or most recent recognition, the current image is rotated with the rotation angle of the previous few times for recognition.
[0067] In order to solve the above problem 6), we first further investigated the pattern of blood code printing in slaughterhouses and found two situations that can be used to improve blood code recognition. In the first case, carcasses belonging to the same meat business operator are usually arranged together, which is convenient for the business operator to collect the goods, which means that the blood codes of several consecutive pig carcasses are likely to be the same; in the second case, before the slaughter work begins on the day, all pig suppliers and meat business operators are determined, which means that the collection of all blood codes for the day can be obtained.
[0068] For the first case, the context information of blood code recognition can be saved. If the characters recognized in the current blood code are omitted or clearly do not meet the blood code character conditions, a string comparison algorithm can be used. The algorithm of the present invention selects the string editing distance algorithm Levenshtein algorithm to compare the currently recognized blood code combinations to be corrected with the recognized previous and next blood codes. If the threshold is met, it is recorded as correct recognition. If more than one meets the threshold, it can be sent to the platform together with the current pig carcass picture or video, allowing the user to make the final choice.
[0069] If the threshold value of the context information comparison does not meet the conditions and the correct recognition result cannot be selected, then according to the second situation, the currently recognized blood code combinations to be corrected are compared with all the blood code combinations of the day for search, and the Levenshtein algorithm is also used. Since the number of blood code characters is small, the execution speed of this algorithm is very fast. Meeting the threshold is recorded as correct recognition. If more than one meets the threshold, or if the threshold condition is not met, such as the abdomen of the pig carcass, the blood code is not captured, it can be sent to the platform together with the current pig carcass picture or video, so that the user can make the final choice or make a supplementary recording based on the picture or video.
[0070] As pig carcasses move sequentially on the slaughtering line, the blood code information queue captured and recognized by the camera is consistent with the queue formed by the inkjet printer. The blood code can also be associated with the traceability code by comparing the queues. In this way, the traceability code does not need to be generated after the blood code is recognized.
[0071] To summarize, the steps of blood code AI recognition include, first, pig carcass detection. AI uses interval video frame data to detect motion. When there is movement, it analyzes whether it is a pig carcass. Then there is blood code detection. When it is determined to be a pig carcass, multiple frame images are used to identify the blood code of the carcass. Finally, the recognition result is corrected. The multiple sets of results identified are used to correct the blood code AI recognition results based on all data sets of the pig supplier number and meat business operator number of the system selection information. For those that cannot be corrected by AI, the AI recognition results together with the pig carcass picture or video are sent to the platform for manual correction, allowing the user to make the final choice.
[0072] In order to better perform AI recognition of blood codes, blood code detection also includes back and abdomen detection, which detects the back and abdomen of the pig carcass; background interference detection, which includes people, graphic symbols, etc.; tracking and counting, which tracks and counts the pig carcasses identified within the viewing angle, and maintains continuous tracking within the viewing angle to obtain a sequence of pictures for identification, annotate the acquired picture sequence with time and count for easy analysis; picture recognition, which performs AI recognition on the acquired picture sequence, and rotates each picture in the picture sequence as needed before recognition.
[0073] Fig.10This is an application diagram of printing traceability QR codes on the surface of pork carcasses on the slaughtering production line. After AI recognizes the carcass sorting information, the slaughter quarantine coding system of the platform will automatically generate unique traceability QR codes 2 and digital codes 3 in sequence according to this sorting information, and push the traceability code information to the coding equipment bound to the physical slaughtering line. The coding equipment will print traceability QR codes 2, digital codes 3, meat inspection pass stamp 1, quarantine inspection stamp 4 and other patterns on the surface of pork carcasses in the order of slaughter. This unique traceability QR code 2 and digital code 3 are bound to the information of pig suppliers and meat operators, and the transaction information is matched and selected through this information, and the source information and destination information of the traceability chain are formed at the same time.
[0074] After the printed traceability QR code information is uploaded to the slaughter quarantine coding system through the coding equipment, the source and destination information of the traceability chain related to the unique traceability code and the corresponding production and sales ledger are automatically generated, meeting the two functions of production and sales statistics and inspection and traceability.
[0075] Since the blood code is composed of letters or numbers, it can be recognized by using the OCR (Optical Character Recognition) method. OCR refers to the process of analyzing and identifying image files of text materials to obtain text and version information. In other words, the text in the image is recognized and the content in text form is returned. OCR technology is now very mature, especially with the emergence of artificial intelligence-related technologies. OCR has also developed from the earliest simple recognition methods such as template matching to the application of various deep neural networks today, which greatly improves the recognition rate and reduces the error recognition rate and rejection rate. Today, OCR technology is used in various scenarios such as document form recognition, license plate and driver's license recognition, card recognition, financial bill recognition, etc.
[0076] In order to simplify the system, the camera that captures the pig blood code can also be integrated with the pig blood code recognition algorithm, and output the pictures, videos, recognition areas, recognition results, carcass counting results, etc. used to identify the blood code, so as to facilitate access to various occasions where blood code recognition is required, such as inkjet code traceability, carcass transport track changes, etc.
[0077] Finally, it should be noted that the above embodiments are intended to illustrate rather than limit the technical solutions of the present invention, and a person skilled in the art may modify or make equivalent substitutions to the present invention, and any modification or partial substitution that does not depart from the spirit and scope of the present invention shall be included in the scope of protection of the claims of the present invention.
Claims
1. A method for identifying a pig body code of a pig carcass, wherein the pig body code representing its attribute information is marked on the surface of the pig carcass, characterized in that: The method comprises, A pig carcass detection step, obtaining a video stream of the pig carcass on a pig slaughtering line, and detecting the pig carcass from the video stream using a deep learning target detection algorithm; A pig carcass tracking and counting step, counting and numbering the detected pig carcasses, using a target tracking algorithm to track each pig carcass passing through the pig slaughtering line, and obtaining a picture for identifying the pig body code of the pig carcass; The pig body code recognition step uses OCR technology to recognize the pig body code on the image.
2. The method for identifying a pig carcass pig body code according to claim 1, characterized in that: The pig carcass detection step also includes detecting whether the pig carcass in the video stream is the back of the pig carcass or the abdomen of the pig carcass. If it is the back of the pig carcass or the abdomen of the pig carcass, the pig carcass tracking and counting step is performed.
3. The method for identifying a pig carcass pig body code according to any one of claims 1 to 2, characterized in that: The pig carcass detection step determines a pig carcass rectangular frame, and the pig carcass tracking and counting step obtains a picture sequence for identifying the pig body code of the pig carcass, and the pictures in the picture sequence are determined by the pig carcass rectangular frame.
4. The method for identifying a pig carcass pig body code according to claim 3, characterized in that: The pig body code recognition step also includes rotating the pictures in the picture sequence and recognizing the pig body code in the rotated pictures.
5. The method for identifying a pig carcass pig body code according to claim 4, characterized in that: The pig body code recognition step also includes searching for multiple pig body code areas on the image and recognizing the pig body code from the multiple pig body code areas.
6. The method for identifying a pig carcass pig body code according to claim 5, characterized in that: The image is rotated according to a set priority rotation angle, or according to the rotation angle of the image with the most correct recognition based on historical statistics, or according to the rotation angle of the last correct recognition, or according to the rotation angle of the most correct recognition in previous times.
7. The method for identifying a pig carcass body code according to any one of claims 1 to 2, characterized in that: The method also includes a recognition result correction step, comparing the recognized pig body code with a known pig body code corresponding to the live pig slaughtering line, finding a known pig body code that meets the threshold requirement, and using the known pig body code as the recognition result.
8. The method for identifying a pig carcass body code according to claim 7, characterized in that: The comparison adopts the Levenshtein algorithm, which is a string editing distance algorithm.
9. The method for identifying a pig carcass body code according to claim 7, characterized in that: The identification step also includes uploading the photo or video to a server if the known pig body code that meets the threshold requirement cannot be found.
10. A camera, characterized in that: The camera applies the pig carcass pig body code recognition method as described in any one of claims 1 to 9.
11. A slaughter line production management system, characterized in that: The system applies the pig carcass body code identification method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Livestock carcass skin marking device, system and marking method
CN109527052A