Image classification method and related device

By using a target detection model to detect the target parts and their locations of aquaculture objects, and automatically classifying images based on relative positional relationships, the problem of time-consuming manual classification is solved, and the efficiency of claims processing is improved.

CN119295796BActive Publication Date: 2026-11-24PEOPLE'S INSURANCE COMPANY OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411192271.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2026-11-24
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

Manual image classification is time-consuming, resulting in low claims processing efficiency, especially when classifying a large number of images.

Method used

A pre-trained target detection model is used to detect the target parts and their locations in the images of aquaculture objects, and the image classification results are determined based on the relative positional relationships of the parts.

Benefits of technology

By using automated image classification methods, classification time has been shortened and the efficiency of claims processing has been improved, especially when processing a large number of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295796B_ABST
    Figure CN119295796B_ABST
Patent Text Reader

Abstract

This application discloses an image classification method and related equipment to solve the problem that manual image classification is time-consuming and leads to low claims processing efficiency. The image classification method includes: acquiring an image of the aquaculture object for which a claim is being filed; detecting each target part of the aquaculture object in the image and the position of each target part within the target image based on a pre-trained target detection model; and determining the classification result of the target image based on the relative positional relationship between the first and second target parts. The method in this application is implemented using an image classification device, which shortens the classification time and improves the processing efficiency of claims cases compared to manual classification, especially when classifying a large number of images, significantly improving processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image classification method and related equipment. Background Technology

[0002] When an insured pig dies within the scope of insurance coverage during the insurance period, the policyholder can apply for compensation. When applying for compensation, at least two images of the deceased pig's body must be provided: an uncut ear image (or unprocessed image) and a cut-ear image (or processed image). An uncut ear image refers to a complete picture of the deceased pig's body; a cut-ear image refers to a full-body picture of the pig after its ears have been removed and placed on its abdomen.

[0003] Currently, during the claims processing, images of uncut ears and images of cut ears require manual classification—that is, distinguishing whether the current image shows a cut ear or an uncut ear. This manual image classification is time-consuming, resulting in low claims processing efficiency, a problem that becomes even more pronounced when a large number of images are received simultaneously.

[0004] Similarly, similar situations arise when processing claims for other farmed animals besides pigs, such as cattle and sheep. For example, when applying for compensation for the death of a live cattle, it is necessary to provide images of the dead cattle with their ears cut off (or other body parts cut off) and images with their ears uncut. There is also the problem of time-consuming manual image classification, which leads to low efficiency in claims processing. Summary of the Invention

[0005] This application provides an image classification method and related equipment to solve the problem that manual image classification is time-consuming and leads to low efficiency in claims processing.

[0006] The embodiments of this application adopt the following technical solutions:

[0007] An image classification method, comprising:

[0008] Obtain images of the livestock species for which claims are being filed;

[0009] Based on a pre-trained target detection model, the system detects each target part of the farmed object in the image and the position of each target part in the target image; each target part includes: a first part and a second part of the farmed object's body.

[0010] The classification result of the target image is determined based on the relative positional relationship between the first and second parts.

[0011] An image classification device, comprising:

[0012] The image acquisition unit is used to acquire images of the aquaculture object for which claims are being filed.

[0013] The target part detection unit, based on a pre-trained target detection model, detects each target part of the farmed object in the image and the position of each target part in the target image; each target part includes: a first part and a second part of the farmed object's body.

[0014] The image classification unit determines the classification result of the target image based on the relative positional relationship between the first and second parts.

[0015] A computing device includes: a memory and a processor, wherein,

[0016] The memory is used to store computer programs;

[0017] The processor, coupled to the memory, is used to execute the computer program stored in the memory for performing the methods described above.

[0018] A computer-readable storage medium storing a computer program that, when executed by a computer, enables the implementation of the above-described method.

