Movatterモバイル変換


[0]ホーム

URL:


CN112784713A - Pig weight estimation method, system, equipment and storage medium based on image - Google Patents

Pig weight estimation method, system, equipment and storage medium based on image
Download PDF

Info

Publication number
CN112784713A
CN112784713ACN202110025419.2ACN202110025419ACN112784713ACN 112784713 ACN112784713 ACN 112784713ACN 202110025419 ACN202110025419 ACN 202110025419ACN 112784713 ACN112784713 ACN 112784713A
Authority
CN
China
Prior art keywords
pig
contour
weight
complete
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110025419.2A
Other languages
Chinese (zh)
Inventor
柯海滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xiwei Intelligent Technology Co ltd
Original Assignee
Shenzhen Xiwei Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xiwei Intelligent Technology Co ltdfiledCriticalShenzhen Xiwei Intelligent Technology Co ltd
Priority to CN202110025419.2ApriorityCriticalpatent/CN112784713A/en
Publication of CN112784713ApublicationCriticalpatent/CN112784713A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention relates to a pig weight estimation method, a pig weight estimation system, pig weight estimation equipment and a storage medium based on images, wherein the method comprises the following steps: acquiring an image of a pig in a target area; adopting an image processing algorithm to segment the outline of the pig in the image; judging whether the contour is complete; and if the profile is incomplete, matching a most similar complete profile according to the incomplete profile, and taking the weight of the pig corresponding to the complete profile as the weight of the pig corresponding to the incomplete profile. The method can estimate the weight of the incomplete pig in the image, overcomes the technical problem that the weight estimation cannot be carried out due to incomplete targets, greatly improves the automation degree of the weight measurement of the pig in the pig farm, and reduces the needed manpower and material resources.

Description

