CN113469009A - Method, device and equipment for alarming impurity rate in crops and computer storage medium - Google Patents

Method, device and equipment for alarming impurity rate in crops and computer storage medium Download PDF

Info

Publication number
CN113469009A
CN113469009A CN202110711348.1A CN202110711348A CN113469009A CN 113469009 A CN113469009 A CN 113469009A CN 202110711348 A CN202110711348 A CN 202110711348A CN 113469009 A CN113469009 A CN 113469009A
Authority
CN
China
Prior art keywords
information
image
crops
crop
variety
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
CN202110711348.1A
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.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime 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 Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Priority to CN202110711348.1A priority Critical patent/CN113469009A/en
Publication of CN113469009A publication Critical patent/CN113469009A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30188Vegetation; Agriculture

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a computer storage medium for alarming impurity rate in crops, wherein the method comprises the following steps: determining the impurity rate of crops in the image to be detected; the image to be detected is obtained based on the image shot for the crop; performing variety detection on the crops in the image to be detected, and determining variety information of the crops; determining a set impurity rate threshold corresponding to the variety information; and under the condition that the impurity rate in the crops is greater than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is greater than the set impurity rate threshold value.

Description

Method, device and equipment for alarming impurity rate in crops and computer storage medium
Technical Field
The disclosed embodiments relate to, but are not limited to, the technical field of computer vision, and in particular, to a method, an apparatus, a device, and a computer storage medium for warning of crop impurity content.
Background
When the obtained crops are put in storage, the situations that the impurity content of some crops is high and the impurity content of some crops is low often occur, however, the related technology has no scheme for alarming the impurity content of the crops.
Therefore, how to design an alarm method, which can alarm under the condition of high impurity content in crops, is a problem to be solved urgently in the field.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device and equipment for alarming impurity rate in crops and a computer storage medium.
In a first aspect, a method for warning the trash content in crops is provided, which comprises the following steps: determining the impurity rate of crops in the image to be detected; the image to be detected is obtained based on the image shot for the crop; performing variety detection on the crops in the image to be detected, and determining variety information of the crops; determining a set impurity rate threshold corresponding to the variety information; and under the condition that the impurity rate in the crops is greater than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is greater than the set impurity rate threshold value.
In some embodiments, the method further comprises: determining a designated image based on a shot image obtained by shooting the crop; detecting the crops in the designated image to obtain the regional position information of the crops in the designated image; determining an area image including the crop from the designated image based on area position information of the crop in the designated image; and determining the image to be detected based on the area image.
Thus, by determining the area image including the crop from the designation image based on the area position information of the crop in the designation image; and determining the image to be detected based on the region image, so that the image to be detected is a local image in the designated image, and in the process of detecting the impurities, only the impurities in the local image in the designated image are detected, but the impurities in other regions except the local image in the designated image are not detected, and further the calculated amount in the case of detecting the impurities is reduced.
In some embodiments, the performing variety detection on the crop in the image to be detected and determining the variety information of the crop includes: performing variety detection on the crops in the image to be detected to obtain at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively; and determining the first variety information corresponding to the highest confidence coefficient as the variety information of the crop under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is larger than a preset threshold value.
In this way, when the difference between the highest confidence level and the second highest confidence level is greater than the preset threshold, the first variety information corresponding to the highest confidence level is determined as the variety information of the crop, so that the variety information of the crop can be accurately determined.
In some embodiments, the method further comprises: outputting the first variety information and the second variety information when the difference between the highest confidence degree and the second highest confidence degree is less than or equal to the preset threshold value in the at least two confidence degrees; and determining the target variety information as the variety information of the crop in response to an operation instruction obtained by performing a trigger operation on the target variety information of the first and second variety information.
In this way, when the difference between the highest confidence and the second highest confidence is less than or equal to the preset threshold, the user selects the target variety information in the first variety information and the second variety information, so that the determined variety information of the crop can be accurate.
In some embodiments, the performing variety detection on the crop in the image to be detected and determining the variety information of the crop includes: performing variety detection on the crops in the image to be detected, and determining at least two kinds of variety information of the crops in the image to be detected and at least two kinds of proportion information respectively corresponding to the at least two kinds of variety information; the determining of the set impurity rate threshold corresponding to the variety information includes: and determining the set impurity rate threshold corresponding to the at least two kinds of variety information based on the at least two kinds of variety information and the at least two kinds of proportion information.
Therefore, under the condition that the variety information of the crops in the image to be detected is at least two, the impurity rate threshold value can be determined based on the at least two variety information and the at least two proportional information respectively corresponding to the at least two variety information, so that the obtained impurity rate threshold value can be adapted to the actual conditions of the crops of the at least two varieties in the image to be detected, and the output alarm information can also be in accordance with the actual conditions of the crops of the at least two varieties in the image to be detected.
In some embodiments, the method further comprises: under the condition that the difference value between the highest proportion information and the target proportion information in the at least two proportion information is smaller than a target threshold value, outputting first prompt information; wherein the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information; the first prompt message is used for prompting: the difference between the highest proportion information and the target proportion information is smaller than the target threshold.
Thus, in the case where the difference between the highest proportion information and the target proportion information is smaller than the target threshold, the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information shows that the purity of the crops in the image to be detected is low, so that the first prompt information can prompt that the purity of the crops is low, and the purity of the crops in the image to be detected is ensured.
In some embodiments, the image to be detected comprises: at least two frames of images to be detected; the at least two frames of images to be detected are obtained based on at least two frames of shot images of the crops; the at least two frames of shot images are shot in the process that the crops on the bearing device are transferred to the appointed placing area; the variety detection is carried out on the crops in the image to be detected, and the variety information of the crops is determined, and the method comprises the following steps: and performing variety detection on each image in the at least two frames of images to be detected to obtain variety information of the crops on the bearing device.
Therefore, the at least two frames of images to be detected are obtained based on the at least two frames of images shot for the crops, and variety information of the crops on the bearing device is obtained by performing variety detection on each image in the at least two frames of images to be detected, so that the accuracy of the determined variety information of the crops on the bearing device can be improved, and the condition that the accuracy of the determined crops on the bearing device is low due to the fact that the crops on the bearing device are shielded or placed at corners is reduced.
In some embodiments, the method further comprises: receiving a shooting instruction sent by sensing equipment under the condition that the sensing equipment senses that an object enters a first designated area; responding to the shooting instruction, and continuously shooting the first designated area to obtain a plurality of frames of images; determining the image to be detected, a bearing device bearing the crop and license plate information of the bearing device based on the multi-frame image; the method for determining the impurity content of the crops in the image to be detected comprises the following steps: determining the impurity content rate of the crops matched with the license plate information of the bearing device in the image to be detected; the determining variety information of the crop comprises: and determining the variety information of the crops matched with the license plate information of the bearing device.
Therefore, the license plate information of the bearing device is determined based on the multi-frame image, the impurity rate of crops matched with the license plate information of the bearing device in the image to be detected is further determined, the variety information of the crops matched with the license plate information of the bearing device is further determined, the impurity rate of the crops borne on the bearing device and the variety information of the crops can be further determined, the obtained impurity rate of the crops and the variety information of the crops are related to the license plate information of the bearing device for bearing the crops, and the data relevance of crop management is enhanced.
In some embodiments, the method further comprises: determining placement position information of the crop corresponding to the variety information of the crop; and outputting second prompt information of the placement position of the crop.
Like this, place the crop in the second prompt information who places positional information through the output to the operator who bears the weight of the device can place the crop in the positional information that places of output based on second prompt information, thereby has improved the accuracy that the crop placed, has improved the standardization that the crop put in storage.
In some embodiments, the method further comprises: determining at least one device associated with the placement location information; transmitting, to the at least one device, at least one of: the information of the license plate of the bearing device for bearing the crops, the attribute information of an operator operating the bearing device, the variety information of the crops, the quality information of the crops, the impurity rate of the crops and the time required for the crops to reach the placing position information.
In this way, by sending the information related to the carrying device and/or the information related to the crop to the at least one device associated with the placing position information, the personnel corresponding to the at least one device can timely and correspondingly operate the crop on the carrying device based on the information related to the carrying device and/or the information related to the crop, so that the timeliness and the standardization of the placing of the crop are improved.
In some embodiments, the designated image comprises: at least one frame of sub-images; the detecting the crop in the designated image to obtain the area position information of the crop in the designated image includes: respectively detecting the crops in the at least one frame of sub-images to obtain the area position information of the crops and the area score corresponding to the area position information in each sub-image, or indicating information of the area position information of the crops does not exist; the determining, from the designated image, an area image including the crop based on the area position information of the crop in the designated image includes: acquiring a target sub-image corresponding to at least one region score which is larger than a first region score threshold value from at least one frame of sub-image; and determining the area image comprising the crop from the target sub-image based on the area position information of the crop in the target sub-image.
Therefore, the area score corresponding to the area position information of the crop in each sub-image is obtained, the target sub-image corresponding to at least one area score larger than the first area score threshold value is obtained, and the area image comprising the crop is determined based on the area position of the crop in the target sub-image, so that the sub-image with low score in the area score corresponding to the position area of the crop can be removed, the obtained area image comprising the crop can correspond to the real crop area in the designated image, and the accuracy of the determined impurity rate in the crop can be improved.
In some embodiments, the determining the trash content in the crop in the image to be detected comprises: detecting the impurities in the image to be detected through a detection network to obtain a detection result; determining the impurity content of the crops in the image to be detected based on the detection result; the method further comprises the following steps: acquiring a region score corresponding to the region position information; under the condition that the region score is larger than a second region score threshold value, acquiring the calculated impurity rate of the crop, which is calculated manually; and training the detection network based on the image to be detected and the calculated trash content of the crops under the condition that the difference degree between the trash content of the crops and the calculated trash content of the crops is greater than the set difference degree.
In this way, under the condition that the area score corresponding to the area position information of the crop is low, the calculated impurity rate of the crop is calculated manually, and the detection network for detecting the impurities is trained through the calculated impurity rate of the crop, so that the accuracy of the detection network for detecting the subsequent impurities can be improved.
In some embodiments, the performing variety detection on the crop in the image to be detected and determining the variety information of the crop includes: performing variety detection on the crops in the image to be detected through a classification network, and determining at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively; the method further comprises the following steps: acquiring a region score corresponding to the region position information; acquiring input variety information obtained in response to an input operation on the variety information of the crop under the condition that the region score is greater than a third region score threshold and the highest confidence coefficient of the at least two confidence coefficients is less than a confidence coefficient threshold; and training the classification network based on the image to be detected and the input variety information.
In this way, under the condition that the region score corresponding to the region position information of the crop is high, and the highest confidence coefficient of the at least two confidence coefficients corresponding to the at least two varieties information is low, the variety information of the crop is manually input, and the classification network for classifying the crop is trained through the input variety information, so that the accuracy of the classification network for classifying the subsequent crop can be improved.
In a second aspect, an alarm device for crop impurity rate is provided, which includes: the first determining unit is used for determining the impurity rate of crops in the image to be detected; the image to be detected is obtained based on the image shot for the crop; the second determining unit is used for carrying out variety detection on the crops in the image to be detected and determining the variety information of the crops; a third determination unit configured to determine a set impurity content threshold value corresponding to the item information; and the output unit is used for outputting alarm information indicating that the impurity content rate in the crops is greater than the set impurity content rate threshold value under the condition that the impurity content rate in the crops is greater than the set impurity content rate threshold value.
In a third aspect, an alarm device for crop impurity rate is provided, which includes: a memory storing a computer program operable on the processor and a processor implementing the steps of the method when executing the computer program.
In a fourth aspect, a computer storage medium is provided that stores one or more programs executable by one or more processors to implement the steps in the above-described method.
In the embodiment of the disclosure, on one hand, when the trash content in the crop is greater than the set trash content threshold, the alarm information is output, so that the related personnel can easily know whether the trash content in the crop exceeds the standard; on the other hand, by determining the set impurity rate threshold corresponding to the variety information, different varieties can have different impurity rate thresholds, so that the pertinence of the output alarm information can be improved; in yet another aspect, the method comprises the steps of determining the impurity content of crops in an image to be detected; the image to be detected is obtained based on the image shot for the crop, the variety of the crop in the image to be detected is detected, and the variety information of the crop is determined, so that the determination of the trash content and the variety information is determined based on the image to be detected, the situation that the trash content in the crop and the variety information of the crop are manually determined to cause manpower waste is reduced, the problem that the trash content in the crop and the variety information of the crop are manually determined to be inaccurate is solved, and the trash content in the crop and the variety information of the crop can be rapidly and accurately determined.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive efforts.
Fig. 1 is a schematic flow chart of an alarm method for crop impurity rate according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart illustrating a process for determining an image to be detected according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of another method for warning of crop impurity rate according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of another method for warning of crop impurity rate according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart illustrating a further method for warning of crop trash content according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of a method for warning of crop impurity rate according to another embodiment of the present disclosure;
FIG. 7 is a schematic flow chart illustrating an alarm method for crop trash content according to yet another embodiment of the present disclosure;
FIG. 8 is a schematic flow chart illustrating an alarm method for crop trash content according to yet another embodiment of the present disclosure;
FIG. 9 is a schematic flow chart of another method for warning of crop impurity rate according to another embodiment of the present disclosure;
FIG. 10 is a schematic flow chart of a method for determining a variety of sugarcane according to an embodiment of the present disclosure;
FIG. 11 is a schematic flow chart of another method for determining sugarcane varieties according to an embodiment of the disclosure;
fig. 12a is a schematic diagram of a captured image according to an embodiment of the disclosure;
FIG. 12b is a schematic diagram of a rectangular frame of a crop in a captured image according to an embodiment of the disclosure;
FIG. 12c is a schematic diagram of an image to be detected according to an embodiment of the disclosure;
fig. 13 is a schematic structural diagram illustrating a composition of an alarm device for crop impurity content rate according to an embodiment of the present disclosure;
fig. 14 is a hardware entity diagram of an alarm device for crop impurity rate provided in an embodiment of the present disclosure.
Detailed Description
The technical solution of the present disclosure will be specifically described below by way of examples with reference to the accompanying drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that: in the examples of this disclosure, "first," "second," etc. are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. The plurality of frames, and the plurality of times in the embodiments of the present disclosure may respectively mean at least two frames, and at least two times.
In addition, the technical solutions described in the embodiments of the present disclosure can be arbitrarily combined without conflict.
The harvested crops need to be put in storage after being harvested, and whether the impurity content in the crops exceeds the standard or not is generally required to be determined before the crops are put in storage. However, in the related art, the determination method for determining whether the impurity content in the crops exceeds the standard is manually estimated, so that the problems that the standard adopted for manually estimating whether the impurity content in the crops exceeds the standard is not uniform, the estimation subjectivity is strong, the misjudgment rate is high and the like are caused. In order to solve the problems caused by the artificial estimation of the trash content in the crops, the embodiment of the disclosure provides a method based on computer vision, so that an alarm device of the trash content in the crops can determine whether the trash content in the crops exceeds the standard, no manual participation is needed in the process of determining whether the trash content in the crops exceeds the standard, the standard adopted for determining whether the trash content in the crops exceeds the standard is unified, the accuracy of determining whether the trash content exceeds the standard is high, and the misjudgment rate is low. It should be noted that the impurity content in the embodiments of the present disclosure may be referred to as impurity deduction rate. The terms heteroleptic and heteroleptic are to be understood identically.
In some embodiments, the crop may be sugar cane. In other embodiments, the crop may include at least one of: sorgo, maple, sugar beet, sugar palm, wheat, corn, cotton, soybean, peanut, and the like. The form of the crop is not limited by the disclosed embodiments, and the crop may be any one of the following categories: grain crops, cash crops, feed crops, green manure crops, medicinal crops and the like.
The impurities in embodiments of the present disclosure may include at least one of: leaves, root hairs, damaged parts in crops, soil, sand, stones. The damaged portion in the crop may be an unusable portion of the crop. For example, where the crop is sugar cane, the damaged portion in the crop may include a cane lesion (e.g., a crack on the sugar cane, a sugar cane spoiled portion). As another example, where the crop is corn, the damaged portions in the crop may include portions that produce mildew.
The method for warning the crop impurity rate in the embodiment of the disclosure can be applied to a warning system for the crop impurity rate, and the system can include: camera, analytical equipment, display device. Any two of the camera, the analysis device, the display device may be integrated together or provided separately. The analysis device may be an alarm device for the crop impurity rate in the embodiment of the present disclosure.
The camera can be used for shooting crops to obtain shot images, sending the shot images to the analysis equipment, determining whether the impurity content rate of the crops is greater than the set impurity content rate threshold value or not based on the shot images through the analysis images, sending alarm information that the impurity content rate of the crops is greater than the set impurity content rate threshold value to the display equipment under the condition that the impurity content rate of the crops is greater than the set impurity content rate threshold value, and displaying the alarm information at least through the display equipment.
In some embodiments, the analysis device may include a side-end device, so that the distance between the analysis device and the camera in the real scene is within a set distance threshold, so that the analysis device can quickly obtain the image shot by the camera, and thus can quickly determine the impurity rate in the crop, and the captured image shot by the camera obtained by the analysis device may not depend on the existence of the network, thereby reducing the occurrence of the situation that the captured image shot by the camera cannot be obtained by the analysis device in the case of network congestion or disconnection. In other embodiments, the analysis device may be disposed in the cloud, so that complexity of system deployment may be reduced, and deployment cost of the system may be reduced.
The following describes a method for warning the trash content in crops provided by the embodiments of the present disclosure.
Fig. 1 is a schematic flow chart of an alarm method for crop impurity rate provided in an embodiment of the present disclosure, and as shown in fig. 1, the method is applied to an alarm device for crop impurity rate, and the method includes:
s101, determining the impurity rate of crops in an image to be detected; the image to be detected is obtained on the basis of an image taken of the crop.
In some embodiments, the warning device of the crop impurity rate can comprise a warning device of the crop impurity rate. In still other embodiments, the apparatus for warning of crop impurity rate may include a processor or a chip, and the processor or the chip may be applied to the warning device for crop impurity rate. The warning device of the impurity rate in the crops or any one of the following devices may comprise one of the following or a combination of at least two of the following: a server, a cloud device, a Mobile Phone (Mobile Phone), a tablet computer (Pad), a computer with wireless transceiving function, a handheld computer, a desktop computer, a personal digital assistant, a portable media player, a Smart speaker, a navigation device, a Smart watch, Smart glasses, wearable devices such as a Smart necklace, a pedometer, a digital TV, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in Industrial Control (Industrial Control), a wireless terminal in Self Driving (Self Driving), a wireless terminal in Remote Surgery (Remote Medical Surgery), a wireless terminal in Smart Grid, a wireless terminal in Transportation Safety (Transportation Safety), a wireless terminal in Smart City (rt City), a wireless terminal in Smart Home (Home), a vehicle in a vehicle networking system, a vehicle-mounted device in a vehicle networking system, a wearable device with wireless transceiving function, a handheld computer, a desktop computer, a portable media player, a Smart Phone, a Smart necklace, and the like, An on-board module, and the like.
The image to be detected may include one frame image to be detected, or may include at least two frame images to be detected. The image photographed for the crop may be a photographed image, and the photographed image may include one frame photographed image, or may include at least two frames photographed images. The captured images may be captured by one or at least two cameras. In some embodiments, the captured image may be captured from a video captured by a camera.
In some embodiments, in the case of obtaining a captured image, the obtained captured image may be determined as an image to be detected. In other embodiments, in the case of obtaining the captured image, a rectangular frame region corresponding to the crop in the captured image may be determined, and the rectangular frame region in the captured image may be cropped to obtain the image to be detected. In still other embodiments, in the case of obtaining the captured image, a target contour region corresponding to the real contour of the crop in the captured image may be determined, pixels in the target contour region may be extracted, and pixels around the pixels in the target contour region may be filled to obtain a rectangular image to be detected. In still other embodiments, a rectangular region image may be extracted from the target contour region, and the extracted rectangular region image may be used as the image to be detected.
In some embodiments, the captured image, the rectangular frame area, the pixel-filled rectangular image, or the extracted rectangular area image may be subjected to at least one of the following processes: denoising, normalization conversion, color conversion, Translation (Translation), scaling (Scale), Flip (Flip), Rotation (Rotation), shearing (Shear), and the like, to obtain an image to be detected.
The following describes a method for determining the trash content of crops in an image to be detected, which is provided by the embodiments of the present disclosure: detecting impurities in an image to be detected to obtain region area information of the impurities in the image to be detected; determining the impurity content in the crop based on the region area information of the impurities.
In some embodiments, the region area information of the impurity in the image to be detected may include: and (4) regional area information of all impurities in the image to be detected. In other embodiments, the information on the area of the region of the impurity in the image to be detected may include: region area information of each impurity in an image to be detected. In still other embodiments, the information on the area of the region of the impurity in the image to be detected may include: region area information of each impurity in an image to be detected.
And detecting the impurities in the image to be detected, and obtaining the corresponding class information of each impurity. Based on the class information of each impurity, class information of each impurity can be obtained.
In some embodiments, the impurities in the image to be detected are detected, and the area information of all the impurities in the image to be detected and the category information of the impurities can be obtained. The type information of the impurities may be the type information of one kind of impurities or the type information of at least two kinds of impurities. In some embodiments, in the case where the types of the plurality of impurities (i.e., the plurality of impurities) are detected, the region area information of each impurity may be acquired, and the impurity type corresponding to the largest region area information may be determined as the type information of the one impurity. In other embodiments, the region number information of each impurity may be acquired, and the impurity type corresponding to the largest region number information may be determined as the type information of the impurity.
The method can detect the impurities in the image to be detected to obtain the region position information of each impurity in the image to be detected, and determine the region area information of each impurity based on the region position information of each impurity.
In some embodiments, the impurities in the image to be detected are detected, and the area information of all the impurities in the image to be detected and the category information of the impurities can be obtained. The type information of the impurities may be the type information of one kind of impurities or the type information of at least two kinds of impurities.
In the implementation process, the impurities in the image to be detected can be detected to obtain the region position information of each impurity in the image to be detected, and the region area information of each impurity is determined based on the region position information of each impurity.
In some embodiments, a first detection network (also referred to as a first detection model) for detecting the impurities may be obtained, and the impurities in the image to be detected are detected by using the first detection network.
In other embodiments, detecting the impurity in the image to be detected to obtain the region area information of the impurity in the image to be detected may include: and acquiring a third detection network for detecting the contour of the crop, detecting the contour of the crop in the image to be detected by adopting the third detection network, and taking the region outside the contour of the crop in the image to be detected as the impurity region in the image to be detected, so as to determine the region area information of the impurity in the image to be detected based on the impurity region in the image to be detected.
The first detection network may be configured to detect impurities in an input image, and obtain region position information of each impurity and corresponding category information of each impurity. And determining the area information of each impurity based on the area position information of each impurity, and further obtaining the area information of the impurity in the image to be detected.
The size of the image to be detected may be the same as the image input size of the first detection network. In some embodiments, the image to be detected may include only a crop region, and the detecting the impurity in the image to be detected may include: impurities in crop regions of an image to be detected are detected. In other embodiments, the image to be detected may include a crop region and a background region, and detecting the impurities in the image to be detected may include: and acquiring crop areas in the image to be detected, and detecting impurities in the crop areas of the image to be detected. The crop area may be rectangular or irregular polygonal.
The impurity rate in a crop may be the ratio of the mass of impurities in the crop to the total mass of the crop.
In some embodiments, the impurity content in the crop may be determined based on the total region area information of the impurity and a target threshold. The target threshold may correspond to category information of impurities in the image to be detected.
In other embodiments, the trash content in the crop may be determined based on the total area information of the trash, the target threshold, and the area information of the crop in the image to be detected. For example, a ratio between the total region area information of the impurities and the region area information of the crop may be determined first, and then the impurity percentage in the crop may be determined based on the ratio and a target threshold.
The region of the crop may be a region including impurities, or a region not including impurities. In some embodiments, the area of the crop may include an area of the background, or an area that does not include the background. The region of the crop in the embodiments of the present disclosure is exemplified by a region including impurities.
In some embodiments, the impurity percentage in the crop may be determined based on the region area information for each impurity and the corresponding category information for each impurity. For example, each piece of weight information corresponding one-to-one to the category information of each impurity may be determined based on the category information of each corresponding impurity, and the impurity percentage in the crop may be determined based on the region area information of each impurity and each corresponding piece of weight information.
The warning device for the impurity content rate in the crops can store a target relation table, the target relation table comprises the mapping relation between the category information and the weight information of the impurities, the category information of one or at least two impurities can be mapped to one weight information, and the category information of any impurity has the weight information uniquely corresponding to the category information. Each weight information corresponding to the category information of each impurity may be determined based on the target relationship table.
In other embodiments, the impurity percentage in the crop may be determined based on the area information of each impurity region and the category information of each impurity. For example, the region area information for each impurity and the corresponding weight information for each impurity may be determined, the impurity sub-concentration rate for each impurity in the crop may be determined based on the region area information for each impurity and the corresponding weight information for each impurity, and then the impurity concentration rate in the crop may be determined based on the impurity sub-concentration rate for each impurity in the crop.
In some embodiments, the impurity sub-impurity rate of the first type of impurity meeting the first impurity rate threshold condition may be determined from the impurity sub-rates of each impurity in the crop; determining a sub-impurity rate of the first type of impurity as a specified value; determining the impurity content of the second type of impurities meeting the second impurity content threshold condition from the impurity content of each impurity in the crops; determining the impurity content in the crop based on the specified value and the impurity content of the second type of impurity.
In some embodiments, the impurity sub-impurity rate of a first type of impurity less than a first value may be determined from the impurity sub-rates of each impurity in the crop, the impurity sub-impurity rate of the first type of impurity being determined as the first value; and/or, the impurity sub-fraction of a second type of impurity greater than a second value may be determined from the impurity sub-fractions of each impurity in the crop; the impurity sub-fraction of the second type of impurity is determined to be a second value.
In some embodiments, the impurity rate in a crop may be determined based on the sum of a specified value and the impurity sub-rates of a particular type of impurity.
It should be noted that, the above is merely an exemplary example of the method for determining the trash content in the crop in the image to be detected, the embodiment of the present disclosure is not limited to how to determine the trash content in the crop, and any method capable of determining the trash content in the crop in the image to be detected should be within the scope of the embodiments of the present disclosure.
In practice, crop impurity rates may be output, and/or impurity rates of each impurity may be output. For example, the crop impurity content rate and/or the impurity content rate of each impurity may be output to the display device, so that the display device displays the crop impurity content rate and/or the impurity content rate of each impurity.
S102, performing variety detection on the crops in the image to be detected, and determining the variety information of the crops.
In some embodiments, a classification network (or also called a classification model) may be obtained, and the classification network is used to perform variety detection on crops in an image to be detected. The classification network may comprise an item classification network. The classification network may include one of: the system comprises a full connection layer, a Decision Tree classification network, an artificial neural network classification network, a K-nearest Neighbor (KNN) classification network, a Support Vector Machine (SVM) classification network, a naive Bayes classification network, an Adaptive boost (Adaboost) algorithm classifier, a logistic regression classifier, a random forest classifier, and a Gradient Boost Decision Tree (GBDT) classifier.
The classification network can detect different varieties of the same crop. For example, taking crops as sugarcane for example, the variety information of sugarcane can be divided into: guangdong sugar series, Funong series, Gui sugar series, Yun sugarcane series and Min sugar series; the variety information of crops can be divided into: black diamond, black green diamond, white corn cane; the variety information of crops can be divided into: sugar cane and fruit cane. Alternatively, the classification network may detect different crops. For example, sugar cane, sugar beets, or at least two of corn, wheat, sorghum, oats, and the like, may be classified.
The variety information of the crop can be the most possible variety information of the crop determined by the alarm device of the impurity rate in the crop, or the most possible variety information of at least two varieties. For example, by performing variety detection on a crop in an image to be detected, at least two variety information of the crop and at least two confidence degrees respectively corresponding to the at least two variety information can be determined.
And S103, determining a set impurity rate threshold corresponding to the variety information.
The impurity content rate warning device may store a first relation table between the variety information and the impurity content rate threshold value, so that the set impurity content rate threshold value corresponding to the variety information of the crop may be determined based on the first relation table. In the first relation table, one or at least two varieties information may correspond to one impurity rate threshold, that is, each variety information has one impurity rate threshold corresponding to it.
And S104, under the condition that the impurity content rate in the crops is greater than the set impurity content rate threshold value, outputting alarm information indicating that the impurity content rate in the crops is greater than the set impurity content rate threshold value.
In some embodiments, the alert information may further indicate at least one of: the crop impurity rate in the image to be detected, the indication information which does not allow to be put in storage, the attribute information of an alarm manager and the current time information. Wherein, the attribute information of the alarm manager may include: title and contact details.
In some embodiments, in the case where the impurity content rate in the crop is less than or equal to the set impurity content rate threshold value, target information indicating that the impurity content rate in the crop is less than or equal to the set impurity content rate threshold value is output. The target information may also indicate at least one of: the method comprises the steps of indicating information of the impurity rate and the allowed warehousing of crops in an image to be detected, warehouse placement information, attribute information of a warehouse manager corresponding to the warehouse placement information, placement position information of the crops in a warehouse and current time information. Wherein, the attribute information of the warehouse manager may include: title and contact details.
In some embodiments, the alert information and/or the target information may be output to the at least one display device to cause the at least one display device to display the alert information and/or the target information. The at least one display device may comprise at least one of: the device comprises a display device integrated on the alarm device of the impurity rate in the crops, a display screen, terminal equipment of an alarm manager, terminal equipment of an operator of the bearing device of the crops and the like, wherein the distance between the display device integrated on the alarm device of the impurity rate in the crops and the alarm device of the impurity rate in the crops in a real scene is smaller than a preset distance. The Display screen in any of the embodiments of the present disclosure may be a Light Emitting Diode (LED), a Liquid Crystal Display (LCD), or an Organic Light-Emitting Diode (OLED).
In the embodiment of the disclosure, on one hand, when the trash content in the crop is greater than the set trash content threshold, the alarm information is output, so that the related personnel can easily know whether the trash content in the crop exceeds the standard; on the other hand, by determining the set impurity rate threshold corresponding to the variety information, different varieties can have different impurity rate thresholds, so that the pertinence of the output alarm information can be improved; in yet another aspect, the method comprises the steps of determining the impurity content of crops in an image to be detected; the image to be detected is obtained based on the image shot for the crop, the variety of the crop in the image to be detected is detected, and the variety information of the crop is determined, so that the determination of the trash content and the variety information is determined based on the image to be detected, the situation that the trash content in the crop and the variety information of the crop are manually determined to cause manpower waste is reduced, the problem that the trash content in the crop and the variety information of the crop are manually determined to be inaccurate is solved, and the trash content in the crop and the variety information of the crop can be rapidly and accurately determined.
Fig. 2 is a schematic flow chart of determining an image to be detected according to an embodiment of the present disclosure, as shown in fig. 2, the method is applied to an alarm device for indicating impurity rate in crops, and the method includes:
s201, determining a designated image based on a shot image obtained by shooting the crop.
The photographed image may be one frame photographed image or at least two frames photographed image, the designated image determined by one frame photographed image being one frame, and the designated image determined by at least two frames photographed image being at least two frames.
In some embodiments, the captured image may be determined as the specified image. In other embodiments, the captured image may be processed by at least one of the following processes to obtain the designated image: clipping, denoising, normalization conversion, color conversion, translation, scaling, flipping, rotation, clipping, and the like.
S202, detecting the crops in the designated image to obtain the region position information of the crops in the designated image.
A second detection network or a second detection model may be employed to detect the crop in the designated image. In some embodiments, the second detection network and the first detection network may be the same network in structure, or may be different networks in structure. For example, the second detection network and the first detection network may both be RetinaNet, while the weight parameters in the second detection network and the first detection network are different.
The size of the designated image may be the same as the image input size of the second detection network.
In some embodiments, the crop in the designated image is detected, and not only the area position information of the crop in the designated image but also the variety information of the crop in the designated image can be obtained. Taking crops as sugarcane for example, the variety information of the crops can be divided into: guangdong sugar series, Funong series, Gui sugar series, Yun sugarcane series and Min sugar series; the variety information of crops can be divided into: black diamond, black green diamond, white corn cane; the variety information of crops can be divided into: sugar cane and fruit cane. It should be noted that the variety information of the crop can also be divided in other manners, which is not limited in the embodiment of the disclosure.
In the case where the area position information of the crop is the area position information of the rectangular frame of the crop, the area position information of the rectangular frame may be coordinate information on the designated image at two opposite diagonal positions of the rectangular frame. When the area position information of the crop is the position information of the actual contour area of the crop, the position information of the actual contour area of the crop may be coordinate information of each pixel point on the designated image in the actual contour area of the crop, or coordinate information of a contour corresponding to the actual contour area of the crop on the designated image.
In some embodiments, specifying the image comprises: at least one frame of sub-picture. S202 may be implemented in the following manner: the crop in at least one frame of sub-image can be detected respectively, and the area position information of the crop and the area score corresponding to the area position information in each sub-image are obtained, or the indication information of the area position information of the crop does not exist.
And S203, determining the area image including the crop from the designated image based on the area position information of the crop in the designated image.
In some embodiments, the area position information of the crop in the designated image may be area position information of a rectangular frame corresponding to the crop in the designated image, and the image in the area position information of the rectangular frame in the designated image may be determined to include the area image of the crop.
In other embodiments, the area position information of the crop in the designated image may be area position information of a contour area corresponding to the contour of the crop in the designated image, and a rectangular image in the area position information of the contour area is determined as an area image including the crop. In some embodiments, pixel filling may be performed on an irregular image in the region position information of the outline region, resulting in a rectangular region image including the crop.
In some embodiments, S203 may be implemented by: acquiring a target sub-image corresponding to at least one region score which is larger than a first region score threshold value from at least one frame of sub-image; and determining an area image comprising the crop from the target sub-image based on the area position information of the crop in the target sub-image. The target sub-image may be one frame or at least two frame sub-images.
For example, at least one frame of sub-image includes sub-image a, sub-image B, and sub-image C, and the sub-image a, the sub-image B, and the sub-image C may be detected respectively, so as to obtain the area location information of the crop in the sub-image a and the area score corresponding to the area location information as 98, obtain the area location information of the crop in the sub-image B and the area score corresponding to the area location information as 56, and obtain the indication information that the area location information of the crop does not exist in the sub-image C. In the case where the first region score threshold is 80, the sub-image a is determined as the target sub-image.
By the mode, the area score corresponding to the area position information of the crop in each sub-image is obtained, then the target sub-image corresponding to at least one area score larger than the first area score threshold value is obtained, and the area image comprising the crop is determined based on the area position of the crop in the target sub-image, so that the sub-image with the low score in the area score corresponding to the position area of the crop can be removed, the obtained area image comprising the crop can correspond to the real crop area in the designated image, and the accuracy of the determined impurity rate in the crop can be improved.
And S204, determining an image to be detected based on the region image.
In some embodiments, the region image may be determined as an image to be detected. In other embodiments, the region image may be processed by at least one of the following processes to obtain the image to be detected: clipping, denoising, normalization conversion, color conversion, translation, scaling, flipping, rotation, clipping, and the like.
In the embodiment of the present disclosure, by determining the area image including the crop from the designated image based on the area position information of the crop in the designated image; and determining the image to be detected based on the region image, so that the image to be detected is a local image in the designated image, and in the process of detecting the impurities, only the impurities in the local image in the designated image are detected, but the impurities in other regions except the local image in the designated image are not detected, and further the calculated amount in the case of detecting the impurities is reduced.
Fig. 3 is a schematic flow chart of another method for warning of crop impurity rate provided in the embodiment of the present disclosure, and as shown in fig. 3, the method is applied to a device for warning of crop impurity rate, and the method includes:
s301, determining the impurity rate of crops in the image to be detected; the image to be detected is obtained on the basis of an image taken of the crop.
S302, performing variety detection on the crops in the image to be detected to obtain at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively.
For example, the variety information of the crop in the image to be detected is cantonese series with a confidence of 90%, foron series with a confidence of 80.3%, and cinnamic sugar series with a confidence of 32%. For another example, the variety information of the crop in the image to be detected is corn with a confidence of 95%, wheat with a confidence of 30%, rice with a confidence of 23%, and oat with a confidence of 5%.
And S303, determining the first variety information corresponding to the highest confidence coefficient as the variety information of the crop under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is larger than a preset threshold value.
For example, in the case where the preset threshold value is 30%, corn is determined as the variety information of the crop.
S304, outputting the first variety information and the second variety information under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is smaller than or equal to a preset threshold value.
The difference between the highest confidence and the second highest confidence is smaller than or equal to a preset threshold, which indicates that the probability that the crop belongs to the variety information corresponding to the highest confidence is high, and the probability that the crop belongs to the variety information corresponding to the second highest confidence is high, and in order to improve the accuracy of the determined variety information of the crop, a scheme for manually confirming the variety information of the crop is provided, namely, the first variety information and the second variety information are output.
In some embodiments, the first item information and the second item information may be output to at least one display device.
And S305, determining the target variety information as the variety information of the crop in response to an operation instruction obtained by triggering operation on the target variety information in the first variety information and the second variety information.
In some embodiments, the target item information may be first item information or second item information. In other embodiments, the target variety information may be first variety information and second variety information, in which case some crops in the image to be detected are the first variety information and other crops are the second variety information.
The display device can display the first variety information and the second variety information, and under the condition that any display device acquires the triggering operation of the user on the first variety information and/or the second variety information, an operation instruction is generated, and the operation instruction is sent to the warning device of the impurity content rate in the crops, so that the warning device of the impurity content rate in the crops responds to the operation instruction.
And S306, determining a set impurity rate threshold corresponding to the variety information.
In the case that the variety information is a variety, the corresponding set impurity rate threshold value can be determined based on the variety information; when the variety information is two types of varieties, the impurity content threshold value may be set based on correspondence between the two types of variety information.
And S307, under the condition that the impurity content rate in the crops is greater than the set impurity content rate threshold value, outputting alarm information indicating that the impurity content rate in the crops is greater than the set impurity content rate threshold value.
In the embodiment of the disclosure, under the condition that the difference between the highest confidence degree and the second highest confidence degree is greater than the preset threshold, the first variety information corresponding to the highest confidence degree is determined as the variety information of the crop, so that the variety information of the crop can be accurately determined.
In the embodiment of the disclosure, when the difference between the highest confidence and the second highest confidence is less than or equal to the preset threshold, the user selects the target variety information in the first variety information and the second variety information, so that the determined variety information of the crop is accurate.
Fig. 4 is a schematic flow chart of another method for warning of crop impurity rate provided in the embodiment of the present disclosure, and as shown in fig. 4, the method is applied to a device for warning of crop impurity rate, and the method includes:
s401, determining the impurity rate of crops in the image to be detected; the image to be detected is obtained on the basis of an image taken of the crop.
S402, performing variety detection on the crop in the image to be detected, and determining at least two varieties of information of the crop in the image to be detected and at least two pieces of proportion information respectively corresponding to the at least two varieties of information.
In some embodiments, a certain detection network may be used to perform variety detection on crops in an image to be detected, and position information of a rectangular frame of the crops of each variety information is determined, so that at least two pieces of proportion information are determined based on the position information of the rectangular frame of the crops of each variety information. In other embodiments, another detection network may be used to perform variety detection on the crops in the image to be detected, and determine the area position information corresponding to the actual contour of the crop of each variety information, so as to determine the at least two pieces of proportion information based on the area position information corresponding to the actual contour of the crop of each variety information.
And S403, determining a set impurity rate threshold corresponding to the at least two kinds of variety information based on the at least two kinds of variety information and the at least two kinds of proportion information.
In this way, the impurity rate threshold is set in association with not only the at least two kinds of variety information but also the at least two kinds of proportion information.
For example, if a first variety of sugar cane and a second variety of sugar cane are harvested, the first variety of sugar cane being characterized by luxuriant leaves and thick root hairs and the second variety of sugar cane being characterized by small leaves and thin and weak root hairs, the impurity content of the harvested first variety of sugar cane will be higher and the impurity content of the harvested second variety of sugar cane will be lower, so that different varieties of sugar cane may have different set impurity content thresholds.
In some embodiments, if one of the carriers carries a first variety of sugarcane and also carries a second variety of sugarcane, the set impurity rate threshold corresponding to the information of at least two varieties can be determined according to the information of the proportion of the first variety of sugarcane to all sugarcanes on the carrier, the information of proportion of the second variety of sugarcane to all sugarcanes on the carrier, and the information of proportion of the second variety of sugarcane to all sugarcanes on the carrier. Therefore, the situation that the alarm generated cannot be adapted to the actual situation of the sugarcane on the bearing device under the condition that the impurity rate threshold corresponding to the sugarcane of the first variety or the sugarcane of the second variety is used as the set impurity rate threshold can be reduced.
The calculation method for setting the impurity rate threshold value may include: multiplying the impurity rates corresponding to at least two kinds of variety information by at least two corresponding proportion information respectively to obtain at least two products; and adding at least two products to obtain a set impurity rate threshold value.
S404, under the condition that the impurity rate in the crops is larger than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is larger than the set impurity rate threshold value.
In the embodiment of the disclosure, under the condition that the variety information of the crop in the image to be detected is at least two, the impurity content threshold value can be determined based on the at least two variety information and the at least two proportional information respectively corresponding to the at least two variety information, so that the obtained impurity content threshold value can be adapted to the actual conditions of the crop of the at least two varieties in the image to be detected, and the output alarm information can also be adapted to the actual conditions of the crop of the at least two varieties in the image to be detected.
In some embodiments, the following steps may also be performed: under the condition that the difference value between the highest proportion information and the target proportion information in the at least two proportion information is smaller than a target threshold value, outputting first prompt information; wherein, the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information; the first prompt message is used for prompting: the difference between the highest proportion information and the target proportion information is less than the target threshold.
In some embodiments, the first prompt message may be output to at least one display device. Wherein, first prompt message can also be used to prompt: the difference between the highest proportion information and the target proportion information, the indication information that the warehouse entry is not allowed, the attribute information of an alarm manager and the current time information.
The larger the difference between the highest proportion information and the target proportion information is, the higher the purity of the crop is indicated, and the smaller the difference between the highest proportion information and the target proportion information is, the lower the purity of the crop is indicated.
In this way, in the case where the difference between the highest proportion information and the target proportion information is smaller than the target threshold, the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information shows that the purity of the crops in the image to be detected is low, so that the first prompt information can prompt that the purity of the crops is low, and the purity of the crops in the image to be detected is ensured.
Fig. 5 is a schematic flow chart of another method for warning of crop impurity content rate according to an embodiment of the present disclosure, and as shown in fig. 5, the method is applied to a device for warning of crop impurity content rate, and the method includes:
s501, determining the impurity rate of crops in at least two frames of images to be detected; the image to be detected is obtained on the basis of an image taken of the crop.
Wherein, the at least two frames of images to be detected are obtained based on the at least two frames of images shot for the crops; at least two frames of the shot images are shot in the process that the crops on the bearing device are transferred to the appointed placing area.
The crop impurity rate in each image of the at least two images can be determined, and the crop impurity rate in the at least two images can be determined based on the crop impurity rate in each image. The crop clutter ratio in at least two images can be an average of the crop clutter ratio in each image.
For example, at least two frames of images include an image a and an image B, and the impurity rate of the image a is determined to be 1%, and the impurity rate of the image B is determined to be 3%, and then the impurity rate of crops in the image a and the image B is determined to be 2%.
In some embodiments, the at least two images may include two images, which are respectively: the image shooting and image shooting are determined based on the fact that the image shooting is performed on the crop on the bearing device before the crop on the bearing device is transferred to the designated placement area, and the image shooting is determined based on the fact that the image shooting is performed on the crop on the designated placement area after the crop on the bearing device is transferred to the designated placement area. In other embodiments, the at least two frames of images may include at least three frames of images, and the at least three frames of images may be obtained by capturing at least three frames of images at set time intervals during the transfer of the crop on the carrying device to the designated placement area.
S502, performing variety detection on each image in at least two frames of images to be detected to obtain variety information of crops on the bearing device.
And performing variety detection on each image in at least two frames of images to be detected to obtain variety information of each crop corresponding to each image, and determining the variety information of the crop with the highest quantity as the variety information of the crop on the bearing device. For example, taking the crop is sugarcane as an example, when the at least two frames of images to be detected comprise an image C, an image D and an image E, determining that the variety information of the crop in the image C and the image D is sugarcane, and determining that the variety information of the crop on the bearing device is sugarcane when the variety information of the crop in the image E is sugarcane.
S503, determining a set impurity rate threshold value corresponding to the variety information.
S504, under the condition that the impurity rate in the crops is larger than the set impurity rate threshold value, alarm information indicating that the impurity rate in the crops is larger than the set impurity rate threshold value is output.
In the embodiment of the disclosure, the at least two frames of images to be detected are obtained based on the at least two frames of images shot for the crops, and the variety information of the crops on the bearing device is obtained by performing variety detection on each image in the at least two frames of images to be detected, so that the accuracy of determining the variety information of the crops on the bearing device can be improved, and the phenomenon that the accuracy of determining the crops on the bearing device is low due to the fact that the crops on the bearing device are shielded or placed at corners is reduced.
Fig. 6 is a schematic flow chart of an alarm method for crop impurity rate according to another embodiment of the present disclosure, as shown in fig. 6, the method is applied to an alarm device for crop impurity rate, and the method includes:
s601, receiving a shooting instruction sent by the sensing equipment under the condition that the sensing equipment senses that the object enters the first designated area.
The sensing device may be a detection device or a pressure sensing device arranged at the edge of the first designated area. The detection device may comprise an infrared detection device. For example, the infrared detection device may determine a distance between the target object and the infrared detection device, and in a case where the distance is within a set distance range, determine that the object enters the first designated area. For another example, the pressure sensing apparatus may determine that the object enters the first designated area in a case where the sensed pressure value is greater than the set pressure value.
In some embodiments, image capturing may be performed for the first designated area, and it is determined that the object enters the first designated area through a captured image.
The manner of determining whether the object is a carrying device for carrying crops can be determined by analyzing the multi-frame image obtained in S602.
And S602, responding to the shooting instruction, continuously shooting the first designated area to obtain multi-frame images.
The multi-frame image may be obtained by photographing the first designated area while the carrying device travels from outside the first designated area to inside the first designated area.
S603, determining the image to be detected, the bearing device for bearing the crop and the license plate information of the bearing device based on the multi-frame image.
In case the object is a carrying device carrying a crop, the license plate information of the carrying device may be determined.
In some embodiments, the camera may be disposed at an upper side of the first designated area, the carrying device for carrying the crop and the license plate information of the carrying device are determined through at least one previous frame of image in the plurality of frames of images, and the image to be detected is determined based on at least one frame of image taken after the at least one previous frame of image. In other embodiments, the cameras may include at least two groups of cameras, one group of cameras is disposed on the upper side of the first designated area to capture a captured image, and the captured image is captured based on the camera on the upper side of the first designated area to determine an image to be detected; the other group of cameras are arranged on the side edge of the first designated area, and the bearing device for bearing the crops and the license plate information of the bearing device are determined according to images shot by the cameras on the side edge of the first designated area.
S604, determining the impurity rate of crops matched with the license plate information of the bearing device in the image to be detected.
S605, performing variety detection on the crops in the image to be detected, and determining the variety information of the crops matched with the license plate information of the bearing device.
And S606, determining a set impurity rate threshold corresponding to the variety information.
S607, under the condition that the impurity rate in the crops is greater than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is greater than the set impurity rate threshold value.
In the embodiment of the disclosure, the license plate information of the bearing device is determined based on the multi-frame image, the impurity rate in the crop matched with the license plate information of the bearing device in the image to be detected is further determined, and the variety information of the crop matched with the license plate information of the bearing device is further determined, so that the impurity rate of the crop borne on the bearing device and the variety information of the crop can be further determined, the obtained impurity rate of the crop and the variety information of the crop are related to the license plate information of the bearing device for bearing the crop, and the data relevance of crop management is enhanced.
Fig. 7 is a schematic flow chart of an alarm method for crop impurity rate according to another embodiment of the present disclosure, as shown in fig. 7, the method is applied to an alarm device for crop impurity rate, and the method includes:
s701, determining the impurity rate of crops in the image to be detected; the image to be detected is obtained on the basis of an image taken of the crop.
S702, carrying out variety detection on the crops in the image to be detected, and determining the variety information of the crops.
And S703, determining a set impurity rate threshold value corresponding to the variety information.
S704, under the condition that the impurity rate in the crops is larger than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is larger than the set impurity rate threshold value.
S705, the placing position information of the crop corresponding to the variety information of the crop is determined.
The alarm device for the impurity percentage may store a second relationship table in which the variety information and the placement position information correspond to each other, so that the placement position information of the crop corresponding to the variety information of the crop may be determined based on the second relationship table. In the second relation table, one or at least two kinds of information may correspond to one placing position information, that is, each kind of information has one placing position information corresponding thereto.
The corresponding processing modes of the crops with different varieties of information may be different. For example, taking sugar cane as an example, the treatment modes of the sugar cane and the fruit cane are different, so that the sugar cane and the fruit cane can be placed at different positions, and the sugar cane and the fruit cane can be treated differently.
The placement location information of the crop may include at least one of: attribute information of the storehouse and placement position information of crops in the storehouse. For example, the F area of the second storehouse is placement position information of the crop.
And S706, outputting second prompt information of the information of placing the crops at the placing positions.
The warning device of the impurity rate can output second prompt information to at least one display device.
In some embodiments, the following steps may also be performed: determining at least one device associated with the placement location information; transmitting, to at least one device, at least one of: the information of the license plate of the bearing device for bearing the crops, the attribute information of an operator operating the bearing device, the variety information of the crops, the quality information of the crops, the impurity rate of the crops and the time length required for the crops to reach the placing position information.
The at least one device associated with the placement location information may include at least one of: a display screen in the storehouse, a display screen at a place where the storehouse is placed, and terminal equipment of a storehouse manager.
In this way, by sending the information related to the bearing device and/or the information related to the crop to the at least one device associated with the placing position information, the personnel corresponding to the at least one device can timely and correspondingly operate the crop on the bearing device based on the information related to the bearing device and/or the information related to the crop, so that the timeliness and the normalization of the crop placing are improved.
In the embodiment of the disclosure, the crop is placed in the second prompt information of the placement position information through the output, so that the operator of the bearing device can place the crop in the output placement position information based on the second prompt information, thereby improving the accuracy of the placement of the crop and improving the standardization of the warehousing of the crop.
Fig. 8 is a schematic flow chart of an alarm method for crop impurity rate according to yet another embodiment of the present disclosure, as shown in fig. 8, the method is applied to an alarm device for crop impurity rate, and the method includes:
s801, determining a designated image based on a shot image obtained by shooting the crop.
S802, detecting the crops in the designated image, obtaining the regional position information of the crops in the designated image, and obtaining the regional score corresponding to the regional position information.
And S803, based on the area position information of the crop in the designated image, determining an area image including the crop from the designated image.
And S804, determining the image to be detected based on the area image.
And S805, detecting impurities in the image to be detected through a detection network to obtain a detection result.
The detection result may include region area information of the impurity in the image to be detected.
And S806, determining the impurity content of the crops in the image to be detected based on the detection result.
And S807, performing variety detection on the crops in the image to be detected, and determining the variety information of the crops.
And S808, determining a set impurity rate threshold corresponding to the variety information.
And S809, outputting alarm information indicating that the impurity content in the crops is greater than the set impurity content threshold value under the condition that the impurity content in the crops is greater than the set impurity content threshold value.
And S810, acquiring the calculated impurity rate of the manually calculated crops under the condition that the area score is greater than the second area score threshold value.
In some embodiments, the calculated misconception rate for the artificially calculated crop may include: manually acquiring the area information of the rectangular frame of each impurity in the image to be detected and the category information of each impurity, and calculating to obtain the calculated impurity content of the crop based on the area information of the rectangular frame of each impurity, the category information of each impurity and the area information of the image to be detected. In other embodiments, the calculated misconception rate for the artificially calculated crop may include: manually obtaining the outline area information of each impurity in the image to be detected and the category information of each impurity, and calculating to obtain the calculated impurity content of the crop based on the outline area information of each impurity, the category information of each impurity and the outline area information of the crop in the image to be detected.
In the case that the region score is greater than the second region score threshold, may issue an inclusion rate confirmation message to the display device, the display device displaying the input information for calculating the inclusion rate in response to the inclusion rate confirmation message; the user can carry out input operation aiming at the input information displayed by the display device, so that the display device generates an input instruction based on the input operation of the user, and the alarm device for the impurity rate in the crops can respond to the input instruction sent by the display device to obtain and calculate the impurity rate.
S811, training a detection network based on the image to be detected and the calculated trash content of the crops under the condition that the difference degree between the trash content of the crops and the calculated trash content of the crops is larger than the set difference degree.
In the embodiment of the disclosure, under the condition that the area score corresponding to the area position information of the crop is low, the calculated impurity rate of the crop is calculated manually, and the detection network for detecting the impurities is trained through the calculated impurity rate of the crop, so that the accuracy of the detection network for detecting the subsequent impurities can be improved.
Fig. 9 is a schematic flow chart of another method for warning of crop impurity rate according to another embodiment of the present disclosure, and as shown in fig. 9, the method is applied to a device for warning of crop impurity rate, and the method includes:
s901, determining a designated image based on a shot image obtained by shooting the crop.
S902, detecting the crops in the designated image, obtaining the regional position information of the crops in the designated image, and obtaining the regional score corresponding to the regional position information.
And S903, determining the area image including the crop from the designated image based on the area position information of the crop in the designated image.
And S904, determining an image to be detected based on the region image.
S905, determining the impurity rate of crops in the image to be detected.
S906, performing variety detection on the crops in the image to be detected through the classification network, and determining at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively.
The highest confidence matched breed information may be determined based on the at least two breed information and the corresponding at least two confidences.
And S907, determining a set impurity rate threshold corresponding to the variety information matched with the highest confidence coefficient.
In other embodiments, S907 may instead determine a set impurity rate threshold corresponding to at least two varieties information.
And S908, outputting alarm information indicating that the impurity content in the crops is greater than the set impurity content threshold value under the condition that the impurity content in the crops is greater than the set impurity content threshold value.
And S909, acquiring the input variety information obtained in response to the input operation of the variety information of the crop when the region score is greater than the third region score threshold and the highest confidence of the at least two confidences is less than the confidence threshold.
And under the condition that the region score is greater than the third region score threshold value and the highest confidence coefficient of at least two confidence coefficients is less than the confidence coefficient threshold value, the variety confirmation information can be sent to the display device, the display device responds to the variety confirmation information to display the variety input information, and the user can perform input operation on the variety input information displayed by the display device, so that the display device can generate a target instruction based on the input operation of the user, and the warning device for the impurity rate in crops can respond to the target instruction sent by the display equipment to acquire the input variety information.
S910, training a classification network based on the image to be detected and the input variety information.
In the embodiment of the disclosure, in the case that the region score corresponding to the region position information of the crop is high, and the highest confidence of the at least two confidence levels respectively corresponding to the at least two variety information is low, the variety information of the crop is manually input, and the classification network for classifying the crop is trained through the input variety information, so that the accuracy of classifying subsequent crops by the classification network can be improved.
Taking a crop as an example, the method for detecting the variety of the crop in the image to be detected and determining the variety information of the crop in the embodiment of the disclosure can be realized through the following steps: firstly, a driver can stop a vehicle carrying sugarcane in a designated area (corresponding to the first designated area), trigger a license plate recognition algorithm, and after the license plate recognition algorithm is triggered, a camera captures the sugarcane vehicle. Then, after obtaining the sugarcane image (corresponding to the shot image) shot by the camera, preprocessing (for example, at least one of the following processing: cutting, denoising, normalization conversion, color conversion, translation, zooming, turning, rotating and cutting) is performed on the sugarcane image to obtain an image to be recognized (corresponding to the specified image). And then, inputting the image to be identified into a sugarcane area detection network to obtain a cut sugarcane area image (corresponding to the image to be detected). And inputting the sugarcane region image into a sugarcane variety identification network, and outputting the variety of the sugarcane.
The deep neural network (e.g., at least one of the first detection network, the second detection network, the sugarcane region detection network, the sugarcane variety identification network and the sugarcane impurity detection network) in the embodiment of the disclosure can be deployed in the edge computing node, and the sugarcane variety can be subjected to real-time quality inspection through the edge computing node, so that variety information of crops can be rapidly determined.
Fig. 10 is a schematic flow chart of determining a variety of sugar cane according to an embodiment of the present disclosure, and as shown in fig. 10, the method includes:
s1001, acquiring a snapshot sugarcane image, and preprocessing the sugarcane image.
Before S1001, there may be the following step: and the vehicle bearing the sugarcane stops in a designated area, a license plate recognition algorithm is triggered, and the camera captures the vehicle bearing the sugarcane.
The sugarcane image in the embodiment of the disclosure is obtained by shooting a quality inspection vehicle with sugarcane by a camera suspended in a sugarcane quality inspection area (which may correspond to the first designated area). The vehicle passes through the designated sugarcane quality inspection area, the camera shoots the image and returns the shot image to the edge computing node. The sugarcane image preprocessing may include at least one of: clipping, denoising, normalization conversion, color conversion, translation, scaling, flipping, rotation, clipping, and the like.
S1002, detecting the preprocessed image by using a sugarcane region detection network, judging whether sugarcane exists or not, and cutting out sugarcane region images if sugarcane exists.
The input of the sugarcane area detection network is the acquired snapshot image to be detected, and the output is the cut sugarcane area. In order to more accurately identify the sugarcane species, a target detection algorithm is firstly used for accurately positioning the sugarcane region, and meanwhile, the score of the region is output. And filtering some snapshot images without sugarcane and snapshot images with undersized sugarcane areas through whether the area detection score is larger than a preset threshold value. And (4) accurately positioning by a detection network, and inputting the cut sugarcane region image into a sugarcane classification network.
After S1002, S1003 and/or S1004 may be performed.
S1003, sugarcane is classified according to the sugarcane region image by using a sugarcane variety recognition network, and varieties of the sugarcane are recognized.
The sugarcane variety identification network may correspond to the classification network described above. The input of the sugarcane variety identification network is the cut sugarcane area, and the output is the variety corresponding to the sugarcane image. And after the cut sugarcane region image is obtained, adjusting the size of the image to a specific scale, normalizing the sugarcane image by using the variance and the mean value of the pre-training network, inputting the image into a sugarcane variety recognition network to obtain the confidence coefficient of each category of the sugarcane image, and selecting the category with the highest confidence coefficient as the finally recognized variety to be output.
S1004, under the condition that the region detection score of the sugarcane region is larger than the detection threshold value and the highest confidence coefficient is smaller than the image of the classification threshold value, acquiring the sugarcane type in the image to be detected which is determined manually, and training the sugarcane variety identification network based on the sugarcane type which is determined manually.
The images with the region detection score greater than the detection threshold and the highest confidence less than the classification threshold in the sugarcane region may correspond to the region score greater than the third region score threshold, and the highest confidence of the at least two confidences is less than the confidence threshold.
After the captured images are subjected to region detection and variety identification, the scores of the region detection and the varieties of the sugarcanes can be obtained, and the scores corresponding to the corresponding varieties can be obtained. And (3) manually confirming the sugarcane type of the image with the region detection score larger than the detection threshold and the highest confidence coefficient smaller than the classification threshold, adding the image into the algorithm training, and continuously improving the algorithm precision by accumulating data.
Fig. 11 is a schematic flow chart of another method for determining a variety of sugar cane according to an embodiment of the present disclosure, as shown in fig. 11, the method includes:
s1101, acquiring a shot image.
And S1102, inputting the shot image to a sugarcane area detector to obtain a rectangular frame area corresponding to the sugarcane.
S1103, cutting the rectangular frame area corresponding to the sugarcane in the shot image to obtain the image to be detected.
And S1104, inputting the image to be detected into a sugarcane variety identification network.
After S1004, S1105 may be performed, and/or S1106 may be performed.
And S1105, outputting the sugarcane varieties through a sugarcane variety identification network.
S1106, obtaining the manually determined sugarcane type in the image to be detected, and training the sugarcane variety recognition network based on the manually determined sugarcane type.
Fig. 12a is a schematic diagram of a shot image provided by an embodiment of the disclosure, fig. 12b is a schematic diagram of a rectangular frame of a crop in the shot image provided by the embodiment of the disclosure, and fig. 12c is a schematic diagram of an image to be detected provided by the embodiment of the disclosure, as shown in fig. 12a to 12c, the image to be detected is an image corresponding to the rectangular frame of the crop in the shot image.
Based on the foregoing embodiments, the embodiments of the present disclosure provide an alarm device for crop impurity rate, where the device includes units and modules included in the units, and may be implemented by a processor in the alarm device for crop impurity rate; of course, it may be implemented by a specific logic circuit.
Fig. 13 is a schematic structural diagram illustrating a composition of an alarm device for crop impurity content rate according to an embodiment of the present disclosure, and as shown in fig. 13, an alarm device 1300 for crop impurity content rate includes:
the first determining unit 1301 is used for determining the impurity content of crops in the image to be detected; the image to be detected is obtained based on an image shot for the crop;
a second determining unit 1302, configured to perform variety detection on a crop in the image to be detected, and determine variety information of the crop;
a third determining unit 1303 for determining a set impurity rate threshold corresponding to the variety information;
an output unit 1304, configured to output alarm information indicating that the impurity content rate in the crop is greater than the set impurity content rate threshold value when the impurity content rate in the crop is greater than the set impurity content rate threshold value.
In some embodiments, the apparatus 1300 for warning of trash content in crops further comprises: an obtaining unit 1305, configured to: determining a designated image based on a shot image obtained by shooting a crop; detecting the crops in the designated image to obtain the regional position information of the crops in the designated image; determining an area image including the crop from the designated image based on the area position information of the crop in the designated image; and determining an image to be detected based on the area image.
In some embodiments, the second determining unit 1302 is further configured to: performing variety detection on crops in an image to be detected to obtain at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively; and determining the first variety information corresponding to the highest confidence coefficient as the variety information of the crop under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is greater than a preset threshold value.
In some embodiments, the second determining unit 1302 is further configured to: under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is smaller than or equal to a preset threshold value, outputting first variety information and second variety information; and determining the target variety information as the variety information of the crop in response to an operation instruction obtained by performing a trigger operation on the target variety information of the first variety information and the second variety information.
In some embodiments, the second determining unit 1302 is further configured to: performing variety detection on the crops in the image to be detected, and determining at least two varieties of information of the crops in the image to be detected and at least two pieces of proportion information respectively corresponding to the at least two varieties of information; the third determining unit 1303 is further configured to: and determining a set impurity rate threshold corresponding to the at least two kinds of variety information based on the at least two kinds of variety information and the at least two kinds of proportion information.
In some embodiments, the output unit 1304 is further configured to: under the condition that the difference value between the highest proportion information and the target proportion information in the at least two proportion information is smaller than a target threshold value, outputting first prompt information; wherein, the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information; the first prompt message is used for prompting: the difference between the highest proportion information and the target proportion information is less than the target threshold.
In some embodiments, the image to be detected comprises: at least two frames of images to be detected; the at least two frames of images to be detected are obtained based on at least two frames of photographed images of the crops; at least two frames of shot images are shot in the process that the crops on the bearing device are transferred to the appointed placing area; a second determining unit 1302, further configured to: and performing variety detection on each image in the at least two frames of images to be detected to obtain variety information of the crops on the bearing device.
In some embodiments, the obtaining unit 1305 is further configured to: receiving a shooting instruction sent by sensing equipment under the condition that the sensing equipment senses that an object enters a first designated area; responding to a shooting instruction, and continuously shooting a first designated area to obtain a plurality of frames of images; determining an image to be detected, a bearing device for bearing crops and license plate information of the bearing device based on a plurality of frames of images; the first determining unit 1301 is further configured to: determining the impurity content of crops matched with the license plate information of the bearing device in the image to be detected; a second determining unit 1302, further configured to: and determining the variety information of the crops matched with the license plate information of the bearing device.
In some embodiments, the output unit 1304 is further configured to: determining placement position information of the crops corresponding to the variety information of the crops; and outputting second prompt information of the information of placing the crops at the placing positions.
In some embodiments, the output unit 1304 is further configured to: determining at least one device associated with the placement location information; transmitting, to at least one device, at least one of: the information of the license plate of the bearing device for bearing the crops, the attribute information of an operator operating the bearing device, the variety information of the crops, the quality information of the crops, the impurity rate of the crops and the time length required for the crops to reach the placing position information.
In some embodiments, specifying the image comprises: at least one frame of sub-images; the obtaining unit 1305 is further configured to: respectively detecting the crops in at least one frame of sub-images to obtain the regional position information of the crops and the regional score corresponding to the regional position information in each sub-image, or indicating information of the regional position information of the crops does not exist; acquiring a target sub-image corresponding to at least one region score which is larger than a first region score threshold value from at least one frame of sub-image; and determining an area image comprising the crop from the target sub-image based on the area position information of the crop in the target sub-image.
In some embodiments, the first determining unit 1301 is further configured to: detecting impurities in an image to be detected through a detection network to obtain a detection result; determining the impurity content of crops in the image to be detected based on the detection result; the warning device 1300 for the trash content in crops further comprises: a training unit 1306, configured to: acquiring a region score corresponding to the region position information; under the condition that the area score is larger than a second area score threshold value, acquiring the calculated impurity rate of the artificially calculated crops; and training a detection network based on the calculated impurity rate of the image to be detected and the crops under the condition that the difference degree between the impurity rate in the crops and the calculated impurity rate of the crops is greater than the set difference degree.
In some embodiments, the obtaining unit 1305 is further configured to: performing variety detection on crops in an image to be detected through a classification network, and determining at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively; training unit 1306, further configured to: acquiring a region score corresponding to the region position information; under the condition that the region score is greater than a third region score threshold value and the highest confidence coefficient of at least two confidence coefficients is less than a confidence coefficient threshold value, acquiring input variety information obtained by responding to input operation on the variety information of the crops; and training a classification network based on the image to be detected and the input variety information.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present disclosure, reference is made to the description of the embodiments of the method of the present disclosure.
It should be noted that, in the embodiment of the present disclosure, if the method for warning the impurity rate in the crop is implemented in the form of a software functional module, and is sold or used as an independent product, the method may also be stored in a computer storage medium. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing an alarm device of a crop impurity rate to execute all or part of the methods of the embodiments of the present disclosure.
Fig. 14 is a schematic diagram of a hardware entity of an alarm device for crop impurity rate provided in an embodiment of the present disclosure, and as shown in fig. 14, the hardware entity of the alarm device 1400 for crop impurity rate includes: a processor 1401 and a memory 1402, wherein the memory 1402 stores a computer program operable on the processor 1401, and the processor 1401 implements the steps in the method of any of the embodiments described above when executing the program.
The Memory 1402 stores a computer program executable on the processor, and the Memory 1402 is configured to store instructions and applications executable by the processor 1401, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the alerting device 1400 for the clutter percentage in the crops and the processor 1401, which may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 1401, when executing the program, realizes the steps of the method for warning of the trash content in a crop according to any one of the above. The processor 1401 generally controls the overall operation of the alert device 1400 of the clutter rate in the crop.
The present disclosure provides a computer storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the method for warning of the trash content in crops according to any of the above embodiments.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present disclosure, reference is made to the description of the embodiments of the method of the present disclosure.
The warning device, chip or processor for the trash content in the crops may include an integration of any one or more of the following: an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), an embedded neural Network Processing Unit (NPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device implementing the above processor function may be other, and the embodiments of the present disclosure are not particularly limited.
The computer storage medium/Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), and the like; but may also be various terminals such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment of the present disclosure" or "a previous embodiment" or "some implementations" or "some embodiments" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of the phrase "in one embodiment" or "in an embodiment" or "the presently disclosed embodiment" or "the foregoing embodiments" or "some implementations" or "some embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present disclosure, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description and do not represent the merits of the embodiments.
In a case where no specific description is made, the warning device for the trash content in the crop performs any step in the embodiments of the present disclosure, and the processor of the warning device for the trash content in the crop may perform the step. Unless otherwise specified, the disclosed embodiments do not limit the sequence of the following steps executed by the alarm device for the trash content in the crops. In addition, the data may be processed in the same way or in different ways in different embodiments. It should be further noted that, in any step in the embodiments of the present disclosure, the warning device for the impurity rate in the crop may be executed independently, that is, when the warning device for the impurity rate in the crop executes any step in the embodiments, it may not depend on the execution of other steps.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or 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.
In addition, all the functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The methods disclosed in the several method embodiments provided in this disclosure may be combined arbitrarily without conflict to arrive at new method embodiments.
Features disclosed in several of the product embodiments provided in this disclosure may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in this disclosure may be combined in any combination to arrive at a new method or apparatus embodiment without conflict.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated units of the present disclosure may be stored in a computer storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several 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 methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
In the embodiments of the present disclosure, the descriptions of the same steps and the same contents in different embodiments may be mutually referred to. In the embodiment of the present disclosure, the term "and" does not affect the sequence of the steps, for example, the warning device of the crop impurity rate performs a and performs B, where a and B are performed first by the warning device of the crop impurity rate, or B and a are performed first by the warning device of the crop impurity rate, or B is performed simultaneously with a by the warning device of the crop impurity rate.
As used in the disclosed embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be noted that, in the embodiments of the present disclosure, all the steps may be executed or some of the steps may be executed, as long as a complete technical solution can be formed.
The above description is only an embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (16)

