Method and device for evaluating physical condition of subject, storage medium, and electronic device
By acquiring and segmenting the feature information in the target image, determining the global and local feature information of the target object, combining these features to evaluate the body condition of the target object, the problem of inaccurate body condition evaluation in the prior art is solved, and efficient and accurate body condition evaluation is achieved.
Patent Information
- Application Number
- CN202110852016.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-07-27
AI Technical Summary
The evaluation of the body condition of the subject in the prior art is inaccurate, especially in the body condition score of dairy cows. The artificial method is highly subjective and inefficient. It is difficult for traditional digital image processing technology to extract and segment key parts of the body, and it is affected by the complex and changeable light.
By obtaining feature information of N parts of the target object in the target image, segmenting the images based on these feature information, obtaining N image areas, determining the global feature information and local feature information of the target object, and combining these feature information to evaluate the body condition of the target object.
Accurate assessment of the body condition of the object is achieved, the problem of inaccurate assessment in traditional methods is solved, and the evaluation efficiency and accuracy are improved.
Smart Images

Figure CN113516648B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of images, and in particular, to a method and device for evaluating the physical condition of an object, a storage medium, and an electronic device. Background Art
[0002] The body condition score (BCS) of a dairy cow refers to the amount of fat or energy reserve level of a dairy cow. The purpose of body condition scoring is to keep the dairy cow in an ideal state of being neither too thin nor too fat. At present, body condition scores are generally measured manually by touch and visual inspection, which are highly subjective and inefficient. It is difficult to extract and segment key parts of the body using traditional digital image processing technology, and due to the complex and changeable lighting, it is difficult to model the classifier to a certain extent.
[0003] With respect to the above technical problems, no effective solutions have been proposed in the relevant technologies. Summary of the invention
[0004] Embodiments of the present invention provide a method and device for evaluating the physical condition of an object, a storage medium, and an electronic device, so as to at least solve the problem of inaccurate evaluation of the physical condition of an object in the related art.
[0005] According to one embodiment of the present invention, a method for evaluating the physical condition of an object is provided, comprising: obtaining feature information of N parts of a target object in a determined target image, wherein N is a natural number greater than or equal to 1; segmenting the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object; determining global feature information of the target object based on the N image regions, and determining local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region; evaluating the physical condition of the target object based on the global feature information and the local feature information.
[0006] According to another embodiment of the present invention, a device for determining a physical condition score of an object is provided, comprising: a first acquisition module, used to acquire feature information of N parts of a target object in a determined target image, wherein N is a natural number greater than or equal to 1; a first segmentation module, used to segment the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object; a first determination module, based on the N image regions, determines global feature information of the target object and determines local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region; a first evaluation module, used to evaluate the physical condition of the target object based on the global feature information and the local feature information.
[0007] In an exemplary embodiment, the first acquisition module includes: a first acquisition unit, used to acquire M frames of images through a camera device, wherein the M frames of images all include the target object, and M is a natural number greater than or equal to 1; a first determination unit, used to determine the distribution range of N parts of the target object in the M frames of images, and the occlusion of the N parts of the target object in the M frames of images; a second determination unit, used to determine an image in the M frames of images whose distribution range is greater than a preset range and in which the N parts are not occluded as the target image; and a first extraction unit, used to extract feature information of the N parts of the target object from the target image.
[0008] In an exemplary embodiment, the first segmentation module includes: a first segmentation unit, configured to segment the target image according to the distribution positions of the feature information of the N parts in the target image to obtain the N image regions.
[0009] In an exemplary embodiment, the above-mentioned first determination module includes: a first processing unit, used to process the grayscale of the above-mentioned N image areas to obtain N first grayscale image areas; a second processing unit, used to perform a low-pass filtering operation on the above-mentioned N first grayscale image areas to obtain N first target image areas; a first input unit, used to input the above-mentioned N first target image areas into the target neural network model to obtain the global feature information of the above-mentioned target object output by the above-mentioned target neural network model.
[0010] In an exemplary embodiment, the above-mentioned first determination module includes: a third processing unit, used to process the grayscale of the above-mentioned N image areas to obtain N second grayscale image areas; a fourth processing unit, used to perform a high-pass filtering operation on the above-mentioned N second grayscale image areas to obtain N second target image areas, wherein the above-mentioned N second target image areas all include color gradient change information; a second input unit, used to input the above-mentioned N second target image areas into the target neural network model to obtain the local feature information of the above-mentioned target object corresponding to each image area in the above-mentioned N image areas output by the above-mentioned target neural network model.
[0011] In an exemplary embodiment, the above-mentioned first evaluation module includes: a first comparison unit, used to compare the above-mentioned global feature information with the preset feature information in the preset feature set to obtain the physical condition score range of the above-mentioned target object, wherein the above-mentioned preset feature set includes the above-mentioned preset feature information and the physical condition score corresponding to the above-mentioned preset feature information; a second comparison unit, used to compare the above-mentioned local feature with the feature information within the above-mentioned physical condition score range to obtain the physical condition score of the above-mentioned target object; the first evaluation unit, used to evaluate the physical condition of the above-mentioned target object based on the physical condition score of the above-mentioned target object.
[0012] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0013] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0014] Through the present invention, by obtaining the characteristic information of N parts of the target object in the determined target image, wherein N is a natural number greater than or equal to 1; segmenting the target image based on the characteristic information of the N parts to obtain N image regions, wherein each of the N image regions contains the characteristic information of a part of the target object; determining the global characteristic information of the target object based on the N image regions, and determining the local characteristic information corresponding to each of the N image regions, wherein the global characteristic information is used to represent the overall characteristics of the N parts of the target object in the target image, and the local characteristic information is used to represent the characteristics of a part of the target object contained in the corresponding image region; and evaluating the physical condition of the target object based on the global characteristic information and the local characteristic information. The purpose of dividing the target object into regions in combination with the characteristic information of the target object and performing multi-dimensional feature matching is achieved. Therefore, the problem of inaccurate physical condition evaluation of the object in the related art can be solved, and the effect of accurately evaluating the physical condition of the object can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for evaluating the physical condition of an object according to an embodiment of the present invention;
[0016] Figure 2 is a flow chart of a method for evaluating a subject's physical condition according to an embodiment of the present invention;
[0017] Figure 3 is a schematic diagram of sub-regions according to an embodiment of the present invention;
[0018] Figure 4 is a schematic diagram of acquiring a target image according to an embodiment of the present invention;
[0019] Figure 5 is a schematic diagram of image segmentation according to an embodiment of the present invention;
[0020] Figure 6 is a schematic diagram of image segmentation according to an embodiment of the present invention;
[0021] Figure 7 is a flow chart of analyzing a cow back image according to an embodiment of the present invention;
[0022] Figure 8 is a schematic diagram of the coccygeal ligament according to an embodiment of the present invention;
[0023] Fig. 9 is a schematic diagram of grayscale low-pass filtering of the caudal base ligament of a cow back image according to an embodiment of the present invention;
[0024] Fig.10 is a schematic diagram of grayscale high-pass filtering of the caudal base ligament of a cow back image according to an embodiment of the present invention;
[0025] Fig.11 4 is a structural block diagram of a method and device for evaluating the physical condition of an object according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for evaluating the physical condition of an object according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for evaluating the physical condition of an object in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a method for evaluating the physical condition of a subject is provided. Figure 2 is a flow chart of a method for evaluating the physical condition of an object according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0032] Step S202, acquiring feature information of N parts of the target object in the determined target image, where N is a natural number greater than or equal to 1;
[0033] Step S204, segmenting the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object;
[0034] Step S206, based on the N image regions, determining global feature information of the target object, and determining local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region;
[0035] Step S208: evaluating the physical condition of the target object based on the global feature information and the local feature information.
[0036] The execution subject of the above steps may be a terminal, etc., but is not limited thereto.
[0037] This embodiment includes but is not limited to scenarios of evaluating the physical condition of an object, for example, evaluating the physical condition of a dairy cow.
[0038] In this embodiment, the feature information of the N parts of the target object may include, for example, 8 component areas of the back of a cow, such as Figure 3 As shown, 1-left hip, 2-right hip, 3-coccygeal ligament, 4-left hip, 5-right hip, 6-sacral ligament, 7-left lumbar angle, 8-right lumbar angle. Because the joints of the cow's back are closely related, the overlap between blocks is used to ensure the integrity of the key parts.
[0039] Through the above steps, by obtaining the feature information of N parts of the target object in the determined target image, where N is a natural number greater than or equal to 1; segmenting the target image based on the feature information of the N parts to obtain N image areas, where each of the N image areas contains the feature information of a part of the target object; based on the N image areas, determining the global feature information of the target object, and determining the local feature information corresponding to each of the N image areas, where the global feature information is used to represent the overall features of the N parts of the target object in the target image, and the local feature information is used to represent the features of a part of the target object contained in the corresponding image area; based on the global feature information and the local feature information, the physical condition of the target object is evaluated. The purpose of dividing the target object into regions in combination with the feature information of the target object and performing multi-dimensional feature matching is achieved. Therefore, the problem of inaccurate physical condition evaluation of the object in the related art can be solved, and the effect of accurately evaluating the physical condition of the object can be achieved.
[0040] In an exemplary embodiment, obtaining feature information of N parts of a target object in a determined target image includes:
[0041] S1, acquiring M frames of images through a camera device, wherein the M frames of images all include a target object, and M is a natural number greater than or equal to 1;
[0042] S2, determining the distribution range of the N parts of the target object in the M frame images, and the occlusion conditions of the N parts of the target object in the M frame images;
[0043] S3, determining the image whose distribution range is larger than the preset range and whose N parts are not blocked in the M frames of images as the target image;
[0044] S4, extracting feature information of N parts of the target object from the target image.
[0045] In this embodiment, for example, when the target object is a cow, a camera device (such as an IP camera IPC) can be installed on a milking channel. Figure 4 As shown, the milking channel is a long and narrow channel, and the cows can only enter in a queue. Individual cows are separated from the group, and the back view image of the individual cow can be clearly obtained.
[0046] In this embodiment, a cow body with a wide distribution range of back key points (for example, the back faces the camera) and unobstructed key points (the tail does not obstruct the back key points) can be selected as the target to be analyzed, and an image with the best posture is selected for each target object ID to obtain the target image. This can effectively improve the quality of the target to be analyzed and obtain more accurate detection results.
[0047] In an exemplary embodiment, the target image is segmented based on feature information of N parts to obtain N image regions, including:
[0048] S1, segmenting the target image according to the distribution positions of the feature information of N parts in the target image to obtain N image regions.
[0049] In this embodiment, for example, the segmentation of the cow back, such as Figure 5 shown.
[0050] In this embodiment, if Figure 6 As shown, the cow's back is divided into 8 component areas, 1-left hip, 2-right hip, 3-coccygeal ligament, 4-left hip, 5-right hip, 6-sacral ligament, 7-left lumbar angle, 8-right lumbar angle. Because the joints of the cow's back are closely related, the blocks are overlapped to ensure the integrity of the key parts.
[0051] In an exemplary embodiment, determining global feature information of a target object based on N image regions includes:
[0052] S1, processing the grayscale of N image regions to obtain N first grayscale image regions;
[0053] S2, performing a low-pass filtering operation on the N first grayscale image regions to obtain N first target image regions;
[0054] S3, inputting the N first target image regions into the target neural network model to obtain global feature information of the target object output by the target neural network model.
[0055] In this embodiment, low-pass filtering can remove detail feature information and leave global features, and then the processed image is subjected to feature extraction through a neural network model, and a feature layer is output as global feature information.
[0056] In an exemplary embodiment, based on N image regions, determining local feature information corresponding to each of the N image regions includes:
[0057] S1, processing the grayscale of N image regions to obtain N second grayscale image regions;
[0058] S2, performing a high-pass filtering operation on the N second grayscale image regions to obtain N second target image regions, wherein the N second target image regions all include color gradient change information;
[0059] S3, inputting the N second target image regions into the target neural network model to obtain local feature information of the target object corresponding to each of the N image regions output by the target neural network model.
[0060] In this embodiment, high-pass filtering is performed on the second grayscale image to retain the contour and the detailed information of the color gradient change in the image. Then, the N second target images are subjected to feature extraction through the target neural network model to obtain contour feature information, that is, local feature information.
[0061] In an exemplary embodiment, evaluating the physical condition of the target object based on the global feature information and the local feature information includes:
[0062] S1, comparing the global feature information with preset feature information in a preset feature set to obtain a body condition score range of the target object, wherein the preset feature set includes preset feature information and a body condition score corresponding to the preset feature information;
[0063] S2, comparing the local features with the feature information within the body condition score range to obtain the body condition score of the target object;
[0064] S3, evaluating the body condition of the target object based on the body condition score of the target object.
[0065] In this embodiment, the global features are compared one by one with the preset feature information in the preset feature set. The image closest to the target object can be found, and the BCS score can be obtained. The feature comparison is measured by the relative degree of the test feature and the standard feature. The basic range of BCS is first determined by the global feature, and then the final accurate BCS score is obtained by combining the local features.
[0066] The present invention will be described below in conjunction with specific embodiments:
[0067] This embodiment takes the BCS of dairy cows as an example for explanation. Figure 7 As shown, this embodiment includes the following steps:
[0068] S701: In order to obtain a clear back view of an individual cow, a camera is installed on the milking channel, such as Figure 4 The milking alley is a long, narrow passage where cows can only enter in a queue, separating individual cows from the group.
[0069] S702: The corresponding cow ID is often solved by radio frequency identification RFID, electronic ear tags, etc. The network camera IPC camera at the entrance can obtain interference-free images to track the cow (S703) and perform feature analysis (S704), including: back target detection, back key point detection (buttocks, coccygeal ligament, hip, sacral ligament, waist angle), and cow back segmentation.
[0070] S705: Based on the analyzed cow feature information, the cow back targets are screened, and the cow back key points with a wide distribution range in the image (the back faces the camera) and unobstructed key points (the cow tail does not obstruct the back key points) are selected as the targets to be analyzed, and an image with the best posture is selected for each ID. Through this step of screening, the quality of the target to be analyzed can be effectively improved, and more accurate detection results can be obtained.
[0071] S706: Extract regional features from the filtered back image targets.
[0072] According to the cow back key point results and segmentation results, such as Figure 6 As shown, the cow's back is divided into 8 parts, 1-left hip, 2-right hip, 3-coccygeal ligament, 4-left hip, 5-right hip, 6-sacral ligament, 7-left waist angle, 8-right waist angle. Because the joints of the cow's back are closely related, the overlap between blocks is used to ensure the integrity of the key parts.
[0073] The cow back feature contains two feature dimensions: global feature dimension and contour feature dimension:
[0074] 1) Global feature dimension: such as Figure 8 , Fig. 9 As shown, this embodiment performs grayscale operation on the regional image and performs low-pass filtering to remove detail feature information and leave global features, and then extracts features from the processed image through a neural network, and outputs a feature layer as global feature information.
[0075] 2) Contour and detail feature dimension: grayscale operation is performed on the regional image, and high-pass filtering is performed to retain the contour and detail information of the color gradient changes within the image (such as Fig.10 As shown), feature extraction is performed through a neural network to obtain contour feature information.
[0076] S707: In this embodiment, the global features and contour features extracted from each component region by the neural network are respectively combined into overall global features and contour and detail features.
[0077] S708: For a BCS score of 5 points and a score interval of 0.25, a standard back target image of each score value is taken respectively, and a standard comparison feature set is obtained by the above feature extraction method (S709-S711).
[0078] S712: Compare the test results with the features in the standard feature set one by one, find the image that is closest to the features of the cow to be evaluated, and get the BCS score (S713). The feature comparison is measured by the relative degree of the test features and the standard features. The basic range of BCS is first determined by the global features, and then the final accurate BCS score is obtained by combining the contour and detail features.
[0079] In summary, this embodiment can obtain high-quality images to be analyzed and ensure the quality of BCS scoring by performing feature analysis on the tracked cow back target; combining the back key point information and dividing the back feature sub-regions can ensure the consistency of the feature comparison area and eliminate the influence of the black and white pattern on the back on the scoring result; simulating human visual characteristics and performing multi-dimensional feature matching judgment can solve the scoring accuracy problem caused by the high similarity of the cow's back.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0081] In this embodiment, a device for determining the physical condition score of an object is also provided, and the device is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0082] Fig.11 is a structural block diagram of a device for determining a physical condition score of an object according to an embodiment of the present invention. Fig.11 As shown, the device comprises:
[0083] A first acquisition module 1102 is used to acquire feature information of N parts of a target object in a determined target image, where N is a natural number greater than or equal to 1;
[0084] A first segmentation module 1104 is configured to segment the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object;
[0085] A first determining module 1106 determines, based on the N image regions, global feature information of the target object and local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region;
[0086] The first evaluation module 1108 is used to evaluate the physical condition of the target object based on the global feature information and the local feature information.
[0087] In an exemplary embodiment, the first acquisition module includes:
[0088] A first acquisition unit is used to acquire M frames of images through a camera device, wherein the M frames of images all include the target object, and M is a natural number greater than or equal to 1;
[0089] A first determining unit is used to determine the distribution range of the N parts of the target object in the M frames of images, and the occlusion conditions of the N parts of the target object in the M frames of images;
[0090] A second determining unit is used to determine the image whose distribution range among the M frames of images is larger than a preset range and whose N parts are not blocked as the target image;
[0091] The first extraction unit is used to extract feature information of N parts of the target object from the target image.
[0092] In an exemplary embodiment, the first segmentation module comprises:
[0093] The first segmentation unit is used to segment the target image according to the distribution positions of the feature information of the N parts in the target image to obtain the N image regions.
[0094] In an exemplary embodiment, the first determining module includes:
[0095] A first processing unit is used to process the grayscale of the N image regions to obtain N first grayscale image regions;
[0096] A second processing unit is used to perform a low-pass filtering operation on the N first grayscale image regions to obtain N first target image regions;
[0097] The first input unit is used to input the above-mentioned N first target image areas into the target neural network model to obtain the global feature information of the above-mentioned target object output by the above-mentioned target neural network model.
[0098] In an exemplary embodiment, the first determining module includes:
[0099] A third processing unit is used to process the grayscale of the N image regions to obtain N second grayscale image regions;
[0100] a fourth processing unit, configured to perform a high-pass filtering operation on the N second grayscale image regions to obtain N second target image regions, wherein the N second target image regions all include color gradient change information;
[0101] The second input unit is used to input the above-mentioned N second target image areas into the target neural network model to obtain the local feature information of the above-mentioned target object corresponding to each image area in the above-mentioned N image areas output by the above-mentioned target neural network model.
[0102] In an exemplary embodiment, the first evaluation module comprises:
[0103] A first comparison unit is used to compare the global feature information with preset feature information in a preset feature set to obtain a body condition score range of the target object, wherein the preset feature set includes the preset feature information and the body condition score corresponding to the preset feature information;
[0104] A second comparison unit is used to compare the local feature with the feature information within the body condition score range to obtain the body condition score of the target object;
[0105] The first evaluation unit is used to evaluate the physical condition of the target object based on the physical condition score of the target object.
[0106] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0107] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0108] In this embodiment, the computer-readable storage medium may be configured to store a computer program for executing the above steps.
[0109] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0110] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0111] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0112] In an exemplary embodiment, the processor may be configured to execute the above steps through a computer program.
[0113] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0114] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for evaluating a subject's physical condition, characterized in that: include: Acquire feature information of N parts of a target object in a determined target image, wherein N is a natural number greater than or equal to 1; Segmenting the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object; Based on the N image regions, determining global feature information of the target object, and determining local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region; evaluating the physical condition of the target object based on the global feature information and the local feature information; Among them, evaluating the physical condition of the target object based on the global feature information and the local feature information includes: comparing the global feature information with the preset feature information in a preset feature set to obtain the physical condition score range of the target object, wherein the preset feature set includes the preset feature information and the physical condition score corresponding to the preset feature information; comparing the local feature with the feature information within the physical condition score range to obtain the physical condition score of the target object; and evaluating the physical condition of the target object based on the physical condition score of the target object.
2. The method according to claim 1, characterized in that Acquire feature information of N parts of a target object in a determined target image, including: Acquire M frames of images through a camera device, wherein the M frames of images all include the target object, and M is a natural number greater than or equal to 1; Determine the distribution range of the N parts of the target object in the M frames of images, and the occlusion conditions of the N parts of the target object in the M frames of images; Determine the image whose distribution range is larger than the preset range and whose N parts are not blocked as the target image in the M frames of images; Feature information of N parts of the target object is extracted from the target image.
3. The method according to claim 1, characterized in that Segmenting the target image based on the feature information of the N parts to obtain N image regions, including: According to the distribution positions of the feature information of the N parts in the target image, the target image is segmented to obtain the N image regions.
4. The method according to claim 1, characterized in that: Determining global feature information of the target object based on the N image regions includes: Processing the grayscales of the N image regions to obtain N first grayscale image regions; Performing a low-pass filtering operation on the N first grayscale image regions to obtain N first target image regions; The N first target image regions are input into a target neural network model to obtain global feature information of the target object output by the target neural network model.
5. The method according to claim 1, characterized in that Determining local feature information corresponding to each of the N image regions based on the N image regions includes: Processing the grayscales of the N image regions to obtain N second grayscale image regions; Performing a high-pass filtering operation on the N second grayscale image regions to obtain N second target image regions, wherein the N second target image regions all include color gradient change information; The N second target image regions are input into the target neural network model to obtain local feature information of the target object corresponding to each of the N image regions output by the target neural network model.
6. A device for evaluating a subject's physical condition, characterized in that: include: A first acquisition module, used to acquire feature information of N parts of a target object in a determined target image, wherein N is a natural number greater than or equal to 1; A first segmentation module is used to segment the target image based on the feature information of the N parts to obtain N image regions, wherein each of the N image regions contains feature information of a part of the target object; A first determination module is configured to determine global feature information of the target object based on the N image regions, and to determine local feature information corresponding to each of the N image regions, wherein the global feature information is used to represent overall features of the N parts of the target object in the target image, and the local feature information is used to represent features of a part of the target object contained in the corresponding image region; A first evaluation module, used for evaluating the physical condition of the target object based on the global feature information and the local feature information; Among them, the first evaluation module is also used to compare the global feature information with the preset feature information in the preset feature set to obtain the physical condition score range of the target object, wherein the preset feature set includes the preset feature information and the physical condition score corresponding to the preset feature information; compare the local feature with the feature information within the physical condition score range to obtain the physical condition score of the target object; and evaluate the physical condition of the target object based on the physical condition score of the target object.
7. The device according to claim 6, characterized in that The first acquisition module includes: A first acquisition unit, configured to acquire M frames of images through a camera device, wherein the M frames of images all include the target object, and M is a natural number greater than or equal to 1; A first determining unit is used to determine the distribution range of the N parts of the target object in the M frames of images, and the occlusion conditions of the N parts of the target object in the M frames of images; A second determining unit is used to determine the image whose distribution range is larger than a preset range and whose N parts are not blocked in the M frames of images as the target image; The first extraction unit is used to extract feature information of N parts of the target object from the target image.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the method described in any one of claims 1 to 5 when executed by a processor.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent scoring system for dairy cow body condition based on deep learning and long-distance video
CN109508907A