Pig weight estimation method, system, equipment and storage medium based on image
Technical Field
The invention relates to the field of machine vision, in particular to a pig weight estimation method, a pig weight estimation system, pig weight estimation equipment and a storage medium based on images.
Background
In the prior art, the weight of the pig is estimated mainly by a manual measurement mode such as an electronic scale, and the mode needs to consume large manpower and material resources, so that the automation management degree of the pig farm is low.
Disclosure of Invention
In view of the above technical problems, the present invention provides a method, system, device and storage medium for pig weight estimation based on images.
The technical scheme for solving the technical problems is as follows:
in a first aspect, the invention provides an image-based pig weight estimation method, which comprises the following steps:
acquiring an image of a pig in a target area;
adopting an image processing algorithm to segment the outline of the pig in the image;
judging whether the contour is complete;
and if the profile is incomplete, matching a most similar complete profile according to the incomplete profile, and taking the weight of the pig corresponding to the complete profile as the weight of the pig corresponding to the incomplete profile.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the determining whether the contour is complete specifically includes:
and inputting the contour into a pre-constructed CNN classification model, and judging whether the contour is complete or not.
Further, still include:
and if the contour is complete, estimating the weight of the corresponding pig according to the complete contour.
Further, the estimating the weight of the corresponding pig according to the complete profile specifically includes:
and inputting the pixel area of the outline into a conversion formula, and calculating to obtain the corresponding weight of the pig.
Further, before inputting the pixel area of the contour into a conversion formula and calculating the weight of the corresponding pig, the method further comprises the following steps:
identifying a breed of pig in the image;
and determining a corresponding conversion formula according to the identified pig breeds.
Further, the matching a most similar complete contour according to the incomplete contour specifically includes:
and inputting the incomplete contour into a pre-trained deep learning model to obtain a most similar complete contour.
Further, the training method of the deep learning model comprises the following steps:
constructing a batch of complete pig images and incomplete pig images, covering pigs of different body types and sizes, marking a matching pair as a label to train a deep learning model, inputting the deep learning model into the pig images and the segmentation contour images of the pigs, and outputting whether the pig images are matched or not.
In a second aspect, the present invention provides an image-based pig weight estimation system, comprising:
the image acquisition module is used for acquiring an image of the pig in the target area;
the image segmentation module is used for segmenting the outline of the pig in the image by adopting an image processing algorithm;
the contour judging module is used for judging whether the contour is complete or not;
the contour matching module is used for matching a most similar complete contour according to the incomplete contour if the contour judging module judges that the contour is incomplete;
and the weight estimation module is used for taking the weight of the pig corresponding to the complete contour as the weight of the pig corresponding to the incomplete contour.
Further, the weight estimation module is further configured to estimate the weight of the corresponding pig according to the complete contour if the contour judgment module judges that the contour is complete.
Further, the weight estimation module estimates the weight of the corresponding pig according to the complete contour, and specifically comprises:
and inputting the pixel area of the outline into a conversion formula, and calculating to obtain the corresponding weight of the pig.
Further, still include:
the breed identification module is used for identifying the breeds of the pigs in the image before the weight estimation module inputs the pixel area of the outline into a conversion formula and calculates the weight of the corresponding pigs;
and the formula determination module is used for determining a corresponding conversion formula according to the identified pig breed.
In a third aspect, the present invention provides a terminal device, including:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method described above.
In a fourth aspect, the present invention provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the above-described method.
The invention has the beneficial effects that: the weight of the incomplete pig in the image can be estimated, the technical problem that the weight cannot be estimated due to the incomplete target is solved, the automation degree of the weight measurement of the pig in a pig farm is greatly improved, and the required manpower and material resources are reduced.
Drawings
Fig. 1 is a flowchart of a pig weight estimation method based on an image according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a hardware arrangement of a camera for shooting pigs in a pigsty according to an embodiment of the present invention;
FIG. 3 is a schematic view of a photographed pig;
FIG. 4 is a schematic representation of the contour of a segmented complete pig;
FIG. 5 is a schematic representation of the outline of a segmented incomplete pig;
FIG. 6 is a diagram illustrating the matching result;
fig. 7 is a block diagram of a pig weight estimation system based on an image according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a flowchart of a pig weight estimation method based on an image according to an embodiment of the present invention, as shown in fig. 1, the method includes:
110. acquiring an image of a pig in a target area;
specifically, as shown in fig. 2, a camera may be arranged at the top of the pigsty to shoot the pigs in the target area of the lower pigsty, and the camera sends the images back to the computer for subsequent processing, and the shot images of the pigs are shown in fig. 3.
120. Adopting an image processing algorithm to segment the outline of the pig in the image;
in this step, the image processing algorithm used for segmenting the contour of the pig belongs to the prior art, which is not described in detail in this embodiment, and the segmented contour is shown in fig. 4 and 5.
130. Judging whether the contour is complete;
specifically, a CNN classification model can be constructed by collecting sample data of a complete pig, so that whether the contour image is complete can be judged by inputting the contour image into the CNN classification model.
140. And if the profile is incomplete, matching a most similar complete profile according to the incomplete profile, and taking the weight of the pig corresponding to the complete profile as the weight of the pig corresponding to the incomplete profile.
Specifically, in the step, a batch of complete pig images and incomplete pig images can be constructed to cover pigs of different body types and sizes, then a matching pair is labeled to be used as a label to train a deep learning model, the deep learning model inputs the pig images and the segmentation contour images of the pigs, and the output is whether the pig images and the segmentation contour images are matched.
Thus, the incomplete contour is input into the deep learning model obtained by training, and a most similar complete contour can be obtained. The matching result is shown in fig. 6.
The weight of the pig corresponding to the complete contour can be obtained by inputting the pixel area of the contour into a conversion formula calibrated in advance.
Optionally, in this embodiment, the method further includes:
150. and if the contour is complete, estimating the weight of the corresponding pig according to the complete contour.
Optionally, in this embodiment, the estimating the weight of the corresponding pig according to the complete contour specifically includes:
and inputting the pixel area of the outline into a conversion formula, and calculating to obtain the corresponding weight of the pig.
The conversion formula can be determined in a calibration mode, specifically, when a camera is fixed at a certain height to shoot a certain fixed area, the pixel area of a target in the area is linearly related to the physical weight of the target, and the conversion formula can be obtained by data acquisition and a least square method.
In addition, since the precision of the above conversion formula may be affected by the breeds of different pigs, the method includes, as an embodiment of the present invention:
210. acquiring an image of a pig in a target area;
220. adopting an image processing algorithm to segment the outline of the pig in the image;
230. judging whether the contour is complete;
240. if the profile is incomplete, matching a most similar complete profile according to the incomplete profile, and taking the weight of the pig corresponding to the complete profile as the weight of the pig corresponding to the incomplete profile;
250. if the contour is complete, identifying the pig breed in the image;
260. and determining a corresponding conversion formula according to the identified pig breeds.
270. And inputting the pixel area of the outline into a conversion formula, and calculating to obtain the corresponding weight of the pig.
In the embodiment, the pig breeds are considered in the process of determining the conversion formula, so that the weight can be accurately estimated under the condition that various pigs are mixed.
Fig. 7 is a block diagram of a pig weight estimation system based on an image according to an embodiment of the present invention, and as shown in fig. 7, the system includes:
the image acquisition module is used for acquiring an image of the pig in the target area;
the image segmentation module is used for segmenting the outline of the pig in the image by adopting an image processing algorithm;
the contour judging module is used for judging whether the contour is complete or not;
the contour matching module is used for matching a most similar complete contour according to the incomplete contour if the contour judging module judges that the contour is incomplete;
and the weight estimation module is used for taking the weight of the pig corresponding to the complete contour as the weight of the pig corresponding to the incomplete contour.
Optionally, in this embodiment, the weight estimation module is further configured to estimate the weight of the corresponding pig according to the complete contour if the contour judgment module judges that the contour is complete.
Optionally, in this embodiment, the weight estimation module estimates the weight of the corresponding pig according to the complete contour, which specifically includes:
and inputting the pixel area of the outline into a conversion formula, and calculating to obtain the corresponding weight of the pig.
Optionally, in this embodiment, the method further includes:
the breed identification module is used for identifying the breeds of the pigs in the image before the weight estimation module inputs the pixel area of the outline into a conversion formula and calculates the weight of the corresponding pigs;
and the formula determination module is used for determining a corresponding conversion formula according to the identified pig breed.
An embodiment of the present invention provides a terminal device, including:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method described above.
Embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code, which, when executed by a processor of an electronic device, causes the processor to perform the above-described method.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the modules and units in the above described system embodiment may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