1. A method for alarming the trash content in crops comprises the following steps:
determining the impurity rate of crops in the image to be detected; the image to be detected is obtained based on the image shot for the crop;
performing variety detection on the crops in the image to be detected, and determining variety information of the crops;
determining a set impurity rate threshold corresponding to the variety information;
and under the condition that the impurity rate in the crops is greater than the set impurity rate threshold value, outputting alarm information indicating that the impurity rate in the crops is greater than the set impurity rate threshold value.
2. The method of claim 1, wherein the method further comprises:
determining a designated image based on a shot image obtained by shooting the crop;
detecting the crops in the designated image to obtain the regional position information of the crops in the designated image;
determining an area image including the crop from the designated image based on area position information of the crop in the designated image;
and determining the image to be detected based on the area image.
3. The method according to claim 1 or 2, wherein the detecting variety of the crop in the image to be detected and determining the variety information of the crop comprises:
performing variety detection on the crops in the image to be detected to obtain at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively;
and determining the first variety information corresponding to the highest confidence coefficient as the variety information of the crop under the condition that the difference value between the highest confidence coefficient and the second highest confidence coefficient in the at least two confidence coefficients is larger than a preset threshold value.
4. The method of claim 3, wherein the method further comprises:
outputting the first variety information and the second variety information when the difference between the highest confidence degree and the second highest confidence degree is less than or equal to the preset threshold value in the at least two confidence degrees;
and determining the target variety information as the variety information of the crop in response to an operation instruction obtained by performing a trigger operation on the target variety information of the first and second variety information.
5. The method according to any one of claims 1 to 4, wherein the detecting variety of the crop in the image to be detected and determining the variety information of the crop comprises:
performing variety detection on the crops in the image to be detected, and determining at least two kinds of variety information of the crops in the image to be detected and at least two kinds of proportion information respectively corresponding to the at least two kinds of variety information;
the determining of the set impurity rate threshold corresponding to the variety information includes:
and determining the set impurity rate threshold corresponding to the at least two kinds of variety information based on the at least two kinds of variety information and the at least two kinds of proportion information.
6. The method of claim 5, wherein the method further comprises:
under the condition that the difference value between the highest proportion information and the target proportion information in the at least two proportion information is smaller than a target threshold value, outputting first prompt information;
wherein the target proportion information is: the sum of other proportion information except the highest proportion information in the at least two proportion information;
the first prompt message is used for prompting: the difference between the highest proportion information and the target proportion information is smaller than the target threshold.
7. The method according to any one of claims 1 to 6, wherein the image to be detected comprises: at least two frames of images to be detected; the at least two frames of images to be detected are obtained based on at least two frames of shot images of the crops; the at least two frames of shot images are shot in the process that the crops on the bearing device are transferred to the appointed placing area;
the variety detection is carried out on the crops in the image to be detected, and the variety information of the crops is determined, and the method comprises the following steps:
and performing variety detection on each image in the at least two frames of images to be detected to obtain variety information of the crops on the bearing device.
8. The method of any of claims 1 to 7, wherein the method further comprises:
receiving a shooting instruction sent by sensing equipment under the condition that the sensing equipment senses that an object enters a first designated area;
responding to the shooting instruction, and continuously shooting the first designated area to obtain a plurality of frames of images;
determining the image to be detected, a bearing device bearing the crop and license plate information of the bearing device based on the multi-frame image;
the method for determining the impurity content of the crops in the image to be detected comprises the following steps: determining the impurity content rate of the crops matched with the license plate information of the bearing device in the image to be detected;
the determining variety information of the crop comprises: and determining the variety information of the crops matched with the license plate information of the bearing device.
9. The method of any of claims 1 to 8, wherein the method further comprises:
determining placement position information of the crop corresponding to the variety information of the crop;
and outputting second prompt information of the placement position of the crop.
10. The method of claim 9, wherein the method further comprises:
determining at least one device associated with the placement location information;
transmitting, to the at least one device, at least one of: the information of the license plate of the bearing device for bearing the crops, the attribute information of an operator operating the bearing device, the variety information of the crops, the quality information of the crops, the impurity rate of the crops and the time required for the crops to reach the placing position information.
11. The method of claim 2, wherein the designating an image comprises: at least one frame of sub-images; the detecting the crop in the designated image to obtain the area position information of the crop in the designated image includes:
respectively detecting the crops in the at least one frame of sub-images to obtain the area position information of the crops and the area score corresponding to the area position information in each sub-image, or indicating information of the area position information of the crops does not exist;
the determining, from the designated image, an area image including the crop based on the area position information of the crop in the designated image includes:
acquiring a target sub-image corresponding to at least one region score which is larger than a first region score threshold value from at least one frame of sub-image;
and determining the area image comprising the crop from the target sub-image based on the area position information of the crop in the target sub-image.
12. The method as claimed in claim 2 or 11, wherein said determining the trash content in the crop in the image to be detected comprises:
detecting the impurities in the image to be detected through a detection network to obtain a detection result;
determining the impurity content of the crops in the image to be detected based on the detection result;
the method further comprises the following steps:
acquiring a region score corresponding to the region position information;
under the condition that the region score is larger than a second region score threshold value, acquiring the calculated impurity rate of the crop, which is calculated manually;
and training the detection network based on the image to be detected and the calculated trash content of the crops under the condition that the difference degree between the trash content of the crops and the calculated trash content of the crops is greater than the set difference degree.
13. The method according to any one of claims 2, 11 or 12, wherein the detecting varieties of the crops in the image to be detected and determining the variety information of the crops comprises:
performing variety detection on the crops in the image to be detected through a classification network, and determining at least two variety information and at least two confidence degrees corresponding to the at least two variety information respectively;
the method further comprises the following steps:
acquiring a region score corresponding to the region position information;
acquiring input variety information obtained in response to an input operation on the variety information of the crop under the condition that the region score is greater than a third region score threshold and the highest confidence coefficient of the at least two confidence coefficients is less than a confidence coefficient threshold;
and training the classification network based on the image to be detected and the input variety information.
14. An alarm device for trash content in crops, comprising:
the first determining unit is used for determining the impurity rate of crops in the image to be detected; the image to be detected is obtained based on the image shot for the crop;
the second determining unit is used for carrying out variety detection on the crops in the image to be detected and determining the variety information of the crops;
a third determination unit configured to determine a set impurity content threshold value corresponding to the item information;
and the output unit is used for outputting alarm information indicating that the impurity content rate in the crops is greater than the set impurity content rate threshold value under the condition that the impurity content rate in the crops is greater than the set impurity content rate threshold value.
15. An apparatus for warning of trash content in crops comprising: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 13.
16. A computer storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the method of any one of claims 1 to 13.
CN202110711348.1A 2021-06-25 2021-06-25 Method, device and equipment for alarming impurity rate in crops and computer storage medium Pending CN113469009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110711348.1A CN113469009A (en) 2021-06-25 2021-06-25 Method, device and equipment for alarming impurity rate in crops and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110711348.1A CN113469009A (en) 2021-06-25 2021-06-25 Method, device and equipment for alarming impurity rate in crops and computer storage medium