[0019] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0020] According to the method of this application embodiment, a target detection model detects each target part of a farmed object in an image and the position of each target part in the target image; based on the relative positional relationship between the two parts, the classification result of the target image is determined. Since the relative positions of two target parts in the body of a farmed object under normal living conditions follow certain rules; during the claims stage, in order to indicate that the farmed object meets the claims conditions, one of its target parts is processed, thereby disrupting the relative positional relationship between the target objects. Therefore, based on the relative positional relationship between the two target objects, the classification result of the target image can be determined. The method of this application embodiment is implemented through an image classification device, which shortens the classification time and improves the processing efficiency of claims cases compared to manual classification, especially when classifying a large number of images, it can significantly improve processing efficiency. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 A flowchart illustrating the specific implementation of an image classification method provided in this application embodiment;

[0023] Figure 2a This is a schematic diagram of the detection results of an uncut ear image identified by the target detection model in a specific implementation of the image classification method of this application.

[0024] Figure 2b This is a schematic diagram of the detection results of an image with a severed ear identified by the target detection model in a specific implementation of the image classification method of this application.

[0025] Figure 3 This is a flowchart illustrating the specific implementation of the image classification method of this application, specifically the determination of the orientation of the aquaculture object.

[0026] Figure 4 This is a flowchart illustrating the specific implementation of the image classification method in this application.

[0027] Figure 5 This is a schematic diagram of the specific structure of an image classification device provided in an embodiment of this application;

[0028] Figure 6 This is a schematic diagram of the specific structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0031] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0032] To address the problem that manual image classification is time-consuming and leads to low claims processing efficiency, this application provides an image classification method in one embodiment.

[0033] The subject executing this method can be any computing device capable of implementing the method, such as a server, mobile phone, personal computer, smart wearable device, smart robot, etc.

[0034] Furthermore, the embodiments of this application do not limit the execution order of different steps. When using the method provided in the embodiments of this application, the execution order of different steps can be adjusted according to actual needs.

[0035] For ease of description, the following uses an image classification device as the execution subject of this method to provide a detailed description of the method provided in the embodiments of this application.

[0036] like Figure 1 The diagram shown is a flowchart illustrating a specific implementation of an image classification method provided in this application, including the following steps 11 to 13:

[0037] Step 11: Obtain an image of the aquaculture enterprise applying for compensation.

[0038] The animals raised in this application embodiment refer to those artificially raised by farmers, such as pigs, cattle, and sheep.

[0039] The images include both unprocessed and processed images.

[0040] Unprocessed images refer to images obtained by taking photos of the complete body of the farmed animal. Usually, after the farmed animal meets the conditions for applying for compensation, such as after the farmed animal dies, photos of the complete body of the farmed animal are taken to obtain unprocessed images.

[0041] A processed image refers to an image taken after a specific part of the animal's body has been processed, following an initial image of the animal's entire body. The processed image is then photographed again. For example, if the animal is a pig and the ear is the processed part, the processed image could be an image of the pig's body after the ear has been cut off (corresponding to the specific processing mentioned above) and placed on the abdomen (or other selected location) of a dead pig.

[0042] Step 12: Based on the pre-trained target detection model, detect each target part of the aquaculture object in the image and the position of each target part in the target image.

[0043] Object detection models are deep learning models in the field of computer vision. They aim to identify and locate the category and position of objects in images or videos. Commonly used object detection models include Faster R-CNN (Faster Region-based Convolutional Network), YOLO (You Only Look Once), and CenterNet, among others.

[0044] In this embodiment of the application, one of the above-mentioned target detection models can be selected to detect each target part of the aquaculture object and the position of each target part in the target image.

[0045] A well-trained object detection model is obtained through supervised training. During training, images labeled with different parts of the farmed animal's body can be used as training samples.

[0046] When training the target detection model using training samples, the image labeled with the farmed object is used as the input to the target detection model, and the various parts of the farmed object's body and their locations in the same image are used as the detection results of the target detection model.

[0047] In each iteration of the specific training process, an image of the farmed object is input into the target detection model to be trained, and the value of the loss function is determined based on the detection results of the target detection model and the above-mentioned real detection results. The parameters of the target detection model are adjusted according to the principle of minimizing the value of the loss function until the target detection model converges.

[0048] This step, before inputting the acquired image into the object detection model, also includes orientation correction of the acquired image. Specifically, this includes:

[0049] Determine the orientation of the image based on its aspect ratio. If the image is horizontal, rotate it 90 degrees clockwise (or counterclockwise).

[0050] In this embodiment, the target parts detected by the target detection model include: a first part and a second part of the animal's body. The first part and the second part are two different visible parts of the animal, such as the pig's body, head, ears, legs, etc.

[0051] The object detection model uses bounding boxes to outline each target part of the identified aquaculture object, thus locating the target part. Simultaneously, the model labels each bounding box with a confidence level for the target part corresponding to that bounding box. In object detection tasks, confidence level typically represents the object detection model's degree of certainty that the detected target actually exists. The bounding boxes, identified by the object detection model, are used to locate the positions of each target part of the aquaculture object in the target image.

[0052] Typically, for the same target, an object detection model will provide at least one corresponding candidate box, and different confidence levels will be assigned to different candidate boxes.

[0053] In this embodiment, based on a pre-trained target detection model, each target part of the aquaculture object in the image and the position of each target part in the target image are detected, including:

[0054] Based on a pre-trained target detection model, at least one candidate box is obtained for a single target part containing a farmed object in the target image; based on a preset selection rule, a bounding box is selected from the at least one candidate box as the bounding box for locating the current target part.

[0055] The selection rules include:

[0056] Rule 1: If the target detection model does not identify the aquaculture object, the candidate box with the largest area among the identified candidate boxes containing the current target part is selected as the bounding box for locating the current target part.

[0057] Rule 2: If the target detection model identifies a farmed object, then from the identified candidate boxes containing the current target part, select the candidate box with the largest overlap area with the bounding box where the farmed object is located, and the ratio of the overlap area to the area of ​​the candidate box containing the current target part is greater than the fifth threshold, and use it as the bounding box for locating the current target part.

[0058] In Rule 2 above, the fifth threshold is set to 0.9. This value is selected based on the positional relationship between the cultured object and each part in the sample. If the overlapping area is less than 0.9 times the area of ​​the target part, it is considered to be a part of another cultured object or a misjudgment.

[0059] Rules 1 and 2 above apply to untreated body parts of the farmed organisms. Each bounding box is selected as one. If more than one bounding box is selected for the same body part according to the above rules, the bounding box with the highest confidence level is selected as the bounding box for locating the target position and retained.

[0060] For target parts of aquaculture objects that have been processed, the following selection rule 3 is used to select bounding boxes: if no aquaculture object is detected, all candidate boxes that contain the target part are used as bounding boxes to locate the target part; if the target detection model detects the aquaculture object, all candidate boxes that are within the bounding box of the aquaculture object are selected from the candidate boxes that contain the target part and used as bounding boxes to locate the target part.

[0061] Taking pigs as the breeding species and ear cutting as the treatment method as an example, the detection results of images with uncut ears were determined. Figure 2a (as shown) and the detection results of the ear-cut image ( Figure 2b (As shown).

[0062] Figure 2a In the study, the target detection model identified target parts such as pig body, head, ear, and leg, with corresponding confidence scores of 0.98, 0.95, 0.67, (0.90, 0.88, 0.89, 0.92), respectively; among them, 0.90, 0.88, 0.89, and 0.92 are the confidence scores for the four legs. Figure 2b In the study, the target detection model identified target parts such as pig body, head, ear, and leg, with corresponding confidence scores of 0.97, 0.89, (0.95, 0.68), and (0.87, 0.93, 0.90, 0.91), respectively; among them, 0.87, 0.93, 0.90, and 0.91 are the confidence scores for the four legs.

[0063] This application embodiment also includes: determining the orientation of the aquaculture object in the target image based on the position of each target part in the target image. The orientation of the aquaculture object may be the orientation of the aquaculture object's head.

[0064] In one implementation method, the orientation of the aquaculture object is determined through the following steps 121 to 123:

[0065] Step 121: Obtain the center point of the bounding box containing each target part;

[0066] Step 122: If a head is present in the target area, determine the orientation of the head in the vertical direction based on the center point of the bounding box containing the head and the center point of the bounding box containing the cultured object.

[0067] Specifically: if the ordinate of the center point of the bounding box containing the head is less than the ordinate of the center point of the bounding box containing the animal being farmed, then the head is at the bottom; otherwise, the head is at the top.

[0068] Step 123: Determine the orientation of the animal being raised based on the vertical orientation of the head, the center point of the bounding box containing the head, and the center point of the bounding box containing the legs in the target area.

[0069] Specifically: when the head is on top, if the x-coordinate of the center point of the bounding box containing the head is greater than the x-coordinate of the center point of the bounding box containing the legs, then the animal is facing to the left; otherwise, the animal is facing to the right.

[0070] When the head is down, if the x-coordinate of the center point of the bounding box containing the head is less than the x-coordinate of the center point of the bounding box containing the legs, the animal is facing to the left; otherwise, the animal is facing to the right.

[0071] In addition, if no farmed animal is detected in the target object, the coordinate system is determined with the detected head as the origin. If the detected leg is located in the first or third quadrant, the farmed animal is facing to the left; otherwise, the farmed animal is facing to the right.

[0072] If no head is detected, and the legs are detected on the left side of the target image, the cultured object faces left; otherwise, the cultured object faces right.

[0073] It should be noted that when determining the orientation of the aquatic animals, the images used for the determination have all been oriented correctly, meaning that there are no horizontal images in the images.

[0074] In another implementation, such as Figure 3 As shown, based on the position of each target part in the target image, the orientation of the aquaculture object in the target image is determined, including the following steps 31 to 33:

[0075] Step 31: Determine the relative position of the first part in the target image based on the center point of the bounding box of the cultured object and the center point of the bounding box of the first part.

[0076] Step 32: Based on the center point of the bounding box containing the cultured object and the center point of the bounding box containing the second part, determine the relative position of the second part in the target image;

[0077] Step 33: Determine the orientation of the aquaculture object in the target image based on the relative positions of the first part and the second part in the target image.

[0078] Step 13: Based on the relative positional relationship between the first and second parts, determine the classification result of the target image.

[0079] Under normal living conditions, the relative positional relationship between the first and second body parts of a farmed animal follows certain growth patterns. For example, under normal feeding conditions, the distance between the ear and other body parts, such as the tail, of a 5-month-old pig is within a certain range. If the relative positional relationship between the first and second body parts in a target image does not conform to the usual growth patterns, that is, the positional relationship between them is not within this certain range, it indicates that the farmed animal in the target image has been manipulated. Therefore, target images can be classified based on the relative positional relationship between the first and second body parts.

[0080] In one specific implementation, the first part detected by the target detection model is the part of the animal being processed, such as the pig's ears or tail. Processing the animal indicates that it meets the necessary conditions for applying for compensation, and that the processed animal meets the compensation requirements.

[0081] Treatment of farmed animals, such as ear and tail removal. In this embodiment, the necessary conditions for applying for compensation are met, which is the death of the farmed animal.

[0082] When the first part is the part of the cultured object that has been treated, the relative positional relationship between the first and second parts after treatment has changed significantly compared to the relative positional relationship between the first and second parts under the normal living state of the cultured object. Therefore, it is easier to classify the target image.

[0083] To more efficiently determine the classification result of the target image, in one implementation, the target part further includes a third part of the farmed object's body. Then, based on the relative positional relationship between the first and second parts, the classification result of the target image is determined, including:

[0084] Based on the presence status of the detected third part and the relative positional relationship between the first and second parts, the classification result of the target image is determined.

[0085] like Figure 4 As shown, based on the presence state of the detected third part and the relative positional relationship between the first and second parts, the classification result of the target image is determined. The specific implementation includes the following steps 131 to 133:

[0086] Step 131: Determine the first relative position of the first part and the second part, and the second relative position of the first part and the second part.

[0087] The first relative position is the difference between the first part and the second part in one coordinate direction, and the second relative position is the difference between the first part and the second part in another coordinate direction.

[0088] Specifically, taking a farmed animal facing left with its head up as an example: the first relative position can be the difference X between the ordinate of the center point of the bounding box containing the first part and the right boundary of the bounding box containing the second part. diff The second relative position can be the difference Y between the x-coordinate of the center point of the bounding box containing the first part and the upper boundary of the bounding box containing the second part. diff .

[0089] Step 132: If no third part is detected in the target image, the classification result of the target image is determined based on the first relative position, the second relative position, the size of the bounding box of the first part in another coordinate direction, and the size of the bounding box of the second part in one of its coordinate directions.

[0090] Specifically, taking the head as the third part, the ears as the first part, and the animal being raised as the second part as the third part, for example:

[0091] The specific implementation of step 132 includes the following steps 1321 to 1323:

[0092] Step 1321: Determine a first ratio based on the dimensions of the bounding box of the first relative position and the second part in one of its coordinate directions.

[0093] Specifically: Based on X diff Determine the first ratio based on the width of the cultured object and the body width.

[0094] Step 1322: Determine a second ratio based on the second relative position and the dimensions of the bounding box of the first part in the other coordinate direction.

[0095] Specifically, based on Y diff Determine the second ratio based on the height of the ears.

[0096] Step 1323: If the first ratio is less than the first threshold, or the second ratio is less than the second threshold, then the target image is an unprocessed image; otherwise, it is a processed image.

[0097] The first threshold is set to 0.05, and the second threshold is set to 0.1.

[0098] Step 133: If a third part is detected in the target image, the classification result of the target image is determined based on the first relative position, the size of the bounding box of the first part in one of its coordinate directions, and the size of the bounding box of the second part in one of its coordinate directions.

[0099] Specifically, taking the head as the third part, the ears as the first part, and the animal being raised as the second part as the third part, for example:

[0100] The specific implementation of step 133 includes the following steps 1331 to 1333:

[0101] Step 1331: Determine a third ratio based on the first relative position and the size of the bounding box of the first part in one of its coordinate directions.

[0102] Specifically: Based on X diff Determine the third ratio based on the width of the ear and the width of the ear.

[0103] Step 1332: Determine a fourth ratio based on the dimensions of the bounding box of the first relative position and the second part in one of its coordinate directions.

[0104] Specifically: Based on X diff The fourth ratio is determined by the width of the cultured organism.

[0105] Step 1333: If the third ratio is less than the third threshold and the fourth ratio is less than the fourth threshold, then the target image is an unprocessed image; otherwise, it is a processed image.

[0106] The third threshold is set to 0.1, and the fourth threshold is set to 0.05.

[0107] The first, second, third, and fourth thresholds mentioned above are obtained based on the statistical values ​​of the relative positional relationships of each target part in the image with the determined classification results.

[0108] According to the method of this application embodiment, a target detection model detects each target part of a farmed object in an image and the position of each target part in the target image; based on the relative positional relationship between the two parts, the classification result of the target image is determined. Since the relative positions of two target parts in the body of a farmed object under normal living conditions follow certain rules; during the claims stage, in order to indicate that the farmed object meets the claims conditions, one of its target parts is processed, thereby disrupting the relative positional relationship between the target objects. Therefore, based on the relative positional relationship between the two target objects, the classification result of the target image can be determined. The method of this application embodiment is implemented through an image classification device, which shortens the classification time and improves the processing efficiency of claims cases compared to manual classification, especially when classifying a large number of images, it can significantly improve processing efficiency.

[0109] To address the problem that manual image classification is time-consuming and leads to low claims processing efficiency, this application provides an image classification device based on the same inventive concept as the above embodiments.

[0110] A schematic diagram of the specific structure of the device is shown below. Figure 5 As shown, it includes the following functional units 51 to 53:

[0111] Image acquisition unit 51 is used to acquire images of the aquaculture object for which compensation is sought.

[0112] The target part detection unit 52, based on a pre-trained target detection model, detects each target part of the farmed object in the image and the position of each target part in the target image; each target part includes: the first part and the second part of the farmed object's body.

[0113] The first part refers to the part where the aquatic organism is treated; treating the aquatic organism indicates that it meets the necessary conditions for applying for compensation, and that the treated aquatic organism meets the requirements for compensation.

[0114] When the first part is the part where the aquaculture object is processed, the first part and its position in the target image are identified based on the target detection model.

[0115] The target part detection unit 52 is specifically used for: if the target detection model does not identify the aquaculture object, then all the candidate boxes that contain the first part are identified as bounding boxes for locating the location of the first part; if the target detection model identifies the aquaculture object, then all the candidate boxes that are within the bounding box of the aquaculture object are selected from the identified candidate boxes that contain the first part, and these are used as bounding boxes for locating the location of the first part.

[0116] For the other parts besides the first part, the target part detection unit 52 is specifically used for:

[0117] Based on a pre-trained target detection model, at least one candidate box is obtained for a single target part containing a farmed object in the target image; based on a preset selection rule, a bounding box is selected from the at least one candidate box as the bounding box for locating the current target part.

[0118] The preset selection rules include:

[0119] Rule 1: If the target detection model does not identify the aquaculture object, the candidate box with the largest area among the identified candidate boxes containing the current target part is selected as the bounding box for locating the current target part.

[0120] Rule 2: If the target detection model identifies a farmed object, then from the identified candidate boxes containing the current target part, select the candidate box with the largest overlap area with the bounding box where the farmed object is located, and the ratio of the overlap area to the area of ​​the candidate box containing the current target part is greater than the fifth threshold, and use it as the bounding box for locating the current target part.

[0121] Image classification unit 53 determines the classification result of the target image based on the relative positional relationship between the first part and the second part.

[0122] In one implementation, the target region also includes a third region. In this case, the image classification unit 53 is specifically used to: determine the classification result of the target image based on the presence state of the detected third region and the relative positional relationship between the first region and the second region.

[0123] In this implementation, the image classification unit 53 further includes subunits 531 to 533.

[0124] The relative position determination subunit 531 is used to determine the first relative position of the first part and the second part, and the second relative position of the first part and the second part; the first relative position is the difference between the first part and the second part in one coordinate direction, and the second relative position is the difference between the first part and the second part in another coordinate direction.

[0125] The first classification result determination subunit 532 determines the classification result of the target image based on the first relative position, the second relative position, the size of the bounding box of the first part in another coordinate direction, and the size of the bounding box of the second part in one of its coordinate directions, if no third part is detected in the target image.

[0126] Specifically, it is used to: determine a first ratio based on the size of the bounding box of the first relative position and the second part in one coordinate direction; determine a second ratio based on the size of the bounding box of the second relative position and the first part in another coordinate direction; if the first ratio is less than a first threshold, or the second ratio is less than a second threshold, then the target image is an unprocessed image, otherwise it is a processed image.

[0127] The second classification result determination subunit 533 determines the classification result of the target image based on the first relative position, the size of the bounding box of the first part in one of its coordinate directions, and the size of the bounding box of the second part in one of its coordinate directions.

[0128] Specifically, it is used to: determine a third ratio based on the size of the bounding box of the first relative position and the first part in one of its coordinate directions; determine a fourth ratio based on the size of the bounding box of the first relative position and the second part in one of its coordinate directions; if the third ratio is less than a third threshold and the fourth ratio is less than a fourth threshold, then the target image is an unprocessed image, otherwise it is a processed image.

[0129] The image classification device according to the embodiments of this application detects each target part of a farmed object in an image and the position of each target part in the target image through a target detection model; based on the relative positional relationship between the two parts, the classification result of the target image is determined. Since the relative positions of two target parts in the body of a farmed object under normal living conditions follow certain rules; during the claims process, in order to indicate that the farmed object meets the claims conditions, one of its target parts is processed, thereby disrupting the relative positional relationship between the target objects. Therefore, based on the relative positional relationship between the two target objects, the classification result of the target image can be determined. The method of the embodiments of this application is implemented by an image classification device, which shortens the classification time and improves the processing efficiency of claims cases compared to manual classification, especially when classifying a large number of images, it can significantly improve processing efficiency.

[0130] Based on the same inventive concept as the foregoing embodiments of this application, this application also provides a computing device.

[0131] like Figure 6 As shown, the computing device includes a memory 61 and a processor 62. The memory 61 can be configured to store various other data to support operation on the electronic device. Examples of such data include instructions for any application or method used to operate on the electronic device. The memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0132] The processor 62, coupled to the memory 61, is used to execute the computer program stored in the memory 61 for performing an image classification method as described in the foregoing embodiments.

[0133] When the processor 62 executes the computer program to perform the image classification method, it detects each target part of the farmed object in the image and the position of each target part in the target image through a target detection model; based on the relative positional relationship between the two parts, the classification result of the target image is determined. Since the relative positions of two target parts in the body of a farmed object under normal living conditions follow certain rules; during the claims stage, in order to indicate that the farmed object meets the claims conditions, one of its target parts is processed, thereby disrupting the relative positional relationship between the target objects. Therefore, based on the relative positional relationship between the two target objects, the classification result of the target image can be determined. The method of this embodiment is implemented by an image classification device, which shortens the classification time and improves the processing efficiency of claims cases compared to manual classification, especially when classifying a large number of images, it can significantly improve processing efficiency.

[0134] When the processor 62 executes the computer program in the memory 61, in addition to the functions described above, it can also perform other functions, as detailed in the descriptions of the preceding embodiments.

[0135] Furthermore, such as Figure 6 As shown, the computing device also includes other components such as a display 64, a communication component 63, a power supply component 65, and an audio component 66. Figure 6 The diagram only shows some components and does not mean that the computing device includes only these components. Figure 6 The components shown.

[0136] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the methods provided in the above embodiments.

[0137] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the above embodiments.

[0138] The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a processor, implement the methods provided in the above embodiments.

[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An image classification method, characterized by, include: The system acquires images of the farmed animals for which claims are being filed. The images include unprocessed images and processed images. The unprocessed images are images showing the complete body of the farmed animal, used to determine if the farmed animal meets the necessary conditions for filing a claim. The processed images are images obtained after the farmed animal has undergone specific processing and the processed parts have been placed in selected positions on its body, used to determine if the processed farmed animal meets the requirements for claiming a claim. Based on a pre-trained target detection model, detect each target part of the aquaculture object in the image and the position of each target part in the target image; The target parts include: a first part, a second part, and a third part of the body of the cultured object; the first part is the part treated by the specific treatment, and the first part is the part that is separated from the body of the cultured object by the specific treatment and placed in a selected position on the body; the third part is the head of the cultured object; Based on the presence status of the detected third part and the relative positional relationship between the first and second parts, the classification result of the target image is determined. The step of determining the classification result of the target image based on the presence state of the detected third part and the relative positional relationship between the first and second parts includes: A first relative position and a second relative position are determined for the first and second parts; the first relative position is the difference between the first and second parts in one coordinate direction, and the second relative position is the difference between the first and second parts in another coordinate direction; if no third part is detected in the target image, a first ratio is determined based on the dimensions of the bounding boxes of the first and second parts in one coordinate direction, and a second ratio is determined based on the dimensions of the second relative position and the bounding box of the first part in another coordinate direction; if the first ratio is less than a first threshold, or the second ratio is less than a second threshold, the target image is classified as the unprocessed image; otherwise, the target image is classified as the processed image; if a third part is detected in the target image, a third ratio is determined based on the first relative position and the dimensions of the bounding box of the first part in one coordinate direction, and a fourth ratio is determined based on the dimensions of the bounding boxes of the first and second parts in one coordinate direction; if the third ratio is less than a third threshold and the fourth ratio is less than a fourth threshold, the target image is classified as the unprocessed image; otherwise, the target image is classified as the processed image.

2. The method of claim 1, wherein, Based on a pre-trained object detection model, the system detects each target part of the farmed object in the image and the position of each target part within the target image, including: If the target detection model fails to identify the aquaculture object, then each candidate box containing the first part will be used as the bounding box for locating the position of the first part. If the target detection model identifies a farmed object, then from the identified candidate boxes containing the first part, select all candidate boxes within the bounding box of the farmed object as the bounding box for locating the position of the first part. The bounding box is identified by the target detection model and is used to locate the position of each target part of the aquaculture object in the target image.

3. The method of claim 1, wherein, The method further includes: Based on the location of each target part in the target image, the orientation of the aquaculture object in the target image is determined.

4. The method of claim 3, wherein, Based on the position of each target part in the target image, the orientation of the aquaculture object in the target image is determined, including: Based on the center point of the bounding box containing the cultured object and the center point of the bounding box containing the first part, the relative position of the first part in the target image is determined. Based on the center point of the bounding box containing the cultured object and the center point of the bounding box containing the second part, determine the relative position of the second part in the target image; Based on the relative positions of the first part and the second part in the target image, the orientation of the aquaculture object in the target image is determined.

5. The method of claim 1, wherein, Based on a pre-trained object detection model, the system detects each target part of the farmed object in the image and the position of each target part within the target image, including: Based on a pre-trained object detection model, at least one candidate box is obtained from the target image containing a single target part of the aquaculture object; Based on preset selection rules, a bounding box is selected from the at least one candidate box to locate the current target part; wherein, the current target part is the other target parts besides the first part among the target parts.

6. The method of claim 5, wherein, The preset selection rules include: If the target detection model does not identify the aquaculture object, the candidate box with the largest area among the identified candidate boxes containing the current target part is selected as the bounding box for locating the current target part. If the target detection model identifies a farmed object, it selects the candidate box with the largest overlap area with the bounding box containing the current target part from the candidate boxes identified. The ratio of the overlap area to the area of ​​the candidate box containing the current target part is greater than the fifth threshold, and this candidate box is used to locate the bounding box of the current target part.

7. An image classification apparatus characterized by comprising: include: An image acquisition unit is used to acquire images of the aquaculture object for which a claim is being filed. The images include unprocessed images and processed images. The unprocessed images are images that include the complete body of the aquaculture object, used to determine that the aquaculture object meets the necessary conditions for filing a claim. The processed images are images obtained after the aquaculture object has undergone specific processing and the processed parts have been placed in selected positions on the body, used to determine that the processed aquaculture object meets the claim requirements. The target part detection unit, based on a pre-trained target detection model, detects each target part of the aquaculture object in the image and the position of each target part in the target image. The target parts include: a first part, a second part, and a third part of the body of the cultured object; the first part is the part treated by the specific treatment, and the first part is the part that is separated from the body of the cultured object by the specific treatment and placed in a selected position on the body; the third part is the head of the cultured object; An image classification unit is used to determine the classification result of a target image based on the presence state of a detected third part and the relative positional relationship between the first and second parts. The image classification unit is further used for: A first relative position and a second relative position are determined for the first and second parts; the first relative position is the difference between the first and second parts in one coordinate direction, and the second relative position is the difference between the first and second parts in another coordinate direction; if no third part is detected in the target image, a first ratio is determined based on the dimensions of the bounding boxes of the first and second parts in one coordinate direction, and a second ratio is determined based on the dimensions of the second relative position and the bounding box of the first part in another coordinate direction; if the first ratio is less than a first threshold, or the second ratio is less than a second threshold, the target image is classified as the unprocessed image; otherwise, the target image is classified as the processed image; if a third part is detected in the target image, a third ratio is determined based on the first relative position and the dimensions of the bounding box of the first part in one coordinate direction, and a fourth ratio is determined based on the dimensions of the bounding boxes of the first and second parts in one coordinate direction; if the third ratio is less than a third threshold and the fourth ratio is less than a fourth threshold, the target image is classified as the unprocessed image; otherwise, the target image is classified as the processed image.

8. A computing device, characterized in that, include: Memory and processor, among which, The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program stored in the memory for performing the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a computer, it can implement the method described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Claim settlement service processing method and device

    CN110009296A