CN202110025419.2A2021-01-082021-01-08Pig weight estimation method, system, equipment and storage medium based on imagePendingCN112784713A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110025419.2ACN112784713A (en)2021-01-082021-01-08Pig weight estimation method, system, equipment and storage medium based on image

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110025419.2ACN112784713A (en)2021-01-082021-01-08Pig weight estimation method, system, equipment and storage medium based on image

Publications (1)

Publication NumberPublication Date
CN112784713Atrue CN112784713A (en)2021-05-11

Family

ID=75756998

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110025419.2APendingCN112784713A (en)2021-01-082021-01-08Pig weight estimation method, system, equipment and storage medium based on image

Country Status (1)

CountryLink
CN (1)CN112784713A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115294185A (en)*2022-06-142022-11-04中国农业科学院北京畜牧兽医研究所Pig weight estimation method and related equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103593678A (en)*2013-10-162014-02-19长安大学Long-span bridge vehicle dynamic load distribution detection method
CN105389586A (en)*2015-10-202016-03-09浙江大学Method for automatically detecting integrity of shrimp body based on computer vision
CN105446510A (en)*2014-07-222016-03-30北大方正集团有限公司Hand-written input method and device
CN107103323A (en)*2017-03-092017-08-29广东顺德中山大学卡内基梅隆大学国际联合研究院A kind of target identification method based on image outline feature
CN107507239A (en)*2017-08-232017-12-22维沃移动通信有限公司A kind of image partition method and mobile terminal
CN108510497A (en)*2018-04-102018-09-07四川和生视界医药技术开发有限公司The display methods and display device of retinal images lesion information
CN108898610A (en)*2018-07-202018-11-27电子科技大学A kind of object contour extraction method based on mask-RCNN
CN108961269A (en)*2018-06-222018-12-07深源恒际科技有限公司Pig weight measuring method and system based on image
CN110288580A (en)*2019-06-252019-09-27深圳德里克设备有限公司Measurement method, measuring device and the readable storage medium storing program for executing of livestock weight
CN110675314A (en)*2019-04-122020-01-10北京城市网邻信息技术有限公司 Image processing and three-dimensional object modeling method and equipment, image processing device and medium
CN111178381A (en)*2019-11-212020-05-19北京海益同展信息科技有限公司Poultry egg weight estimation and image processing method and device
CN111986194A (en)*2020-09-032020-11-24平安国际智慧城市科技股份有限公司Medical annotation image detection method and device, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103593678A (en)*2013-10-162014-02-19长安大学Long-span bridge vehicle dynamic load distribution detection method
CN105446510A (en)*2014-07-222016-03-30北大方正集团有限公司Hand-written input method and device
CN105389586A (en)*2015-10-202016-03-09浙江大学Method for automatically detecting integrity of shrimp body based on computer vision
CN107103323A (en)*2017-03-092017-08-29广东顺德中山大学卡内基梅隆大学国际联合研究院A kind of target identification method based on image outline feature
CN107507239A (en)*2017-08-232017-12-22维沃移动通信有限公司A kind of image partition method and mobile terminal
CN108510497A (en)*2018-04-102018-09-07四川和生视界医药技术开发有限公司The display methods and display device of retinal images lesion information
CN108961269A (en)*2018-06-222018-12-07深源恒际科技有限公司Pig weight measuring method and system based on image
CN108898610A (en)*2018-07-202018-11-27电子科技大学A kind of object contour extraction method based on mask-RCNN
CN110675314A (en)*2019-04-122020-01-10北京城市网邻信息技术有限公司 Image processing and three-dimensional object modeling method and equipment, image processing device and medium
CN110288580A (en)*2019-06-252019-09-27深圳德里克设备有限公司Measurement method, measuring device and the readable storage medium storing program for executing of livestock weight
CN111178381A (en)*2019-11-212020-05-19北京海益同展信息科技有限公司Poultry egg weight estimation and image processing method and device
CN111986194A (en)*2020-09-032020-11-24平安国际智慧城市科技股份有限公司Medical annotation image detection method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许鑫: "不同品种绵羊体重与体尺指标的相关回归分析", 《中国优秀硕士学位论文全文数据库 农业科技辑》, no. 2, pages 050 - 185*

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115294185A (en)*2022-06-142022-11-04中国农业科学院北京畜牧兽医研究所Pig weight estimation method and related equipment
CN115294185B (en)*2022-06-142023-10-03中国农业科学院北京畜牧兽医研究所Pig weight estimation method and related equipment