Publications (1)

Publication Number Publication Date
CN113469009A true CN113469009A (en) 2021-10-01

Family

ID=77873028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110711348.1A Pending CN113469009A (en) 2021-06-25 2021-06-25 Method, device and equipment for alarming impurity rate in crops and computer storage medium

Country Status (1)

Country Link
CN (1) CN113469009A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049722A (en) * 2022-06-13 2022-09-13 中国热带农业科学院农业机械研究所 Intelligent identification method for machine-harvested sugarcane impurities

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049722A (en) * 2022-06-13 2022-09-13 中国热带农业科学院农业机械研究所 Intelligent identification method for machine-harvested sugarcane impurities

Similar Documents

Publication Publication Date Title
CN109886130B (en) Target object determination method and device, storage medium and processor
He et al. Application of deep learning in integrated pest management: a real‐time system for detection and diagnosis of oilseed rape pests
CN109948497B (en) Object detection method and device and electronic equipment
US8401292B2 (en) Identifying high saliency regions in digital images
CN111797657A (en) Vehicle peripheral obstacle detection method, device, storage medium, and electronic apparatus
CN113052029A (en) Abnormal behavior supervision method and device based on action recognition and storage medium
Saydirasulovich et al. An improved wildfire smoke detection based on YOLOv8 and UAV images
CN110723432A (en) Garbage classification method and augmented reality equipment
CN109843034B (en) Yield prediction for grain fields
CN110619324A (en) Pedestrian and safety helmet detection method, device and system
US20230022554A1 (en) Automatic pressure ulcer measurement
Xu et al. A lightweight SSV2-YOLO based model for detection of sugarcane aphids in unstructured natural environments
CN110688883A (en) Vehicle and pedestrian detection method and device
Singh et al. Performance evaluation of plant leaf disease detection using deep learning models
CN113837316B (en) Abnormal region detection method, device, equipment and medium based on agricultural products
CN111753766B (en) Image processing method, device, equipment and medium
CN113469009A (en) Method, device and equipment for alarming impurity rate in crops and computer storage medium
CN116863286A (en) Double-flow target detection method and model building method thereof
Yang et al. Efficient Detection of Forest Fire Smoke in UAV Aerial Imagery Based on an Improved Yolov5 Model and Transfer Learning
Sethuraman et al. iDrone: IoT-Enabled unmanned aerial vehicles for detecting wildfires using convolutional neural networks
Doan An efficient system for real-time mobile smart device-based insect detection
Subeesh et al. UAV imagery coupled deep learning approach for the development of an adaptive in-house web-based application for yield estimation in citrus orchard
CN113012220A (en) Fruit counting method and device and electronic equipment
US10984536B2 (en) Motion detection in digital images and a communication method of the results thereof
CN115116136A (en) Abnormal behavior detection method, device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination