Method for determining a health score of a plant and electronic device
The plant health scoring model trained by triplet contrastive learning solves the problem of difficulty in assessing plant health status in existing technologies, realizes accurate health scoring and automated maintenance solutions, and improves user maintenance efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU RUISHENG SOFTWARE CO LTD
- Filing Date
- 2025-07-14
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies are insufficient to effectively and accurately assess the health status of plants, making it difficult for users to take timely and effective maintenance measures.
A plant health rating model is trained using a triplet contrastive learning method. By acquiring plant images, the model is trained using triplet data to determine the plant's health rating. The rating is then presented in conjunction with a user interface to generate a maintenance plan and automatically control the maintenance device to perform the task.
It enables detailed assessment and accurate judgment of plant health status, provides personalized maintenance solutions, reduces user burden, and improves maintenance efficiency.
Smart Images

Figure CN120766066B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information processing technology, and more specifically, to a method for determining a plant health score, electronic devices, computer-readable storage media and computer program products, and also to a maintenance system. Background Technology
[0002] As living standards improve, more and more people are starting to cultivate plants. Because plants may experience various growth events during their development, it is necessary to constantly monitor their health in order to better care for them. Summary of the Invention
[0003] A brief overview of this disclosure is given below to provide a basic understanding of some aspects of it. However, it should be understood that this overview is not an exhaustive summary of this disclosure. It is not intended to identify key or essential parts of this disclosure, nor is it intended to limit the scope of this disclosure. Its purpose is merely to present certain concepts of this disclosure in a simplified form as a prelude to the more detailed description that follows.
[0004] According to a first aspect of this disclosure, a method for determining a plant health score is provided, comprising: acquiring a plant image; determining a plant health score based on the acquired plant image by a plant health score model, wherein the plant health score model is trained using triplet contrastive learning based on triplet data, the triplet data including a first plant image labeled with a first health score as an anchor sample, a second plant image labeled with a second health score as a positive sample, and a third plant image labeled with a third health score as a negative sample, the difference between the second health score and the first health score being smaller than the difference between the third health score and the first health score; and presenting the determined plant health score on a user interface.
[0005] In some embodiments, the method further includes determining the species of the plant based on the acquired plant images by a plant health scoring model before determining the plant health score based on the plant images, wherein the plant health scoring model is trained based on labeled plant species data.
[0006] In some embodiments, the triplet data includes triplet data of multiple groups of plants of different species, wherein the anchor sample, positive sample and negative sample in the same triplet data are plant images of the same species.
[0007] In some embodiments, determining a plant health score based on an acquired plant image by a plant health scoring model includes: selecting a plant image labeled with a first specified health score from a database according to the plant species, wherein the plant in the first reference image is of the same species as the plant; determining the similarity between the plant image and the first reference image; and determining the plant health score as the first specified health score in response to determining that the similarity is greater than a preset similarity threshold.
[0008] In some embodiments, determining the plant health score based on the acquired plant image by the plant health scoring model further includes: in response to determining that the similarity is not greater than a preset threshold, selecting other plant images with the label "second specified health score" from the database as second reference images, wherein the plants in the second reference images are of the same species and the second specified health score is different from the first specified health score; determining the similarity between the plant image and the second reference image; and in response to determining that the similarity is greater than a preset similarity threshold, determining the plant health score as the second specified health score.
[0009] In some embodiments, the plant health scoring model includes multiple classification heads, each corresponding to a different health score. Determining the plant health score based on an acquired plant image by the plant health scoring model includes: extracting an embedding vector from the acquired plant image; for each of the multiple classification heads: determining the probability that the plant's health score exceeds the health score corresponding to that classification head based on the embedding vector; comparing the determined probability with a preset probability threshold; outputting a first value if the determined probability is not less than the preset probability threshold, or outputting a second value different from the first value if the determined probability is less than the preset probability threshold; and determining the plant health score based on the outputs of the multiple classification heads.
[0010] In some embodiments, plant images include multiple plant images of the same plant at multiple growth stages.
[0011] In some embodiments, the plant health scoring model is trained using triplet contrastive learning based on triplet data, including: calculating a first embedding vector for anchor samples, a second embedding vector for positive samples, and a third embedding vector for negative samples; calculating the distance between the first and second embedding vectors and the distance between the first and third embedding vectors; and updating the parameters in the plant health scoring model according to a loss function until the distance between the first and second embedding vectors obtained by the updated plant health scoring model is less than the distance between the first and third embedding vectors and a preset interval is maintained.
[0012] In some embodiments, the method includes: generating a maintenance plan based on a determined plant health score, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks; and outputting the maintenance plan.
[0013] In some embodiments, the method includes controlling a corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task.
[0014] According to a second aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing computer-executable instructions, which, when executed by the processor, cause the processor to perform a method for determining a plant health score according to any embodiment of the first aspect of this disclosure.
[0015] According to a third aspect of this disclosure, a computer-readable storage medium is provided having computer-executable instructions stored thereon, which, when executed by a computer, cause the computer to perform a method for determining a plant health score according to any embodiment of the first aspect of this disclosure.
[0016] According to a fourth aspect of this disclosure, a computer program product is provided, the computer program product including instructions that, when executed by a processor, implement the method for determining a plant health score according to any embodiment of the first aspect of this disclosure.
[0017] According to a fifth aspect of this disclosure, a maintenance system is provided, comprising: an acquisition module configured to acquire plant images; and a scoring module configured to determine a plant health score based on the acquired plant images using a plant health scoring model, wherein the plant health scoring model is trained using triplet data and a triplet contrastive learning method, the triplet data including a first plant image labeled with a first health score as an anchor sample, a second plant image labeled with a second health score as a positive sample, and a third plant image labeled with a third health score as a negative sample, wherein the difference between the second health score and the first health score is specified. The difference is less than the difference between the third health score and the first health score; a presentation module is configured to present the determined plant health score on a user interface; a maintenance plan generation module is configured to generate a maintenance plan based on the determined plant health score, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks; a control module is configured to control the corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task; and an execution module includes a maintenance device communicatively coupled to the control module, the maintenance device being configured to perform the maintenance task in response to receiving a command from the control module. Attached Figure Description
[0018] The foregoing and other features and advantages of this disclosure will become clear from the following description of embodiments illustrated in conjunction with the accompanying drawings. The drawings, incorporated herein and forming a part of the specification, are further used to explain the principles of this disclosure and to enable those skilled in the art to make and use it. Wherein:
[0019] Figure 1 A flowchart is shown illustrating a method for determining a plant health score according to some embodiments of the present disclosure;
[0020] Figure 2 A schematic diagram of an exemplary user interface for a method for determining a plant health score according to some embodiments of the present disclosure is shown;
[0021] Figure 3 A schematic diagram of an exemplary user interface for a method for determining a plant health score according to some embodiments of the present disclosure is shown;
[0022] Figure 4 A schematic diagram of an exemplary user interface for a method for determining a plant health score according to some embodiments of the present disclosure is shown;
[0023] Figure 5 A schematic block diagram of an electronic device according to some embodiments of the present disclosure is shown;
[0024] Figure 6 A schematic block diagram of a computer system on which embodiments of the present disclosure may be implemented is shown;
[0025] Figure 7 A schematic block diagram of a maintenance system according to some embodiments of the present disclosure is shown.
[0026] Note that in the embodiments described below, the same reference numerals are sometimes used across different figures to denote the same parts or parts with the same function, and repeated descriptions are omitted. In some cases, similar reference numerals and letters are used to denote similar items, so once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0027] For ease of understanding, the positions, dimensions, and extents of the structures shown in the accompanying drawings and other materials may not represent actual positions, dimensions, and extents. Therefore, this disclosure is not limited to the positions, dimensions, and extents disclosed in the accompanying drawings and other materials. Detailed Implementation
[0028] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0029] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this disclosure or its application or use. That is, the structures and methods herein are shown in an exemplary manner to illustrate different embodiments of the structures and methods in this disclosure. However, those skilled in the art will understand that they merely illustrate exemplary ways that can be used to implement this disclosure, and not exhaustive ways. Furthermore, the drawings are not necessarily drawn to scale, and some features may be enlarged to show details of specific components.
[0030] In addition, techniques, methods and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods and equipment should be considered part of the specification.
[0031] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0032] This disclosure provides a method for determining the health score of a plant, which automatically processes plant images to determine the plant's health score by using a plant health score model trained using a triplet contrastive learning method based on triplet data, thereby providing the determined plant health score to the user so that the user can clearly understand the health status of the plant they are cultivating, thus facilitating the user to better cultivate the plant.
[0033] The method for determining a plant health score according to this disclosure will now be described in detail with reference to the accompanying drawings. It should be understood that actual methods for determining a plant health score may include other additional steps, but to avoid obscuring the key points of this disclosure, these additional steps will not be discussed herein and are not shown in the accompanying drawings.
[0034] Figure 1 A flowchart of a method for determining a plant health score (hereinafter referred to as "method 100") according to some embodiments of the present disclosure is shown. Method 100 can be executed by an application (APP) installed on an electronic device such as a computer or mobile phone to provide a user with the function of determining a plant health score. Figure 1 As shown, method 100 includes steps S102 to S106.
[0035] In step S102, a plant image is acquired.
[0036] In step S104, the plant health rating model determines the plant health rating based on the acquired plant images. The plant health rating model is trained using triplet learning based on triplet data. The triplet data includes a first plant image with a first health rating as an anchor sample, a second plant image with a second health rating as a positive sample, and a third plant image with a third health rating as a negative sample. The difference between the second health rating and the first health rating is smaller than the difference between the third health rating and the first health rating.
[0037] In step S106, the determined health score of the plant is presented on the user interface.
[0038] In some embodiments, plant images may be input by a user. In other embodiments, plant images may be automatically captured and input by a visual monitoring device (e.g., a camera).
[0039] In some embodiments, plant images may include one or more plant images of the same plant. In some examples, plant images include at least one of the following: plant images that can present the overall appearance of the plant, plant images that can present the appearance of the growing parts of the plant, and plant images that can present the appearance of the diseased parts of the plant. That is, plant images can provide sufficient information for the plant health scoring model to determine the plant's health score.
[0040] In some embodiments, plant images may also include multiple plant images of the same plant at multiple growth stages, thereby allowing observation of changes in the plant's health status at these multiple growth stages, enabling the understanding of the plant's dynamic growth and thus better plant care.
[0041] In some embodiments, a plant health score may include multiple health scores used to indicate different health states of the plant. Indicators for the health score may include, for example, the following aspects: leaf color (e.g., healthy leaves are typically bright green, while yellow, brown, or black may indicate a health problem); growth status (e.g., whether growth is vigorous, and whether there are new buds, flowers, or fruits); signs of pests and diseases (e.g., whether there are lesions, insect holes, or other disease characteristics); structural integrity (e.g., whether the branches and leaves are full and dense, and whether there are signs of wilting or shedding); and environmental stress (e.g., observing whether there are signs of sunburn, frost damage, or other environmental stress).
[0042] In some examples, a health score of 10 (e.g., "very healthy") indicates that the plant is in optimal health, with bright green leaves, vigorous growth, intact structure, no signs of pests or diseases, and no environmental stress; a health score of 9 (e.g., "healthy") indicates that the plant is healthy, with most leaves bright green, vigorous growth, intact structure, no signs of pests or diseases, and no environmental stress; a health score of 8 (e.g., "fine") indicates that the plant is generally healthy, but some leaves have faded from green to yellow, with vigorous growth, intact structure, no signs of pests or diseases, and no environmental stress, which can usually be restored with simple measures; a health score of 7 (e.g., "okay") indicates that the plant has minor health problems, with some leaves fading from green to yellow and slightly sunburned, but the plant is still growing vigorously, intact structure, and has no signs of pests or diseases, which can usually be restored with simple measures; a health score of 7 (e.g., "okay") indicates that the plant has minor health problems, with some leaves fading from green to yellow and slightly sunburned, but the plant is still growing vigorously, intact structure, and has no signs of pests or diseases, which can usually be restored with simple measures. A health score of 6 (e.g., "attention") indicates a plant with obvious health problems, such as yellowing leaves, disease spots, and moldy roots, but the plant structure is relatively intact, the growth is relatively strong, and new leaves are growing normally. This usually recovers with some measures. A health score of 5 (e.g., "more attention") indicates a plant with more serious health problems, such as yellowing leaves, weak growth, disease spots, and moldy roots, but the plant structure is relatively intact. This usually recovers with some measures. A health score of 4 (e.g., "sick") indicates a plant with serious health problems, such as withered leaves, weak growth, severe insect damage, moldy roots, and an incomplete plant structure. This requires complex and precise measures to recover. A health score of 3 (e.g., "significantly") indicates a plant with... A health score of "sick" indicates a plant has very serious health problems, with all leaves fallen, weak growth, severe insect damage, incomplete plant structure, and severely moldy roots, requiring complex and precise measures to restore it; a health score of 2 (e.g., "barely survive") indicates that the plant is generally withered, but a few green leaves are visible; a health score of 1 (e.g., "about to death") indicates that the plant is completely dead; and a health score of 0 (e.g., "death") indicates that the plant is completely dead and no evidence of its survival can be found.
[0043] In some embodiments, method 100 may further include: determining the species of a plant based on the acquired plant image by a plant health scoring model before determining the plant health score based on the plant image, wherein the plant health scoring model can be trained based on labeled plant species data, so that the trained plant health scoring model can determine the species of the plant in the plant image.
[0044] In some embodiments, triplet data may include multiple sets of triplet data at the species level. That is, triplet data may include multiple sets of triplet data for different plant species, where the anchor sample, positive sample, and negative sample in the same triplet data correspond to plant images of the same species, so that plant health scores can be trained by triplet contrastive learning at the species level.
[0045] In some embodiments, determining a plant's health score based on an acquired plant image using a plant health scoring model may include: selecting a plant image labeled with a first specified health score from a database as a first reference image, wherein the plant in the first reference image is the same species as the plant (i.e., the plant whose health score is to be determined, which may also be referred to as the "target plant" in this disclosure); determining the similarity between the plant image and the first reference image; and determining the plant's health score as the first specified health score in response to determining that the similarity is greater than a preset similarity threshold. In some embodiments, the first specified health score may be any one of a plurality of predefined health scores.
[0046] In some examples, the database can store one or more plant images of each of a variety of plants in different health states, and each plant image has a labeled tag, where the tag of each plant image indicates the health score of the plant in that plant image.
[0047] Since the health status of different plant species may vary, it is advisable to first identify the species of the target plant, and then search the database and select plant images of the same species as the target plant as reference images. This improves the reference image's reliability and, consequently, the accuracy of the health score of the target plant determined based on the reference image.
[0048] Of course, it is understandable that, considering that different plant species may exhibit similar behaviors when faced with the same growth events (e.g., yellowing leaves, lesions, sunburn, etc.), in some other embodiments, plant images with health rating labels in the database can be directly selected as reference images. This can save the step of determining the species of the target plant and save computational resources.
[0049] In further embodiments, determining the plant health score based on the acquired plant image by the plant health scoring model may further include: in response to determining that the similarity is not greater than a preset threshold, selecting other plant images with the label "second specified health score" from the database as second reference images, wherein the plant in the second reference image is the same species as the plant, and the second specified health score is different from the first specified health score; determining the similarity between the plant image and the second reference image; and in response to determining that the similarity is greater than a preset similarity threshold, determining the plant's health score as the second specified health score.
[0050] As a non-limiting example, when calculations determine that a plant image is dissimilar to a first reference image, the health score of the target plant can be considered not to be the health score of the plant in the first reference image (e.g., the first specified health score). Therefore, a plant image of that species with a label of another health score (e.g., the second specified health score) can be selected from the database as a second reference image, and the similarity between the plant image and the second reference image can be calculated. This process is repeated until a reference image whose similarity to the plant image meets the similarity requirement is found, thereby determining the health score of the target plant.
[0051] As a non-limiting example, determining the similarity between a plant image and a reference image (e.g., a first reference image and a second reference image) can be achieved by calculating the cosine similarity between the embedding vectors representing image features of the plant image and the embedding vectors representing image features of the reference image.
[0052] The foregoing embodiments can determine the health score of a plant in a plant image by determining the similarity between the plant image and a reference image. In other embodiments, the health score of a plant in a plant image can also be determined by predicting the probability that the embedding vector of the plant image exceeds a certain health score using a classification head.
[0053] In some embodiments, the plant health scoring model may include multiple classification heads, each corresponding to a different health score. Determining the plant health score based on the acquired plant image by the plant health scoring model includes: extracting an embedding vector from the acquired plant image; for each of the multiple classification heads: determining the probability that the plant's health score exceeds the health score corresponding to that classification head based on the embedding vector; comparing the determined probability with a preset probability threshold; outputting a first value if the determined probability is not less than the preset probability threshold, or outputting a second value different from the first value if the determined probability is less than the preset probability threshold; and determining the plant's health score based on the outputs of the multiple classification heads. Here, the preset probability threshold is used to characterize the model's confidence level and can be reasonably set according to actual needs. In some embodiments, the classification head may be a binary classification head.
[0054] As a non-limiting example, the plant health rating model may include 10 classification heads, each corresponding to a health rating from 0 to 9. Each classification head is used to handle a binary classification task. For example, the first classification head indicates "Does the health rating of the target plant exceed 0?", the second classification head indicates "Does the health rating of the target plant exceed 1?", and so on, up to the ninth classification head indicating "Does the health rating of the target plant exceed 9?". Taking the first classification head as an example, if the probability that the plant's health rating calculated by the first classification head based on the embedding vector extracted from the plant image exceeds the first classification head's health rating (i.e., 0 points) is 0.9, and the preset probability threshold is 0.5, then the first classification head can output 1; or, if the probability that the plant's health rating calculated by the first classification head based on the extracted embedding vector exceeds the health rating 0 is 0.4, and the preset probability threshold is 0.5, then the first classification head can output 0. The implementation of other classification heads can refer to the implementation of the first classification head.
[0055] Therefore, based on the output of these classification heads, a result vector consisting of a first value and a second value can be obtained. This result vector has 1 row and the number of columns equal to the number of classification heads. The plant's health score can then be determined based on the distribution of the first and second values in this result vector. For example, assuming the result vector is [1, 1, 1, 0, 0, 0, 0, 0, 0, 0], it can be seen that the plant's health score exceeds 0, 1, and 2, but does not exceed 3. Therefore, the plant's health score can be determined as 3. That is, the plant's health score can be determined based on the highest health score corresponding to element 1 and / or the lowest health score corresponding to element 0 in the result vector. If the result vector does not include element 0 (i.e., the plant's health score exceeds 9), the plant's health score can be determined as 10. If the result vector does not include 1 (i.e., the plant's health score does not exceed 0), the plant's health score can be determined as 0.
[0056] Furthermore, in some examples, multiple classification heads can be cascaded (connected) after the feature extraction network in the plant health scoring model, arranged according to their corresponding health scores from low to high. In this way, when the previous classification head outputs the first value (e.g., 1), the next classification head continues the judgment; when the previous classification head outputs the second value (e.g., 0), the judgment of subsequent classification heads is not executed, and subsequent classification heads default to outputting the second value. This saves computational resources and improves the processing speed.
[0057] In other examples, multiple classification heads can be arranged in parallel after the feature extraction network in the plant health scoring model. This allows multiple classification heads to simultaneously output multiple values based on the extracted embedding vectors, thereby improving computational efficiency.
[0058] Before using the plant health scoring model for inference, the model needs to be trained. In some embodiments, the plant health scoring model can be trained based on triplet data using a triplet contrastive learning method.
[0059] In some embodiments, the training process may include: calculating a first embedding vector for the anchor sample, a second embedding vector for the positive sample, and a third embedding vector for the negative sample; calculating the distance between the first and second embedding vectors and the distance between the first and third embedding vectors; updating the parameters in the plant health scoring model according to the loss function until the distance between the first and second embedding vectors obtained by the updated plant health scoring model is less than the distance between the first and third embedding vectors and a preset margin is maintained. Here, the margin is used to characterize the relative distance between the anchor sample and the positive sample and the anchor sample and the negative sample, in order to distinguish samples of different categories.
[0060] Anchor samples can be first plant images labeled with a first health score, positive samples can be second plant images labeled with a second health score, and negative samples can be third plant images labeled with a third health score. Here, anchor samples, positive samples, and negative samples must satisfy the condition that the difference between the second health score and the first health score is less than the difference between the third health score and the first health score. Here, "difference" refers to the absolute value of the difference between the second or third health score and the first health score.
[0061] For example, in some examples, the first health score can be 7 points, the second health score can be 7 points (i.e., the difference between the second health score and the first health score is 0), or 8 points or 6 points (i.e., the difference between the second health score and the first health score is 1), and the third health score can be 9 points or 5 points (i.e., the difference between the third health score and the first health score is 2).
[0062] In some examples, anchor samples and positive samples with health scores having similar labels (e.g., the anchor sample has a label indicating a health score of 7, and the positive sample has a label indicating a health score of 6 or 8) can be regarded as samples of the same category, while anchor samples and negative samples with health scores having a relatively large difference in labels are regarded as samples of different categories (e.g., the anchor sample has a label indicating a health score of 7, and the negative sample has a label indicating a health score of 4 or 10).
[0063] In some other examples, anchor samples and positive samples with the same health score labels can be regarded as samples of the same category, while anchor samples and negative samples with different health score labels are regarded as samples of different categories.
[0064] It can be understood that the health score gap threshold can be set according to actual needs to classify samples. For example, in some other examples, anchor samples and positive samples whose health scores indicated by their labels differ by no more than 2 can be regarded as samples of the same category, and anchor samples and negative samples whose health scores indicated by their labels differ by more than 3 can be regarded as samples of different categories.
[0065] As a non-limiting illustrative example, the triplet contrastive learning method is a special metric learning method, and its training objective is to make the distance between the anchor sample and the positive sample less than the distance between the anchor sample and the negative sample, and maintain a certain margin. That is, the training objective can be formally expressed as d(anchor, positive)+margin < d(anchor, negative), where d(a, b) represents the distance metric function between a and b. The triplet contrastive learning method optimizes the embedding space by learning the relative distance relationship between samples, so that the distance between samples of the same category in this embedding space is close enough, while the distance between samples of different categories is far enough.
[0066] Thus, through training, the trained plant health score model can拉近the plant images belonging to the same category in the learned embedding space, and推远the plant images belonging to different categories.
[0067] It should be noted that the Chinese words "拉近" and "推远" in the original text seem to be incorrect expressions. It might be better to use more appropriate English words like "bring closer" and "push farther" to make the translation more accurate. The above translation is based on the original text as it is.Furthermore, compared to the binary contrastive learning method, the triplet contrastive learning method introduces richer relative constraints. Therefore, the plant health scoring model trained using the triplet contrastive learning method combined with triplet data has better feature extraction capabilities and more accurate judgment of the distance between plant images and reference images. Thus, the trained plant health scoring model of this disclosure has a superior ability to judge plant health scores.
[0068] In contrast, related technologies often employ binary classification methods to determine plant health status. That is, a binary classification method is used to label plant images in the training dataset with 0 / 1 tags based on their health status (e.g., "0" indicates a diseased plant, "1" indicates a healthy plant). This training dataset is then used in conjunction with the binary classification loss function BCEWithLogitsLoss (a loss function combining the sigmoid function and binary cross-entropy loss for binary classification problems) to train a plant health rating model. This model can then determine the health status of plants based on images and output whether the plant is healthy or diseased. In contrast, the trained plant rating model disclosed in this paper not only outputs more detailed plant health status information but also provides more accurate judgment results.
[0069] refer to Figure 2 This illustrates a schematic diagram of an exemplary user interface 200A for determining a plant health score according to some embodiments of the present disclosure. Figure 2 As shown, the user interface 200A may include an input button 202 for inputting plant images and an image display area 204 for displaying plant images. Users can input one or more plant images already stored in their device or directly captured plant images via the input button 202.
[0070] In some embodiments, if a plant's health score cannot be determined based on the currently acquired plant images, an interactive question may be presented to the user, along with a response to that question. The response is then input into a plant health scoring model to further determine the plant's health score. In some examples, the interactive question may include a request for one or more close-up or full-view images of the plant.
[0071] The user interface 200A may also include a species information display area 206 to present species information of the plants in the plant images.
[0072] The user interface 200A may also include a health score display area 208 to present the plant's health score determined by the plant health score model. For example... Figure 2As shown, the health score of the jasmine (Frangipani) determined based on the user-uploaded plant image is "healthy" (i.e., the jasmine's plant health score is 0). Converting the numerical health score to text and presenting it as text on the user interface allows users to obtain information about the plant's health status more directly. Alternatively, the plant's health score can also be presented numerically on the user interface.
[0073] Therefore, by inputting a plant image, users can obtain the plant's health score / health status, which can provide more reference for users to care for the plant in the future.
[0074] refer to Figure 3 This illustrates a schematic diagram of an exemplary user interface 200B for determining a plant health score according to some embodiments of the present disclosure. Figure 3 As shown, the user interface 200B can also display other health ratings for the plant: as shown in the health rating display area 208A, the health rating of the jasmine is sick; as shown in the health rating display area 208B, the health rating of the jasmine is attention; as shown in the health rating display area 208C, the health rating of the jasmine is okay.
[0075] Continue to refer to Figure 3 For example, when the health rating of a jasmine plant is "sick," the user can click on user interface element 210 to obtain relevant solutions. In some embodiments, the database may store plant species names, plant care information, plant symptoms, causes of disease, and corresponding treatment and prevention methods. This information about the plant may be stored in the database in association with plant images and plant image tags. In some embodiments, associated care tasks may be generated and displayed to the user based on the content of the obtained solutions. When a device capable of performing care tasks is connected, the device may be automatically controlled to perform the care tasks to achieve automated plant care.
[0076] Specifically, in some embodiments, method 100 may further include: generating a maintenance plan based on the determined plant health score, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks; and outputting the maintenance plan.
[0077] The maintenance plan can include routine maintenance plan, treatment maintenance plan, preventive maintenance plan, or a combination thereof. For example, when the health score of the plant is determined to be 10-9, a routine maintenance plan and / or preventive maintenance plan for the plant can be output; when the health score of the plant is determined to be 8-3, a treatment maintenance plan for the plant can be output, and optionally, a complementary routine maintenance plan and preventive maintenance plan can also be output.
[0078] For illustrative purposes, a non-limiting example application of method 100 may include determining the health score of a jasmine plant being cared for by a user. In this example, the jasmine plant in the user-input plant image has orange-yellow to brown powdery spore masses on its leaves and corresponding chlorotic yellow spots on the leaf surface. To further assist the user in caring for the jasmine plant, a care task can be generated based on the species information "jasmine plant," the health score "sick," and the solutions "Symptom: Rust; Cause: Excessive humidity, excessive temperature, spore spread; Treatment: Prune diseased leaves, improve ventilation, spray pesticides." This task would be: "Prune diseased leaves of the jasmine plant, move the jasmine plant to a more ventilated and well-lit location, and spray pesticides on the jasmine plant."
[0079] After generating a maintenance task, since the database also stores the identifiers of maintenance devices coupled with the user terminal, the database can be used to determine the identifiers of the maintenance devices associated with the maintenance task, thereby generating a maintenance plan. Once the maintenance plan is obtained, it can be displayed on the user interface. This allows the user to know what maintenance devices (e.g., irrigation devices, fertilization devices, moving devices, pruning devices, drug dispensing devices, light control devices, temperature control devices, humidity control devices, etc., or combinations thereof) should be used to maintain the jasmine. Maintenance tasks can include, for example, watering, spraying, fertilizing, pruning, weeding, rotating the pot, moving the plant, providing sunlight, shading, adjusting temperature, adjusting humidity, applying insecticides, and applying fungicides. Specifically, the maintenance task can also include various parameters, such as the time, interval, and amount of watering; the dosage, time, and interval of fertilization; the location of pruning; the dosage and location of pesticide spraying; and the target location of movement.
[0080] In some embodiments, method 100 may include: controlling a corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task.
[0081] Since maintenance devices typically have communication capabilities, commands can be transmitted to them (e.g., via Bluetooth, Zigbee, etc.). For example, in the aforementioned example, the maintenance plan may include three maintenance tasks: {leaf pruning task, identifier of the pruning device}, {plant movement task, identifier of the movement device}, and {pesticide spraying task, identifier of the pesticide dispensing device}. Based on the identifiers, commands instructing the corresponding pruning device, movement device, and pesticide dispensing device to execute the leaf pruning task, movement task, and pesticide spraying task are sent respectively. This controls the pruning device, movement device, and pesticide dispensing device to automatically complete the pruning task, movement task, and pesticide spraying task, thereby reducing the user's maintenance burden and improving maintenance efficiency.
[0082] In addition to automatically executing the maintenance plan, in some embodiments, after displaying the maintenance plan, the user may be further asked whether to confirm the execution of the maintenance plan. After the user confirms the execution of the maintenance plan, the corresponding maintenance device is controlled according to the maintenance plan to complete the corresponding maintenance task.
[0083] In some embodiments, method 100 may include: inputting plant images of a first growth stage and plant images of a second growth stage; determining the plant's health score in the first growth stage and the health score in the second growth stage using a plant health scoring model, and determining a conclusion based on the health score and plant images of the first and second growth stages, the conclusion including the change in the plant's health status from the first to the second growth stage; and presenting the determined conclusion on a user interface. It is understood that different growth stages can be distinguished based on different growth states of the plant or different time points. For example, when a plant's flower buds are small and insect bites are present, the plant can be considered to be in the first growth stage; when the plant's flower buds are larger than in the first growth stage and the insect bites disappear, the plant can be considered to be in the second growth stage. As another example, a plant photographed in September 2024 can be considered to be in the first growth stage, while a plant photographed in October 2024 can be considered to be in the second growth stage.
[0084] refer to Figure 4 This illustrates a schematic diagram of an exemplary user interface 400 for determining a plant health score according to some embodiments of the present disclosure. Figure 4As shown, after a user inputs a first plant image taken on September 20, 2024 (first growth stage) and a second plant image taken on October 5, 2024 (second growth stage), the first plant image can be displayed in the first display area 402 and the second plant image in the second display area 404. Furthermore, the display areas 402 and 404 can show phrases such as "Sep 20, 2024", "Before", "Oct 5, 2024", and "After" to further indicate the time relationship between the first and second plant images and the specific time of capture. Additionally, the first display area 402 can display a health score of "5.0" for the plant in the first growth stage, and the second display area 404 can display a health score of "9.0" for the plant in the second growth stage.
[0085] Continue to refer to Figure 4 The user interface 400 may also include a third display area 406 to present conclusions based on a plant health scoring model that illustrate changes in the plant's health status. For example, as Figure 4 As shown, the third display area 406 can present the conclusion of the plant's health changes from the first growth stage to the second growth stage: "Good News. The plant shows clear improvement, with vibrant, plump upper leaves and new growth indicating an active growth phase. The lower leaves are still slightly dull but better than two weeks ago."
[0086] Therefore, by reading the user interface 400, users can not only understand the plant's health score at the corresponding growth stage, but also understand the changes in the plant's health status between these growth stages, thus helping users understand the dynamic growth process of the plant and better care for it.
[0087] This disclosure also provides an electronic device in another aspect. (See reference) Figure 5 This illustrates a schematic block diagram of an electronic device 500 according to some embodiments of the present disclosure. Figure 5As shown, electronic device 500 includes processor 502 and memory 504 storing computer-executable instructions that, when executed by processor 502, cause processor 502 to perform a method for determining a plant health score according to any of the foregoing embodiments of this disclosure. Processor 502 may be, for example, a central processing unit (CPU) of electronic device 500. Processor 502 may be any type of general-purpose processor or may be a processor specifically designed for determining a plant health score, such as an application-specific integrated circuit (“ASIC”). Memory 504 may be coupled to processor 502 and may include various computer-readable media accessible by processor 502. In various embodiments, memory 504 described herein may include volatile and non-volatile media, removable and non-removable media. For example, memory 504 may include any combination of random access memory (“RAM”), dynamic RAM (“DRAM”), static RAM (“SRAM”), read-only memory (“ROM”), flash memory, cache memory, and / or any other type of non-transitory computer-readable media. The memory 504 may store instructions that, when executed by the processor 502, cause the processor 502 to execute the method for determining a plant health score according to any of the foregoing embodiments of the present disclosure.
[0088] In some embodiments, the electronic device 500 may be implemented as a smartphone, a smart camera, a computer, etc.
[0089] The electronic device 500 is configured to perform the method 100 described in any of the foregoing embodiments, and therefore reference can be made to the description of the various embodiments of method 100 above, which will not be repeated here.
[0090] This disclosure also provides a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed by a computer, cause the computer to perform the method for determining a plant health score according to any of the foregoing embodiments.
[0091] This disclosure also provides a computer program product including instructions that, when executed by a processor, implement the method for determining a plant health score according to any of the foregoing embodiments. The instructions can be any set of instructions that will be executed directly by one or more processors, such as machine code, or any set of instructions that will be executed indirectly, such as a script. The instructions can be stored in an object code format for direct processing by one or more processors, or stored in any other computer language, including scripts or sets of independent source code modules that are interpreted on demand or compiled in advance.
[0092] Figure 6A schematic block diagram of a computer system 600 on which embodiments of the present disclosure may be implemented is shown. The computer system 600 includes a bus 602 or other communication mechanism for transmitting information, and a processing means 604 coupled to the bus 602 for processing information. The computer system 600 also includes a memory 606 coupled to the bus 602 for storing instructions to be executed by the processing means 604; the memory 606 may be random access memory (RAM) or other dynamic storage device. The memory 606 may also be used to store temporary variables or other intermediate information during the execution of instructions to be executed by the processing means 604. The computer system 600 also includes a read-only memory (ROM) 608 or other static storage device coupled to the bus 602 for storing static information and instructions for the processing means 604. A storage device 610, such as a magnetic disk or optical disk, is provided and coupled to the bus 602 for storing information and instructions. Computer system 600 may be coupled via bus 602 to output device 612 for providing output to a user, such as, but not limited to, a display (such as a cathode ray tube (CRT) or liquid crystal display (LCD)), speakers, etc. Input device 614, such as a keyboard, mouse, microphone, etc., is coupled to bus 602 for transmitting information and command selections to processing device 604. Computer system 600 may execute embodiments of the present disclosure. Consistent with certain implementations of the present disclosure, results are provided by computer system 600 in response to processing device 604 executing one or more sequences of one or more instructions contained in memory 606. Such instructions may be read into memory 606 from another computer-readable medium, such as storage device 610. Execution of the sequence of instructions contained in memory 606 causes processing device 604 to perform the methods described herein. Alternatively, the teachings may be implemented using hardwired circuitry in place of or in combination with software instructions. Therefore, implementations of the present disclosure are not limited to any particular combination of hardware circuitry and software. In various embodiments, computer system 600 can be connected across a network to one or more other computer systems, such as computer system 600, to form a networked system via network interface 616. This network may include a private network or a public network such as the Internet. In a networked system, one or more computer systems can store data and supply data to other computer systems. As used herein, the term "computer-readable medium" refers to any medium that participates in providing instructions to processing device 604 for execution. Such media can take many forms, including but not limited to non-volatile media, volatile media, and transmission media. Non-volatile media include, for example, optical discs or magnetic disks such as storage device 610. Volatile media include dynamic memory such as memory 606. Transmission media include coaxial cables, copper wires, and optical fibers, including wiring that includes bus 602.Common forms of computer-readable media or computer program products include, for example, floppy disks, flexible disks, hard disks, magnetic tapes, or any other magnetic media, CD-ROMs, digital video discs (DVDs), Blu-ray discs, any other optical media, thumb drives, memory cards, RAM, PROMs and EPROMs, fast EPROMs, any other memory chips or cartridges, or any other tangible media from which a computer can read. Various forms of computer-readable media may be involved when carrying one or more sequences of one or more instructions to processing device 604 for execution. For example, instructions may initially be carried on a disk of a remote computer. The remote computer may load the instructions into its dynamic memory and transmit the instructions over a telephone line using a modem. A modem local to computer system 600 may receive data over a telephone line and convert the data into an infrared signal using an infrared transmitter. An infrared detector coupled to bus 602 may receive the data carried in the infrared signal and place the data on bus 602. Bus 602 carries the data to memory 606, from which processing device 604 retrieves and executes the instructions. For example, instructions received by memory 606 may be stored on storage device 610 before or after execution by processing device 604.
[0093] Figure 7 A schematic block diagram of a maintenance system 700 according to some embodiments of the present disclosure is shown. The maintenance system 700 includes an acquisition module 702, a scoring module 704, a presentation module 706, a maintenance plan generation module 708, and a control module 710. The acquisition module 702 is configured to acquire plant images. The scoring module 704 is configured to determine a plant health score based on the acquired plant images using a plant health scoring model, wherein the plant health scoring model is trained using triplet contrastive learning based on triplet data, the triplet data including a first plant image labeled with a first health score as an anchor sample, a second plant image labeled with a second health score as a positive sample, and a third plant image labeled with a third health score as a negative sample, the difference between the second health score and the first health score being smaller than the difference between the third health score and the first health score. The presentation module 706 is configured to present the determined plant health score on a user interface. The maintenance plan generation module 708 is configured to generate a maintenance plan based on the determined plant health score. The maintenance plan includes maintenance tasks and identifiers for maintenance devices used to perform the maintenance tasks. The control module 710 is configured to control the corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task.
[0094] The acquisition module 702, the scoring module 704, the presentation module 706, the maintenance plan generation module 708, and the control module 710 can be implemented together as the aforementioned electronic device 500 or computer system 600, and can be implemented as, for example, but not limited to, smartphones, smart cameras, computers, etc.
[0095] The maintenance system 700 also includes an execution module 720, which may include one or more maintenance devices (e.g., 7201, 7202, ..., 720) that are communicatively coupled to the control module 710. n It is configured to perform maintenance tasks in response to receiving commands from control module 710.
[0096] In some embodiments, the maintenance device (e.g., 7201, 7202, ..., 720) n The device is configured to transmit execution data to the control module 710 in response to the execution of a maintenance task. Therefore, the maintenance system 700 can also be configured to update the plant's maintenance information based on the execution data received from the maintenance device. In this way, when the user's plant image is acquired again, the updated plant maintenance information can be combined to provide the user with more personalized information and update the corresponding maintenance plan.
[0097] In some embodiments, the maintenance system 700 may also include a user interface (not shown). For example, a results page including the determined health score of the plant may be displayed on the user interface, and / or a maintenance plan may be displayed on the user interface.
[0098] In some embodiments, the acquisition module 702 may be implemented as a camera communicatively coupled to the scoring module 704. The camera may be configured to capture plant images and transmit the captured plant images to the scoring module 704. The camera may be any suitable imaging device for monitoring plants.
[0099] For example, the scoring module 704 can be configured to determine the plant's health score based on plant images received from the camera. For instance, it might require images or videos of the plant's partial or overall condition that the user needs to maintain. In this case, the camera can automatically acquire these plant images or videos without the user needing to input them. Alternatively, if a plant image from the user is unrecognizable due to insufficient clarity or other reasons, the camera can automatically acquire the plant image without the user needing to re-input it. In other words, plant images captured by the camera can be used to assist in determining the plant's health score.
[0100] Various embodiments of the maintenance system 700 can be referenced similarly to any embodiment of any of the foregoing aspects of this disclosure, and will not be elaborated further here.
[0101] The foregoing has described one or more exemplary embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0102] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this disclosure does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments may be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a game console, a tablet computer, a wearable device, or any combination thereof.
[0103] The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded. For example, the use of terms such as "first" or "second" to denote names does not indicate any particular order.
[0104] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more embodiments of this disclosure, the functions of each module can be implemented in one or more software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0105] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0106] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0107] Those skilled in the art will understand that one or more embodiments of this disclosure may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] One or more embodiments of this disclosure can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this disclosure can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.
[0109] The same or similar parts between the various embodiments of this disclosure can be referred to mutually, and each embodiment focuses on describing the differences from other embodiments. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to the description of the method embodiments. In the description of this disclosure, the reference to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," "exemplary," etc., means that the specific feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of this disclosure. In this disclosure, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this disclosure and the features of different embodiments or examples.
[0110] Additionally, when used in this disclosure, the terms “here,” “above,” “below,” “below,” “in the following,” “overall,” and similar terms should refer to the entirety of this disclosure and not any particular part thereof. Furthermore, unless expressly stated otherwise or otherwise understood in the context in which they are used, conditional language used herein, such as “may,” “possibly,” “for example,” “like,” etc., is generally intended to express that certain embodiments include, while other embodiments do not, certain features, elements, and / or states. Therefore, such conditional language is not generally intended to imply that one or more embodiments require features, elements, and / or states in any way, or whether such features, elements, and / or states are included or performed in any particular embodiment.
[0111] In addition, embodiments of this disclosure may also include the following examples:
[0112] Example 1. A method for determining the health score of a plant, comprising:
[0113] Acquire plant images;
[0114] A plant health rating model determines a plant health rating based on the acquired plant images. The plant health rating model is trained using triplet data and a triplet contrastive learning method. The triplet data includes a first plant image labeled with a first health rating as an anchor sample, a second plant image labeled with a second health rating as a positive sample, and a third plant image labeled with a third health rating as a negative sample. The difference between the second health rating and the first health rating is smaller than the difference between the third health rating and the first health rating.
[0115] The determined health score of the plant is displayed on the user interface.
[0116] Example 2. According to the method described in Example 1, the method further includes:
[0117] Before determining the health score of the plant based on the plant image, the plant species is determined by a plant health scoring model based on the acquired plant image, wherein the plant health scoring model is trained based on labeled plant species data.
[0118] Example 3. According to the method described in Example 2, wherein the triplet data includes triplet data of multiple groups of plants of different species, and the anchor sample, positive sample and negative sample in the same triplet data are plant images of the same species.
[0119] Example 4. The method according to Example 2, wherein determining the plant health score by the plant health scoring model based on the acquired plant image includes:
[0120] Based on the species of the plant, a plant image with a label of a first specified health score is selected from the database as a first reference image, wherein the plant in the first reference image is the same species as the plant.
[0121] Determine the similarity between the plant image and the first reference image;
[0122] In response to determining that the similarity is greater than a preset similarity threshold, the health score of the plant is determined to be the first specified health score.
[0123] Example 5. The method according to Example 4, wherein determining the plant health score by the plant health scoring model based on the acquired plant image further includes:
[0124] In response to determining that the similarity is not greater than the preset threshold, other plant images with the label of a second specified health score are selected from the database as second reference images, wherein the plant in the second reference image is the same species as the plant, and the second specified health score is different from the first specified health score;
[0125] Determine the similarity between the plant image and the second reference image; and
[0126] In response to determining that the similarity is greater than the preset similarity threshold, the health score of the plant is determined as the second specified health score.
[0127] Example 6. According to the method described in Example 1, wherein the plant health scoring model includes multiple classifiers, different classifiers corresponding to different health scores, and the plant health scoring model determines the plant health score based on the acquired plant image, including:
[0128] The embedding vector of the acquired plant image is extracted from the plant health scoring model;
[0129] Each of the plurality of classification heads:
[0130] The probability that a plant's health score exceeds the health score corresponding to the classifier head is determined based on the embedding vector.
[0131] Compare the determined probability with the preset probability threshold.
[0132] In response to a determined probability not being less than the preset probability threshold, a first value is output, or in response to a determined probability being less than the preset probability threshold, a second value different from the first value is output.
[0133] The plant's health score is determined based on the output of the multiple classification heads.
[0134] Example 7. The method according to Example 1, wherein the plant images include multiple plant images of the same plant at multiple growth stages.
[0135] Example 8. The method according to Example 1, wherein the plant health scoring model is trained based on triplet data using a triplet contrastive learning method, comprising:
[0136] Calculate the first embedding vector of the anchor sample, the second embedding vector of the positive sample, and the third embedding vector of the negative sample, respectively.
[0137] Calculate the distance between the first embedding vector and the second embedding vector, and the distance between the first embedding vector and the third embedding vector, respectively;
[0138] The parameters in the plant health scoring model are updated according to the loss function until the distance between the first embedding vector and the second embedding vector obtained by the updated plant health scoring model is less than the distance between the first embedding vector and the third embedding vector, and a preset interval is maintained.
[0139] Example 9. The method described in Example 1 further includes:
[0140] A maintenance plan is generated based on the determined health score of the plant, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks;
[0141] Output the maintenance plan.
[0142] Example 10. The method described in Example 9 includes:
[0143] Control the corresponding maintenance device according to the identification of the maintenance device in the maintenance plan to complete the maintenance task.
[0144] Example 11. An electronic device comprising:
[0145] Processor; and
[0146] A memory storing computer-executable instructions, which, when executed by the processor, cause the processor to perform a method for determining a plant health score according to any one of Examples 1 to 10.
[0147] Example 12. A computer-readable storage medium having computer-executable instructions thereon, which, when executed by a computer, cause the computer to perform a method for determining a plant health score according to any one of Examples 1 to 10.
[0148] Example 13. A computer program product comprising instructions that, when executed by a processor, implement the method for determining a health score of a plant according to any one of Examples 1 to 10.
[0149] Example 14. A maintenance system comprising:
[0150] The acquisition module is configured to acquire plant images;
[0151] The scoring module is configured to determine the health score of a plant based on the acquired plant images by a plant health scoring model. The plant health scoring model is trained using triplet contrastive learning based on triplet data. The triplet data includes a first plant image labeled with a first health score as an anchor sample, a second plant image labeled with a second health score as a positive sample, and a third plant image labeled with a third health score as a negative sample. The difference between the second health score and the first health score is smaller than the difference between the third health score and the first health score.
[0152] The presentation module is configured to display the determined health score of the plant on the user interface;
[0153] The maintenance plan generation module is configured to generate a maintenance plan based on the determined health score of the plant, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks;
[0154] The control module is configured to control the corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task; and
[0155] An execution module includes a maintenance device communicatively coupled to the control module, the maintenance device being configured to perform a maintenance task in response to receiving a command from the control module.
[0156] The above description is merely an embodiment of one or more embodiments of this disclosure and is not intended to limit the scope of the one or more embodiments of this disclosure. Various modifications and variations can be made to the one or more embodiments of this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims.
Claims
1. A method for determining a plant health score, comprising: Acquire plant images; A plant health rating model determines a plant health rating based on the acquired plant images. The plant health rating model is trained using triplet data and a triplet contrastive learning method. The triplet data includes a first plant image labeled with a first health rating as an anchor sample, a second plant image labeled with a second health rating as a positive sample, and a third plant image labeled with a third health rating as a negative sample. The difference between the second health rating and the first health rating is smaller than the difference between the third health rating and the first health rating. The determined plant health score is displayed on the user interface. The method further includes: before determining the health score of the plant based on the plant image, the plant health scoring model determines the species of the plant based on the acquired plant image, wherein the plant health scoring model is trained based on labeled plant species data; The triplet data includes triplet data of multiple different plant species, and the anchor sample, positive sample and negative sample in the same triplet data are plant images of the same species. The process of determining the plant health score based on the acquired plant images by the plant health scoring model includes: Based on the species of the plant, a plant image with a label of a first specified health score is selected from the database as a first reference image, wherein the plant in the first reference image is the same species as the plant mentioned above. Determine the similarity between the plant image and the first reference image. In response to determining that the similarity is greater than a preset similarity threshold, the health score of the plant is determined to be the first specified health score; The process of determining the plant health score based on the acquired plant images by the plant health scoring model further includes: In response to determining that the similarity is not greater than the preset threshold, other plant images with a label of a second specified health score are selected from the database as second reference images, wherein the plant in the second reference image is the same species as the plant in the first reference image, and the second specified health score is different from the first specified health score. Determine the similarity between the plant image and the second reference image, and In response to determining that the similarity is greater than the preset similarity threshold, the health score of the plant is determined as the second specified health score.
2. The method according to claim 1, wherein, The plant health scoring model includes multiple classification heads, with different classification heads corresponding to different health scores. The plant health scoring model determines the plant health score based on the acquired plant images, including: The embedding vector of the acquired plant image is extracted from the plant health scoring model; Each of the plurality of classification heads: The probability that a plant's health score exceeds the health score corresponding to the classifier head is determined based on the embedding vector. Compare the determined probability with the preset probability threshold. In response to a determined probability not being less than the preset probability threshold, a first value is output, or in response to a determined probability being less than the preset probability threshold, a second value different from the first value is output. The plant's health score is determined based on the output of the multiple classification heads.
3. The method according to claim 1, wherein, The plant images include multiple plant images of the same plant at multiple growth stages.
4. The method according to claim 1, wherein, The plant health scoring model is trained based on triplet data using a triplet contrastive learning method, including: Calculate the first embedding vector of the anchor sample, the second embedding vector of the positive sample, and the third embedding vector of the negative sample, respectively. Calculate the distance between the first embedding vector and the second embedding vector, and the distance between the first embedding vector and the third embedding vector, respectively; The parameters in the plant health scoring model are updated according to the loss function until the distance between the first embedding vector and the second embedding vector obtained by the updated plant health scoring model is less than the distance between the first embedding vector and the third embedding vector, and a preset interval is maintained.
5. The method according to claim 1, further comprising: A maintenance plan is generated based on the determined health score of the plant, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks; Output the maintenance plan.
6. The method according to claim 5, comprising: Control the corresponding maintenance device according to the identification of the maintenance device in the maintenance plan to complete the maintenance task.
7. An electronic device, comprising: processor; as well as A memory storing computer-executable instructions, which, when executed by the processor, cause the processor to perform a method for determining a plant health score according to any one of claims 1 to 6.
8. A computer-readable storage medium having computer-executable instructions stored thereon, the computer-executable instructions, when executed by a computer, causing the computer to perform a method for determining a plant health score according to any one of claims 1 to 6.
9. A computer program product comprising instructions that, when executed by a processor, implement the method for determining a plant health score according to any one of claims 1 to 6.
10. A maintenance system, comprising: The acquisition module is configured to acquire plant images; The scoring module is configured to determine the health score of a plant based on the acquired plant images by a plant health scoring model. The plant health scoring model is trained using triplet contrastive learning based on triplet data. The triplet data includes a first plant image labeled with a first health score as an anchor sample, a second plant image labeled with a second health score as a positive sample, and a third plant image labeled with a third health score as a negative sample. The difference between the second health score and the first health score is smaller than the difference between the third health score and the first health score. The presentation module is configured to display the determined health score of the plant on the user interface; The maintenance plan generation module is configured to generate a maintenance plan based on the determined health score of the plant, the maintenance plan including maintenance tasks and identifiers of maintenance devices for performing the maintenance tasks; The control module is configured to control the corresponding maintenance device according to the identifier of the maintenance device in the maintenance plan to complete the maintenance task; and An execution module includes a maintenance device communicatively coupled to the control module, the maintenance device being configured to perform a maintenance task in response to receiving a command from the control module. The scoring module is further configured to: before determining the health score of the plant based on the plant image, the plant health scoring model determines the species of the plant based on the acquired plant image, wherein the plant health scoring model is trained based on labeled plant species data; The triplet data includes triplet data of multiple different plant species, and the anchor sample, positive sample and negative sample in the same triplet data are plant images of the same species. The process of determining the plant health score based on the acquired plant images by the plant health scoring model includes: Based on the species of the plant, a plant image with a label of a first specified health score is selected from the database as a first reference image, wherein the plant in the first reference image is the same species as the plant mentioned above. Determine the similarity between the plant image and the first reference image. In response to determining that the similarity is greater than a preset similarity threshold, the health score of the plant is determined to be the first specified health score; The process of determining the plant health score based on the acquired plant images by the plant health scoring model further includes: In response to determining that the similarity is not greater than the preset threshold, other plant images with a label of a second specified health score are selected from the database as second reference images, wherein the plant in the second reference image is the same species as the plant in the first reference image, and the second specified health score is different from the first specified health score. Determine the similarity between the plant image and the second reference image, and In response to determining that the similarity is greater than the preset similarity threshold, the health score of the plant is determined as the second specified health score.