Similar Documents

PublicationPublication DateTitle
CN110705405B (en)Target labeling method and device
CN111986785B (en)Medical image labeling method, device, equipment and storage medium
CN108921057B (en)Convolutional neural network-based prawn form measuring method, medium, terminal equipment and device
CN110197474B (en)Image processing method and device and training method of neural network model
CN110991443A (en)Key point detection method, image processing method, key point detection device, image processing device, electronic equipment and storage medium
CN111882559B (en)ECG signal acquisition method and device, storage medium and electronic device
CN110672189A (en)Weight estimation method, device, system and storage medium
CN110189341B (en)Image segmentation model training method, image segmentation method and device
CN105260750A (en)Dairy cow identification method and system
CN114187659A (en) Gesture recognition method and related products for recognizing pig gestures
CN112818946A (en)Training of age identification model, age identification method and device and electronic equipment
CN113766308A (en)Video cover recommendation method and device, computer equipment and storage medium
CN109559342B (en)Method and device for measuring animal body length
CN112884782A (en)Biological object segmentation method, apparatus, computer device and storage medium
CN112613508B (en) Object recognition method, device and equipment
CN116129195A (en) Image quality evaluation device, method, electronic equipment and storage medium
CN117952962A (en)Bone mineral density detection image processing method and system
CN115752683A (en)Weight estimation method, system and terminal based on depth camera
CN112784713A (en)Pig weight estimation method, system, equipment and storage medium based on image
CN111079617A (en)Poultry identification method and device, readable storage medium and electronic equipment
Mg et al.Cattle face detection with ear tags using YOLOv5 model
CN115690747B (en)Vehicle blind area detection model test method and device, electronic equipment and storage medium
CN112116647B (en)Weighting method and weighting device
CN112990014A (en)Pig weight estimation method, system, device and storage medium
CN111680563B (en)Living body detection method, living body detection device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210511


[8]ページ先頭

©2009-2025 Movatter.jp